Professional Documents
Culture Documents
Content
M6: ADVANCE DATA STRUCTURE & PROBLEM-SOLVING USING C++
Learning outcome
1. Understand the concept of fundamental Data Structures (Linked-lists, Trees, Binary Search Trees (BST), AVL Trees,
Stacks, Queues, Priority Queues, and Hash-Tables and Skiplists).
2. Design and Analyze programming problem statements.
3. Ability to sensibly select appropriate data structures and algorithms and use it to design algorithms for a specific problem.
4. Ability to create novel solutions to small scale programming challenges involving data structures and recursion.
5. Apply and Handle operations like searching, insertion, deletion and traversing mechanism.
6. Ability to Analyze the algorithmic complexity of simple, non-recursive programs.
7. Ability to Evaluate simple inductive proofs and proofs by contradiction and reason about program correctness and
invariants.
Main Required
Topics to be covered Lectures
Topics
Basics Control Statements 2
Assignment-1: Draw Pattern
Structure Padding, Bit Field and self-Referential Structure 2
Pointers and Dynamic Memory Allocation in C/ C++
Memory Layout in C++
Recursion Principles of recursion 2
Understanding solving Recurrence relation and working
Bit Fundamental of Bit Level operations 2
Manipulation Representation of Negative number
Little Endian and Big-Endian Architecture
Bitwise Operators
Bitwise shifting operators
Algorithms and their Implementation
Complexity Time and Space Complexity, trade off, Notations, Evaluation of Time and Space Complexity 2
Analysis for iterative and recursive algorithms
Arrays 1D Arrays: Memory Representation, Declaration and Initialization of Array, Insertion, Deletion, Left 10
Rotation, Right rotation, Reverse, Concept of lower bound and upper bound, Address Calculation.
2D Arrays: Memory Representation, initialization, Address calculation (Row and column Major),
Passing 2- D array to function, implementation of 2-D array using pointer.
Array of Pointer Vs Pointer to Array
Dynamic Arrays Vs Vectors
Linked List Linked List (Linear, Circular and Doubly) and Their operations
Generic linked list
10
Memory efficient Doubly Linked List
Introduction to Stack
Stack
Basic operations - PUSH and POP 4
Application of Stack: Decimal to binary, Decimal to Hexadecimal, Decimal to Octal, Infix to
Postfix and Prefix, Postfix evaluation. String reverse, palindrome check, Balanced parenthesis
check, validity of bracketed arithmetic expression.
Working with Multi stack: Implementation of multiple stacks using a single array (using equal
partition and memory sharing)
Mergeable Stack: Implementation using Linked List
Queue Introduction to Queue (Linear, Circular, Double Ended and Priority) and their operations 4
Priority Queue: Array, Linked List and Heap Implementation, Comparison of
various implementations
Implementation of Stack using Queue
Hashing Introduction of Hashing & Chaining 2
Assignment-1
Topic: Problem: Company
Amazon D-E-Shaw Microsoft Morgan
Arrays Maximum Product Subarray Stanley OYO Rooms Google
Adobe Amazon Microsoft Morgan
Stanley Samsung Snapdeal Times
Arrays Find Minimum in Rotated Sorted Array Internet
Microsoft + Google + Apple Interview
Arrays Find Pair with Sum in Sorted & Rotated Array Qs
Adobe Amazon Microsoft Morgan
Stanley Samsung Snapdeal Times
Arrays 3Sum Internet
Flipkart + Dunzo Interview Qs use 2
Arrays Container With Most Water pointer approach
Infosys + Amazon + Flipkart Interview
Arrays Given Sum Pair Qs
Arrays Merge Overlapping Intervals Google Interview Qs
Find Minimum Number of Merge Operations to Make
Arrays an Array Palindrome Amazon
Given an Array of Numbers Arrange the Numbers to
Arrays Form the Biggest Number Barclays Interview Qs
Arrays Space Optimization Using Bit Manipulations Amazon
Arrays Subarray Sum Divisible K Snapdeal Microsoft
Print all Possible Combinations of r Elements in a
Arrays Given Array of Size n Amazon
Arrays Mo's Algorithm Microsoft
Assignment-2
Topic: Problem: Company
2D Arrays Amazon
Zigzag (or diagonal) Traversal of Matrix
2D Arrays Set Matrix Zeroes Amazon Microsoft
2D Arrays Rotate Image Microsoft Paytm Samsung Adobe
2D Arrays Google + Ola + Goldman Sachs IQ
Word Search
2D Arrays Microsoft + Uber + Apple +
Amazon IQ Read about DFS
Find the Number of Islands | Set 1 (Using DFS)
2D Arrays Given a Matrix of ‘O’ and ‘X’, Replace ‘O’ with ‘X’ if
surrounded by ‘X’ Google
2D Arrays Create a Matrix with Alternating Rectangles of O and X MAQ VMWare
Problems Need to be Discussed in Class Room
Topic: Problem: Company
Amazon Cisco D-E-Shaw Facebook
FactSet Morgan Stanley Paytm Zoho
Strings Valid Palindrome
Nagarro Media.net Directi Google
Strings Valid Anagram Adobe Flipkart
Google Interview Qs use Stacks (if
Strings Valid parentheses possible)
Strings Remove Consecutive Characters Samsung + Adobe
Adobe + Grofers + Dunzo Interview
Qs
Strings Longest Common Prefix
Convert a Sentence into its Equivalent Mobile Adobe
Strings Numeric Keypad Sequence
Strings Print all the Duplicates in the Input String Ola + Amdocs IQ
Strings Longest Substring without Repeating Characters Morgan Stanley + Amazon IQ
Strings Longest Repeating Character Replacement Amazon Google
Samsung + Adobe + Amazon
Strings Group Anagrams Interview Qs
Microsoft + Google + Samsung + Visa
Strings Longest Palindromic Substring IQ
Strings Palindromic Substrings Microsoft IQ
Strings Next Permutation Adobe + Goldman Sachs + Uber
Strings Count Palindromic Subsequences Myntra Interview Qs
Smallest Window in a String Containing all the
Strings Characters of Another String Microsoft + Amazon IQ
Strings Wildcard String Matching Microsoft + Amazon + Ola IQ
Strings Longest Prefix Suffix Flipkart + Swiggy IQ
Strings Rabin-Karp Algorithm for Pattern Searching Microsoft
Transform One String to Another using Minimum
Strings Number of Given Operation Directi
Amazon Google MakeMyTrip
Streamoid Technologies Microsoft
Strings Minimum Window Substring Media.net Atlassian Flipkart
Strings Boyer Moore Algorithm for Pattern Searching Amdocs
Strings Word Wrap Microsoft
Problems Need to be Discussed in Class Room
Topic: Problem: Company
Sprinklr
Linked List Reverse Linked List
Accolite Amazon D-E-Shaw Hike Lybrate
Mahindra Comviva MakeMyTrip MAQ
Software OYO Rooms Paytm Qualcomm
Samsung SAP Labs Snapdeal Veritas
Linked List Linked List Cycle VMWare Walmart Adobe
Accolite Amazon Belzabar Brocade FactSet
Flipkart MakeMyTrip Microsoft OATS
Linked List Merge Two Sorted Lists Systems Oracle Samsung Synopsys Zoho
Amazon Goldman Sachs Kritikal Solutions
Linked List Delete without Head node Microsoft Samsung Visa
Amazon Intuit
Linked List Remove duplicates from an unsorted linked list
Amazon MakeMyTrip
Linked List Sort a linked list of 0s-1s-or-2s Microsoft
Linked List Multiply two numbers represented linked lists Amazon
Adobe Amazon Citicorp Epic Systems
FactSet Hike MAQ Software Monotype
Solutions Morgan Stanley OYO Rooms
Linked List Remove nth node from end of list Accolite Qualcomm Samsung Snapdeal Flipkart
Linked List Reorder List Amazon Microsoft OYO Rooms Intuit
Accolite Amazon D-E-Shaw Hike Lybrate
Mahindra Comviva MakeMyTrip MAQ
Software OYO Rooms Paytm Qualcomm
Samsung SAP Labs Snapdeal Veritas
Linked List Detect and remove loop in a linked list VMWare Walmart Adobe
Write a Function to get the Intersection Point of
Linked List two Linked Lists Amazon
Linked List Flatten a linked list with next and child pointers Google
Linked List Linked list in zig-zag fashion Micorsoft
Linked List Reverse a doubly linked list Walmart
Delete nodes which have a greater value on right
Linked List side Amazon
Linked List Segregate even and odd Elements in a Linked List Walmart
Point to next higher value node in a linked list with
Linked List an Arbitrary Pointer GeekyAnts
Linked List Rearrange a given linked list in place Ola Uber
Linked List Sort Biotonic Doubly Linked Lists Morgan Stanley
Linked List Merge K Sorted Lists Microsoft+ Ola+ eBay
Accolite Adobe Amazon MAQ Software
Linked List Merge sort for linked list Microsoft Paytm Veritas Important
Linked List Quicksort on singly-linked list Paytm Important
Accolite Amazon Flipkart MakeMyTrip
Microsoft Morgan Stanley Qualcomm
Linked List Sum of two linked lists Snapdeal
24*7 Innovation Labs Amazon Drishti-Soft
Flipkart Goldman Sachs Microsoft Paytm
Linked List Flattening a linked list Payu Qualcomm Snapdeal Visa
Linked List Clone a linked list with next and random Pointer Triology
Linked List Subtract two numbers represented as linked lists Amazon Goldman Sachs
Problems Need to be Discussed in Class Room
Topic: Problem: Company
24*7 Innovation Labs Microsoft Samsung
Snapdeal
Stacks & Queues Implement two stacks in an Array
Stacks & Queues Evaluation of Postfix Expression Amazon + Google + Facebook
Stacks & Queues Implement Stack using Queues Facebook
Stacks & Queues Queue Reversal Amazon + Morgain Stanley
Microsoft +Atlassian
Stacks & Queues Implement Stack Queue using Deque
Microsoft + Amdocs
Stacks & Queues Reverse first k elements of queue
Stacks & Queues Design Stack with Middle Operation MaQ Software
Amazon + Samsung + Paytm + Vmware
Stacks & Queues Infix to Postfix inc
Amazon Google Microsoft Visa Goldman
Stacks & Queues Design and Implement Special stack Sachs
Stacks & Queues Longest Valid String Google Microsoft
Find if an expression has duplicate parenthesis Flipkart Oracle OYO Rooms Snapdeal
Stacks & Queues or not Walmart Yatra.com Microsoft Google
Stack permutations check if an array is stack
Stacks & Queues permutation of other Visa
Count natural numbers whose permutation
Stacks & Queues greater number Amazon
Amazon Goldman Sachs IBM Intuit Kuliza
Stacks & Queues Sort a stack using Recursion Yahoo Microsoft
Queue based approach for first non repeating
Stacks & Queues character in a stream Microsoft Flipkart
Stacks & Queues The Celebrity Problem Google + Visa + Apple
Stacks & Queues Next larger Element Visa
Stacks & Queues Distance of nearest cell Flipkar + Facebook
Stacks & Queues Rotten-oranges Facebook
Stacks & Queues Next smaller element Codenation
Stacks & Queues Circular-tour Codenation Flipkart
Stacks & Queues Efficiently implement k-stacks single array Flipkart
Stacks & Queues The celebrity problem Google + Visa + Apple
Stacks & Queues Iterative tower of hanoi Microsoft Flipkart
Find the maximum of minimums for every
Stacks & Queues window size in a given array Amazon Microsoft Flipkart
Stacks & Queues lru cache implementation Microsoft + Uber + Alibaba
Stacks & Queues Find a tour that visits all stations Uber