Ha SS a Ni *****DOWNLOAD FREE SOFTWARES,SONGS,FILMS***** Latest News:**Mcqs Section has been updated see the OOP Mcqs**ONLINE MONEY MAKING in URDU**
Free Download Games
familyfeudsmallicon3footninjasmallicon3footninja2smalliconadventureelfsmalliconalienattacksmalliconaquaenergizersmalliconclashandslashsmallicon
For More Free Games Please Click Here

Tuesday, September 15, 2009

CS301 Data Structures 2nd Lecture

Important points of Lecture No 2.

  1. The next method moves the current position one position forward.
  2. We also have two variables- current and size to store the position of current pointer and the number of elements in the list.
  3. The method next is used to know about the boundary conditions of the list i.e. the array being used by us to implement the list.
  4. The remove method removes the element residing at the current position.
  5. Thus in the remove method, when we remove an element, the element next to it on the right hand side comes at its place and the remaining are also shifted one place to the right
  6. The find (x) function is used to find a specific element in the array. We pass the element, which is to be found, as an argument to the find function.
  7. There is a get() method , used to get the element from the current position in the array.
  8. Another function is update(x). This method is used to change (set) the value at the current position.
  9. Then there is a method length( ).This method returns the size of the list.This size is the number of the elements of the list, stored in the array.
  10. The back() method decreases the value of variable current by 1.
  11. The start() method sets the current position to the first element of the list.
  12. The end() method sets the current position to the last element of the list i.e. size.
  13. we can access a memory location by using its address, normally called memory address.
  14. The object field that holds the actual list element and the next that holds the starting location of the next node.
  15. We place the memory address NULL in the last node. NULL is an invalid address and is inaccessible.

No comments:

Post a Comment