Data structure Interview Questions

Sort: Popular Date
Sort: Popular Date

“Print a singly-linked list backwards, in constant space and linear time.”

“Implement a function to validate whether a given binary tree is a BST (i.e. write an isBST() function).”

“Convert a binary search tree to a sorted, circular, doubly-linked list, in place (using the tree nodes as the new list nodes).”

“Given a string find the first non-repeated character.”

“Find the second largest element in a Binary Search Tree”

“You have a genealogy:
1) Describe a data structure to represent it.
2) Given any two people within the genealogy, describe an algorithm to determine if they share a common ancestor. You just need…”

“You are given an array with n positive integers where all values in the array are repeated except for one. Return the one that is not repeated.”

“Given 10 cups to locate the bottle poisoned wine from a batch of normal ones, you can make any mixture of them and test your mixtures by mouses. However the density of poison in the mixture, the…”

“Assume that you are given the head and tail pointers of a doubly linked list where each node can also have a single child pointer to another similar doubly linked list. There are no cycles in this…”

“I have a log that consists of more than 100 million lines. Each line is just a data about user login, login time, etc. I want to sort them based on user login, and then if there is a tie based on…”

110 of 118 Interview Questions