Tech Architect interview questions – page 7
1,161 questions. Tap “Show answer” to check yourself.
-
You are given a doubly link list and out of some nodes of this doubly linked list, some other doubly link list emerge and from some of these emerging doubly linked list, more doubly link list emerge. You have to write a quick algo that merges all ...
-
Numbers are randomly generated and passed to a method. Write a program to find and maintain the median value as new values are generated.
-
You are given a node of a tree. The node is defined as below:
-
How to merge two Binary Search Trees?
-
Write a function that would: return the 5th element from the end in a singly linked list of integers, in one pass, and then provide a set of test cases against that function
-
There is an unsorted list of elements whose key values are different unique time stamps. For a given time stamp, find the 5 nearest above time stamps and 5 nearest below time stamps. What is the efficient algorithm to do this in O(n) compleity </p...
-
Given a Binary Search Tree with many duplicates. Assume that while building the BST , the equal values are inserted in the left sub-tree. You just have the root pointer of the tree. Give an algorithm to delete the duplicate values. However t...
-
Code to get the max depth of binary tree - I used recursion - How would you do it without recursion?
-
Write a fully functional C Function. Which when given a string containing numerals only. Returns a link list of those numerals. For e.g. If 1234 is given . Then return a link list such that 1-> 2-> 3-> 4 ->...
-
You have an array of random real numbers sorted in descending order. You want to divide the array in 2 halves such that sum of the upper half is equal to or as close as possible to sum of lower half.
-
Let a stack data structure supports getMax() Operation. We maintain "max" of the stack at any time. so that we can simply return this value whenever getMax() is called.
-
You are given a two dimensional array which has numbers.If there is a zero in any place, make all elements of that row and column as zeroes.
- Advertisement
-
Assume that a full binary search tree is represented in an array with the heap like structure, (ie) A[i]'s left child is stored in A[2i) and the right child is in A(2i + 1]. Given an index 'i' return the index of the inorder successor of the eleme...
-
Given Pre-Order of a Binary Tree. Construct the Binary Tree Using that order.?
-
Find the second max number in a binary search tree
-
No of leaf and non leaf nodes in a binary tree tree of depth k..
-
What's the max look up time for a binary tree?
-
How would you reverse a doubly-linked list?
-
Given a binary tree. Find the max sub-tree (having max no of nodes) that form BST in this binary tree.
-
Implement class Stack using a linked list
-
Why linklist is preffered over Array ?
-
Boolean tree problem?
-
Find the two nodes in Binary Tree which have longest distance between them.
-
Consider an array 'A' of n elements. Let A[0] to A[k-1] ( The first K members of the array A ) form the first window of the array where 0<k<n. Now you have to find the maximum number of the window and display it. After displaying it the wind...
- Advertisement
-
Write a program to check whether a given binary tree is mirror of itself.
-
Write a function which finds a substring in a string and replaces all occurrences with another string. Prototype of the function : char* FindReplace(char* src, char* find, char* replace);
-
Design a data structure where push is similar to normal queue, but pop deletes one instance of the last inserted most-frequently occuring element.
-
You are provided with a stream of integers, design a data structure to store the number of occurrences of each integer.
-
Remove duplicates from a given unsorted array.
-
Removing all the repeated character of string in O(1) space given all would be in [A-Z a-z]