4. The same holds for an algorithm when the
data are not stored in an efficient format
appropriate to the application.
All algorithms primarily deal with data and the
way the data is organized affects the
performance of the algorithm.
Why are most of the interview
questions in Data Structures?
5. Data structures refer to the particular way in
which data is stored and organized and the
allowed operations on the data
The efficiency of an algorithm depends on the
data structure used.
What is Data Structures?
6. Basics
Remember you cannot jump to problems
without basics so make sure you study the
books first.
Books like
Yashwant Kanetkar - Coding
Lipschutz Seymour – Basics
Anany Levitin – Analysis of Algorithms
Cormen, Leiserson, Rivest – Inside out
Preparation
7. Stack
Queue
Array
Linked list
Tree
Binary tree
Binary search tree
Trie
Graph
Hash table
Sorting Techniques
Basics
8. Linked List / Trees
Insertion
Deletion
Traversal
Graph
DFS
BFS
Algorithms
9. Basic insertion, deletion algorithms
With real interview problems
Resources
http://www.geeksforgeeks.org/
http://www.careercup.com/
Practice, Practice and Practice
10. Question
Known
Twist on known problem
unknown
Nature
Easy
Tough
Easy
Knowledge
Intelligence
Easy for everyone? – Optimization matters
Tough
don’t panic - Can struggle on a question
talk loud
Walk through
11. Understand problem
Ask questions
Resolve ambiguity – Eg. reverse a list
Algorithm or code - based on company
linked list - singly or doubly linked
list – array or linked list
Tree - Binary or binary search tree
Verbal communication – clear and concise
All interviewed make mistakes – good ones –
rectify
Walk through (contd…)
13. Highlight in resume
I am smart
I can code
Independent projects not part of curriculum
Shows your interest in studies
Resume
14. Learning Phase
In paper
In computer
Find bugs
Remember practice
Rectify
Language to code – C, C++, Java
If first pseudocode – make sure u also write
code
Coding
15. 1. Proper indentation
2. Proper visibility (public / private)
3. Modular programming
4. Usage of object oriented concepts
5. Proper comments before each function
6. Proper and appropriate naming of functions and
variables
7. Proper passing of parameters and not using
global variables
Coding
16. Try with examples – get logic
Seen a similar problem – convert to it
Mathematical induction
Try for small problems and solve for the bigger
problem
Data structures?
– Choose appropriate to your application
Approaches