InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Accessing free list very frequently for wide range of addresses can lead to(a) paging(b) segmentation fault(c) memory errors(d) cache problemsMy enquiry is from Free List in portion Types of Lists of Data Structures & Algorithms II had been asked this question in an international level competition. |
|
Answer» CORRECT answer is (a) PAGING To EXPLAIN: Paging in/out of DISK will be CAUSED. |
|
| 2. |
How are free blocks linked together mostly and in what addressing order?(a) circular linked list and increasing addressing order(b) linked list and decreasing addressing order(c) linked list and in no addressing order(d) none of the mentionedEnquiry is from Free List topic in section Types of Lists of Data Structures & Algorithms IThis question was addressed to me during an interview for a job. |
|
Answer» Correct answer is (a) circular linked list and increasing addressing order |
|
| 3. |
What are the disadvantages in implementing buddy system algorithm for free lists?(a) internal fragmentation(b) it takes so much space(c) we no more have the hole lists in order of memory address, so it is difficult to detect if 2 holes remain adjacent in memory and shall be merged into one hole(d) both a and c are correctThis intriguing question originated from Free List in division Types of Lists of Data Structures & Algorithms IThe question was posed to me in an online quiz. |
|
Answer» The correct answer is (d) both a and C are correct |
|
| 4. |
How does implicit free lists(garbage collection) works in adding memory to free list ?(a) whichever comes last will be added to free list(b) whichever comes first will be added to free list(c) certain blocks cannot be used if there are no pointers to them and hence they can be freed(d) makes a probabilistic guessI want to ask this question from Free List in division Types of Lists of Data Structures & Algorithms IThe question was posed to me in final exam. |
|
Answer» Right ANSWER is (c) certain blocks cannot be used if there are no pointers to them and HENCE they can be freed |
|
| 5. |
What is buddy memory management of free lists ?(a) modified version of first fit(b) buddy allocation keeps several free lists, each one holds blocks which are of one particular size(c) modified version of best fit(d) a tree representation of free listsI'd like to ask this question from Free List topic in portion Types of Lists of Data Structures & Algorithms IThe question was asked during an interview for a job. |
|
Answer» Correct answer is (b) BUDDY allocation keeps several free lists, each ONE holds blocks which are of one PARTICULAR size |
|
| 6. |
What are different ways of implementing free lists and which is simple among them?(a) best fit, first fit, worst fit, simple-first fit(b) best fit, first fit, worst fit, simple-best fit(c) best fit, first fit, worst fit, simple-worst fit(d) best fitsimple-best fitThis interesting question is from Free List topic in division Types of Lists of Data Structures & Algorithms II had been asked this question by my school teacher while I was bunking the class. |
|
Answer» Correct option is (a) BEST fit, first fit, worst fit, simple-first fit |
|
| 7. |
What datastructures can be used in implementing a free list?(a) only linked list(b) linked list or sort trees(c) arrays(d) treesI need to ask this question from Free List topic in division Types of Lists of Data Structures & Algorithms II had been asked this question in an online interview. |
|
Answer» Right choice is (B) LINKED LIST or sort trees |
|
| 8. |
What are implicit and explicit implementations of freelists?(a) garbage collection and new or malloc operators respectively(b) new or malloc and garbage collection respectively(c) implicit implementation is not favored(d) explicit implementation is not favoredMy question is based upon Free List in section Types of Lists of Data Structures & Algorithms IThis question was addressed to me in exam. |
|
Answer» The CORRECT ANSWER is (a) GARBAGE collection and new or MALLOC operators respectively |
|
| 9. |
Free lists are used in(a) static memory allocation(b) dynamic memory allocation(c) contagious allocations(d) are used for speeding up linked list operationsAsked question is from Free List in division Types of Lists of Data Structures & Algorithms II had been asked this question in an interview. |
|
Answer» RIGHT CHOICE is (B) DYNAMIC memory allocation For explanation: Their property is meant for dynamic allocations. |
|
| 10. |
What does first and last nodes of a xor linked lists contain ? (let address of first and last be A and B)(a) NULL xor A and B xor NULL(b) NULL and NULL(c) A and B(d) NULL xor A and BMy doubt is from Xor Linked List topic in section Types of Lists of Data Structures & Algorithms IThis question was addressed to me at a job interview. |
|
Answer» The correct answer is (a) NULL XOR A and B xor NULL |
|
| 11. |
What does a xor linked list have?(a) every node stores the XOR of addresses of previous and next nodes(b) actuall memory address of next node(c) every node stores the XOR of addresses of previous and next two nodes(d) every node stores xor 0 and the current node addressThis is a very interesting question from Xor Linked List in portion Types of Lists of Data Structures & Algorithms IThis question was posed to me in class test. |
|
Answer» The correct CHOICE is (a) EVERY NODE STORES the XOR of ADDRESSES of previous and next nodes |
|
| 12. |
What is xor linked list?(a) uses of bitwise XOR operation to decrease storage requirements for doubly linked lists(b) uses of bitwise XOR operation to decrease storage requirements for linked lists(c) uses of bitwise operations to decrease storage requirements for doubly linked lists(d) just another form of linked listQuestion is taken from Xor Linked List in portion Types of Lists of Data Structures & Algorithms II got this question by my college director while I was bunking the class. |
|
Answer» CORRECT answer is (a) uses of bitwise XOR OPERATION to decrease storage requirements for doubly LINKED lists For explanation: Why we USE bitwise XOR operation is to decrease storage requirements for doubly linked lists. |
|
| 13. |
Which of the following is not the rearranging method used to implement self-organizing lists?(a) count method(b) move to front method(c) ordering method(d) least frequently usedEnquiry is from Types of Lists topic in chapter Types of Lists of Data Structures & Algorithms II had been asked this question during an internship interview. |
|
Answer» Correct answer is (d) least frequently USED |
|
| 14. |
The self organizing list improves _____(a) average access time(b) insertion(c) deletion(d) binary searchThis question is from Types of Lists topic in division Types of Lists of Data Structures & Algorithms IThis question was posed to me during an online exam. |
|
Answer» RIGHT option is (a) average access time Easy explanation - The self-organizing list rearranges the nodes based on the access PROBABILITIES of the nodes. So the required ELEMENTS can be LOCATED efficiently. Therefore, self-organizing list is mainly used to improve the average access time. |
|
| 15. |
Which of the following method performs poorly when elements are accessed in sequential order?(a) count method(b) move to front method(c) transpose meth(d) ordering methodI'd like to ask this question from Types of Lists topic in chapter Types of Lists of Data Structures & Algorithms IThis question was addressed to me in a job interview. |
|
Answer» Right CHOICE is (b) move to FRONT method |
|
| 16. |
What technique is used in Transpose method?(a) searched node is swapped with its predecessor(b) node with highest access count is moved to head of the list(c) searched node is swapped with the head of list(d) searched nodes are rearranged based on their proximity to the head nodeMy question is based upon Types of Lists topic in chapter Types of Lists of Data Structures & Algorithms II had been asked this question in an online quiz. |
|
Answer» Correct option is (a) searched node is swapped with its predecessor |
|
| 17. |
Symbol tables during compilation of program is efficiently implemented using __________(a) a singly linked list(b) a doubly linked list(c) a self organizing list(d) an arrayThis question is from Types of Lists in chapter Types of Lists of Data Structures & Algorithms II had been asked this question by my college director while I was bunking the class. |
|
Answer» The correct ANSWER is (c) a self ORGANIZING list |
|
| 18. |
In _____________ method, whenever a node is accessed, it might move to the head of the list if its number of accesses becomes greater than the records preceding it.(a) least recently used(b) count(c) traspose(d) exchangeMy doubt stems from Types of Lists topic in section Types of Lists of Data Structures & Algorithms IThe question was posed to me in examination. |
|
Answer» The correct answer is (b) count |
|
| 19. |
Which of the following data structure is preferred to have lesser search time when the list size is small?(a) search tree(b) sorted list(c) self organizing list(d) linked listThis intriguing question comes from Types of Lists topic in chapter Types of Lists of Data Structures & Algorithms II had been asked this question during an interview. |
|
Answer» Correct answer is (c) self organizing list |
|
| 20. |
The worst case running time of a linear search on the self organizing list is ____(a) O(1)(b) O(logn)(c) O(n)(d) O(n^2)This key question is from Types of Lists in section Types of Lists of Data Structures & Algorithms IThis question was addressed to me during an interview. |
|
Answer» The correct answer is (C) O(n) |
|
| 21. |
Which of the following is true about the Move-To-Front Method for rearranging nodes?(a) node with highest access count is moved to head of the list(b) requires extra storage(c) may over-reward infrequently accessed nodes(d) requires a counter for each nodeI'd like to ask this question from Types of Lists in chapter Types of Lists of Data Structures & Algorithms II had been asked this question in an internship interview. |
|
Answer» The correct option is (c) may over-reward infrequently accessed nodes |
|
| 22. |
The self organizing list improves the efficiency of _______(a) binary search(b) jump search(c) sublist search(d) linear searchMy doubt is from Types of Lists in section Types of Lists of Data Structures & Algorithms II got this question during an internship interview. |
|
Answer» The correct OPTION is (d) linear search |
|
| 23. |
What is indexed skip list?(a) it stores width of link in place of element(b) it stores index values(c) array based linked list(d) indexed treeI want to ask this question from Skip List topic in chapter Types of Lists of Data Structures & Algorithms IThe question was asked during an online interview. |
|
Answer» CORRECT answer is (a) it stores width of link in place of element The best explanation: The width is DEFINED as number of BOTTOM layer LINKS that are being traversed by each of higher layer elements. e.g: for a level-2 skip LISTS, all level-1 nodes have 1 as width, for level-2 width will be 2. |
|
| 24. |
Is a skip list like balanced tree?(a) true(b) falseI would like to ask this question from Skip List in division Types of Lists of Data Structures & Algorithms IThis question was addressed to me at a job interview. |
|
Answer» RIGHT ANSWER is (a) true Explanation: Skip list behaves as a BALANCED tree with HIGH probability and can be commented as such because nodes with different heights are MIXED up evenly. |
|
| 25. |
How to maintain multi-level skip list properties when insertions and deletions are done?(a) design each level of a multi-level skip list with varied probabilities(b) that cannot be maintained(c) rebalancing of lists(d) reconstructionAsked question is from Skip List in chapter Types of Lists of Data Structures & Algorithms IThe question was asked in semester exam. |
|
Answer» The correct answer is (a) design each level of a multi-level skip list with VARIED probabilities |
|
| 26. |
Are the below statements true about skiplists?In a sorted set of elements skip lists can implement the below operationsi.given a element find closest element to the given value in the sorted set in O(logn)ii.find the number of elements in the set whose values fall a given range in O(logn)(a) true(b) falseThis is a very interesting question from Skip List topic in section Types of Lists of Data Structures & Algorithms IThis question was addressed to me during a job interview. |
|
Answer» Right option is (a) true |
|
| 27. |
The nodes in a skip list may have many forward references. their number is determined(a) probabilistically(b) randomly(c) sequentially(d) orthogonallyAsked question is from Skip List in chapter Types of Lists of Data Structures & Algorithms IThis question was posed to me in examination. |
|
Answer» RIGHT ANSWER is (a) probabilistically Easy explanation - The number of forward references are determined probabilistically, that is why SKIP list is a probabilistic algorithm. |
|
| 28. |
To which datastructure are skip lists similar to in terms of time complexities in worst and best cases?(a) balanced binary search trees(b) binary search trees(c) binary trees(d) linked listsThe doubt is from Skip List in chapter Types of Lists of Data Structures & Algorithms IThis question was posed to me during a job interview. |
|
Answer» Correct answer is (a) balanced BINARY search trees |
|
| 29. |
What is the time complexity improvement of skip lists from linked lists in insertion and deletion?(a) O(n) to O(logn) where n is number of elements(b) O(n) to O(1) where n is number of elements(c) no change(d) O(n) to O(n^2) where n is number of elementsThis interesting question is from Skip List topic in portion Types of Lists of Data Structures & Algorithms II got this question in homework. |
|
Answer» The correct CHOICE is (a) O(n) to O(logn) where n is NUMBER of elements |
|
| 30. |
Skip lists are similar to which of the following datastructure?(a) stack(b) heap(c) binary search tree(d) balanced binary search treeOrigin of the question is Skip List topic in portion Types of Lists of Data Structures & Algorithms IThis question was posed to me in a job interview. |
|
Answer» The correct choice is (d) balanced binary search tree |
|
| 31. |
What is a skip list?(a) a linkedlist with size value in nodes(b) a linkedlist that allows faster search within an ordered sequence(c) a linkedlist that allows slower search within an ordered sequence(d) a tree which is in the form of linked listThe doubt is from Skip List in portion Types of Lists of Data Structures & Algorithms IThis question was posed to me in homework. |
|
Answer» Correct answer is (b) a linkedlist that allows faster search within an ORDERED sequence |
|