Professional Documents
Culture Documents
1
PART II: Coding & Implementation:
Answer:
2. Write a method called (add2front) to insert a node that contains the value “1” at the beginning of the following linked-
list:
Head 2 3 4
Answer:
Write a method called (isFound) to return true if it finds a node in a single linked-list with data equal to ‘val’.and return false
otherwise?
Answer:
2
3. Write a method called (del_mid) to delete the node with the value “4” from the following single linked-list:
Head 4 3 2
Answer:
4. Convert the following linked list into its static representation (using array)?
Tail
Head D C B A
Answer: