Nivaar Exam Prep

19-Soft-A1 Algorithms & Data Structures: December 2016

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer) · Last updated

  1. Question 1 Binary Tree
  2. Question 2 Max Heap
  3. Question 3 Graph Traversal and Spanning Trees
  4. Question 4 Waiting
  5. Question 5 Double Linked List
  6. Question 6 Merge Sort
  7. Question 7 Short Questions

Start with Question 1 →

Implementations below use C-style pseudocode, as the exam note permits any of C, C++, Java, Python, or clean pseudocode.

Reference texts: Cormen, Leiserson, Rivest & Stein, Introduction to Algorithms (3rd ed., MIT Press) — asymptotic analysis, heaps, graph algorithms, divide-and-conquer, NP-completeness; Sedgewick & Wayne, Algorithms (4th ed., Addison-Wesley) — linked-list and array data structures, sorting, hashing; Weiss, Data Structures and Algorithm Analysis in C (2nd ed., Pearson) — array-based binary trees and heaps, ADT design.