Data Structure interview questions – page 13
893 questions. Tap “Show answer” to check yourself.
-
Write the pseudocode and C++/Java code to mirror a binary tree.
-
Design a data structure which will support the following operation : given a seven letter word, return all valid words which are anagrams of this word. He wanted a data structure which would be optimized for space, and another one optimized for ti...
-
Given a very very long linked list with 'n' nodes. Also given a positive integer 't'>1. Delete every 't'th node. In the resultant linked list, again delete 't'th node. Repeat this till only t-1 nodes remains. Find the node.
-
Code your own implementation of Doubly linkedlists, Binary Tree
-
Given a array, find k increasing numbers whose summation will be maximum.
-
Convert Sorted Array to Balanced Binary Search Tree (BST)
-
BST vs Hash Tables, how to decide to choose one of them?
-
Middle of a linked list
-
You have mobile phone. In a mobile phone, you are required to find a suitable data structure to store the names and search and retrieve them very efficiently. We can assume that there is very limited memory as it is an embedded device. Also we nee...
-
What is an AVL tree? How is it created?
-
Given a binary tree, find out if the tree can be folded or not.
-
Assume your computer is reading characters one by one from a stream (you don't know the length of the stream before ending). Note that you have only one character of storage space (so you can't save the characters you've read to a something like a...
- Advertisement
-
Given two strings like x="hello" and y="open", remove any character from string x which is also used in string y, thus making the result x="hll"
-
Write a method to find the smallest angle between two hands when the time is given as input???
-
They asked to write a program to merge two sorted lists..
-
Write a program for deleting a node in Doubly Linked list.
-
Write an optimized function to check whether to strings are anagram of each other.
-
Write a function to check if the two passed strings are anagrams of each other.
-
Anagram: Different words containing same letters. eg., ATE, TEA, EAT
-
Given a large file containing orders placed in a day. Find the top k order with maximum costs.
-
I have a linked list contains all of the alphabets from A to Z. I want to find the letter Q in the list, how does you perform the search to find the
-
If F and L are the pointers to the first and last elements in a linked list, then which of the following operations is dependent on the length of the list? a. delete the first element in the list b. insert a new element as a first elem...
-
Given a binary tree, find 2 leaf nodes say X and Y such that F(X,Y) is maximum where F(X,Y) = sum of nodes in the path from root to X + sum of nodes in the path from root to Y - sum of nodes in the common path from root to first common ancestor of...
-
Write your own strcmp and strcat functions in C.
- Advertisement
-
How do u find the largest repeating string and the number of times it repeats in a given string efficiently offcourse !?
-
Given a sorted array which is rotated circularly x times. find x very optimally
-
Find the largest common subtree of two given BSTs/BTs
-
Given a BST, write a program to find kth largest node.
-
Suppose there is a binary tree having millions of nodes and by mistake one node has two indegree........(i.e. There becomes a cycle/loop in that tree ...u have to find that node which is having two indegree.... Constraint is no extra memory ...
-
Perform inplace(we cant create new node)merge of two sorted linked lists.