Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. What is the meaning of a Singly Linked List data structure? Answer in one sen

ID: 3698671 • Letter: 1

Question

1. What is the meaning of a Singly Linked List data structure? Answer in one sentence 2. What is meaning of list traversal 3. What is the meaning of a Circular Linked List data structure? Answer in one sentence 4. What is the condition on head and tail node pointers of a Singly List data structure when the list has only one element? 5. What is the condition on head and tail node pointers of a Singly List data structure when the list is empty? 6. Define the destructor for SLList class as shown in the Figure - 3 7. Define initList member function of the SLList class as declared in the Figure 3. The function initializes the list to the default state head and node at NULL. 8. Define isEmpty member function of the SLList class as declared in the Figure 3. The function checks if the list is empty or not. If the list is empty, the function returns true else false. 9. Define countNodes member function of the SLList class as declared in the Figure 3. The function returns the number of nodes in the list 10.Define printList member function of the SLList class as declared in the Figure 3. The function prints the value/data stored in the list nodes in one row with a tab space n- between . Pre-condition - the list should not be empty 11.Define insertToHead member function of the SLList class as declared in the Figure- 3 The function inserts a new node with the given value at the front/head end of the list. . Pre-condition-None . Post-condition - The new node is inserted at the front/head end of the list 12.Define insertToTail member function of the SLList class as declared in the Figure 3 The function inserts a new node with the given value at the rear/tail end of the list . Pre-condition - None . Post-condition - The new node is inserted at the rear/tail end of the list. 13.Define removeFromHead member function of the SLList class as declared in the Figure 3 The function returns and removes the front/head node from the existing list. Pre-condition - The list should not be empty . Post-condition - The head/front node is removed from the list, and the next node is assigned as head 14.Define removeFromTail member function of the SLList class as declared in the Figure - 3 The function returns and removes the rear/tail node from the existing list Pre-condition - The list should not be empty . Post-condition The tail/rear node is removed from the list, and the previous node is assigned as tail 15.Define insertAt member function of the SLList class as declared in the Figure - 3. The function inserts a new node with given value passed as the function input in the list at the specified position passed as second function input . Pre-condition-The given position input should be valid i.e., a list node should exist at the given position. Post-condition - The new node with given value is inserted in the list at the given position. The list is re-organized

Explanation / Answer

/*According to chegg policy I will answer only first four question*/

Ans1. Linked List is a linear data structure. Unlike arrays, linked list elements are not stored at contiguous location, the elements are linked using pointers.

Ans2. Traversal means visiting each element of a data structure.

Ans3. Circular linked list is a kind of linked list whose tail node points to the head node instead of pointing it to null.

Ans4. In case of single node in singly linked list head pointer points to the tail of the singly linked list.