Data Structures & Algorithms Interview Questions

Price: $19.95

Data Structures & Algorithms Interview Questions You'll Most Likely Be Asked is a perfect companion to stand ahead above the rest in today’s competitive job market. Rather than going through comprehensive, textbook-sized reference guides, this book includes only the information required immediately for job search to build an IT career. This book puts the interviewee in the driver's seat and helps them steer their way to impress the interviewer.
Table of contents
Data Structures
1. General Concepts Of Data Structures
2. Arrays
3. Stacks
4. Queues
5. Lists
6. Hash Data Structures
7. Trees
8. Sets
9. Graphs
1. General Concepts Of Algorithms
2. Sorting Algorithms
3. Search Algorithms
4. Huffman Coding
HR Questions
a) 200 Data Structures & Algorithms Interview Questions, Answers and proven strategies for getting hired as an IT professional
b) Dozens of examples to respond to interview questions
c) 77 HR Questions with Answers and proven strategies to give specific, impressive, answers that help nail the interviews
d) 2 Aptitude Tests download available on
Sample from the book
(Below Questions and Answers are randomly taken from different pages of the book)
34: What do you mean by stack overflow?
When the user tries to push values into an already full stack, the system is unable to handle the process and throws a stack overflow error. Every stack is defined with a limited memory allocation. When the program dynamically tries to fill the stack beyond this allocated memory limit the stack overflows. Even if the stack memory is dynamically allocated, certain programming errors may cause stack overflow such as very deep or infinite recursion and large stack variables requiring large amount of memory. In these cases, when the memory is exhausted, stack overflow is affected. Another possible stack overflow situation is multi-threading where both the threads lock each other infinitely.
54: What are the differences between a linked list and an array?
The first and foremost difference between an array and a linked list is that array can be accessed randomly, while the linked list has to be accessed sequentially. While in arrays the array index is used to access an element, in linked list, a pointer is used to locate an element. Arrays are stored continuously in the memory while the linked list can be stored in any way since they are accessed using the address. For the same reason, arrays take more time for insertion, updating and deleting while in linked list these operations are easier. Arrays are static while linked lists are dynamic. One array element is not connected to another one with links or addresses, but the linked list elements are inter-connected with links. Arrays need less space when compared to linked lists that require additional space to store the pointers.
122: What are the advantages and disadvantages of Adjacency Matrix?
Adjacency matrices are easier to implement and manage. They are easier to code. The adjacency matrix makes adding and deleting edges easier to implement. The major issues with adjacency matrix are:
a) When we have to deal with large graphs, the matrix consumes a lot of memory. If the graph has x vertices, the matrix has to be of x * x size. Even though it can be dealt by using Sparse sets, the same implementation becomes too expensive for a sparse graph while it is worth for dense graphs.
b) Another issue is that adding and deleting vertices can get quite complex with adjacency matrices. They perform well for analysis purposes.
c) The last and an important issue with adjacent matrix is that when you want to know the adjacent edges of the current vertex and you are implementing DFS algorithm, it becomes very complex.
153: Explain the different techniques used for sorting?
The commonly used sorting techniques are stable & non-stable, adaptive & non-adaptive and in-place and not-in-place algorithms. Stable algorithms are those that never change the order in which similar elements are available in the source. Non-stable algorithms are those that change the order in which similar elements are taken. Adaptive algorithm considers the already ordered elements and does not bother much about them. But non-adaptive algorithms never bother whether an element is already ordered or not. It just follows the sorting over and again till all the elements are sorted. In-place algorithms do not make use of additional arrays or data structures for sorting, whereas, the not-in-place algorithms use temporary array or data structure to store the values being sorted temporarily.
197: What are the variations of Huffman Coding available?
There are many implementations of Huffman coding popularly in use. Some of them are n-ary Huffman coding, Huffman template algorithm, Adaptive Huffman coding, Huffman coding with unequal letter costs, Length-limited Huffman coding, canonical Huffman code and optimal alphabetic binary trees or Hu–Tucker coding. While some of them use Huffman-like algorithms for coding and decoding, some others have totally different considerations for the prefixes. For example, the n-ary Huffman coding uses a range between {0, 1, .., n-1} alphabets to encode instead of the binaries. The Adaptive Huffman coding technique uses the probabilities calculated based on the actual frequencies available, even though it works slower.
Data Structures Interview  ,  Algorithms Interview Questions ,  IT Interview Questions , General Concepts Of Data Structures , Data Structures Lists , Hash Data Structures , Data Structures  Sets , Data Structures Trees ,  Data Structures Graphs , Sorting Algorithms.