• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 306
  • Last Modified:

Do I need to learn matrix pointers in order to understand linked list in order to understand mit course

I am doing self study
I am have done php and wanted to learn mit course to learn computer science instead of programming.

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/unit-1/lecture-6-recursion/
recommended in further study: linked list:
http://beastie.cs.ua.edu/cs150/book/index_16.html

I did not understand linked list which may not even be required to learn the mit computer science course; linked list is 'further study'

So I watched
Introduction to linked list
In this lesson, we have described linked list data structure. We have analyzed our limitations with array data structure and tried to understand the need for linked list.
https://www.youtube.com/watch?v=NobHlGUjV3g
This video about linked list allows me to understand pointers and references much better

But it is recommended by the author to watch the entire pointer lesson


Pointers in C/C++
Pointers is one concept that does not go well with beginners. In this series of videos, we will try to demystify pointers.
https://www.youtube.com/playlist?list=PL2_aWCzGMAwLZp6LMUKI3cc7pgGsasm2_

http://www.experts-exchange.com/Programming/Languages/C/Q_28504452.html
The hardest part of C, IMO, is pointers and multidimensional pointers.

So I am learning matrix of pointers which I do not understand.



Problem:
Do I need to learn matrix pointers in order to understand linked list in order to understand mit course
0
rgb192
Asked:
rgb192
  • 2
  • 2
1 Solution
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi RGB,

The term "matrix pointers" isn't universal.  It can mean a pointer to a matrix, or a matrix of pointers.  If you have a basic understanding of pointers, it's an incremental step to understanding either of these concepts.

As you know, a pointer is simply a memory address.  In C, a pointer variable contains the memory address of something that the program tracks.  It could be an integer, a string, a name, a table, a structure, etc.

So a pointer to a matrix looks very much like any other pointer.

  int Matrix [10][5];

  void *
  MatrixFunction (int F[10][5])
  { return F[0][0]; }

The function is called with one parameter.  That parameter is the address of a matrix.


A matrix of pointers is completely different.  It's much more common with strings (character arrays) than with integers.  If you had a table of first name and last name, each column will have to be large enough to contain the longest name that can occur in the table.  With a matrix of pointers, each item in the matrix is the size of a pointer and each pointer locates the string (array of characters) for that item.

  char *Names[10][2];

  Names[0][0] = "First Name 1";
  Names[0][1] = "Last Name 1"
  Names[1][0] = "First Name 2";
  Names[1][1] = "Last Name 2"

The matrix now contains 4 pointers for the 2 first and last name entries.
0
 
rgb192Author Commented:
Okay, I am not asking for a tutorial on matrix pointers because I can barely understand long videos. My question is do I need to learn matrix pointers to learn link lists to learn the computer science mit course
0
 
Kent OlsenData Warehouse Architect / DBACommented:
A linked list is a series of objects, each with one or more scalar pointers to another object of the same type.  It's not necessary to know anything about matrices to understand linked lists.

But I can't say positively that you don't need to understand matrices to pass the course.  MIT has a reputation of being thorough and producing very well qualified graduates.  I would bet that somewhere in the curriculum is a need to know it.

Kent
0
 
rgb192Author Commented:
A linked list is a series of objects, each with one or more scalar pointers to another object of the same type.  It's not necessary to know anything about matrices to understand linked lists.
Thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now