Tech Architect

Ques:- U r given an integer array of size n, filled with numbers 1 to n randomly. Each number occurs exactly once. Two of them are replaced by 0(zero). Find out those numbers in O(n) time.
Ques:- Function to display the directory structure in a user friendly way taking root dir as arg for a general OS. You may assume and state some basic APIs available in that OS
Ques:- What data structure would you use to store distances between all the planets in a galaxy. (So there could be like a billion planets)
Ques:- Giving a Grid in 2D array like this where each cell has a cost from 1-9
Ques:- Given n points of structure
Ques:- Design a data structure that supports integer of unlimited size.Assume that you have unlimited memory. Implement functions to support addition and subtraction.
Ques:- Find all pairs in array such that a+b=x, a != b. you have to specify all space and time complexities…fairly standard problem-
Ques:- Given two linked list. We have to find that whether the data in one is reverse that of data in other. No extra space is to be used and traverse the lists only once
Ques:- Given two strings, program to find if one string is cyclic form of the other.
Ques:- A special type of tree is given, where all leaf are marked with L and others are marked with N. every node can have 0 or at most 2 nodes. Trees preorder traversal is given give a algorithm to build tree from this traversal.
Ques:- Print the last “k” elements in a singly-linked list.
Ques:- Reverse the string word by word e.g. “My name is pradeep” .. o/p shd be “pradeep is name My” …intwer expecting a 1 traversal algo
Ques:- Merge two linklist without using any extra space…
Ques:- Given a string, first remove all repeated consecutive substring with length 1, then delete substring of length 2 and so on… Example : string is abcabeccced
Ques:- Given two strings a and b. Length of b is much smaller than a. Check if a contains an anagram of b
Ques:- Given two sorted array and in the second array u have as many extra space as no of elements in first array. you have to sort the second array which will contain all the element from first array also. Do it in O(n) time complexity witho…
Ques:- How do you delete duplicate elements from an unsorted array in place(no extra space) Try to do it in time less than O(nlogn)
Ques:- Given two strings find the combination of strings which can be interleave i/p: if “AB” and “CD” are two strings o/p: ABCD ACBD ACDB ACBD CABD CDAB
Ques:- Given a root and a node of a binary tree, write a function which finds all the nodes which are a 'k' distance from the give node. (distance can be upwards and downwards)
Ques:- Inserting an element into a sorted linked list.
Ques:- Find bugs in the xstrrev function.
Ques:- Given two n-ary trees T1 and T2. Write a program to check if T1 has T2 in it.
Ques:- Given a list of words …you have infinite pre-processing time.Now you are given a word…output all the words from the dictionary that are anagram of this word as efficiently as possible.
Ques:- Array of integers like 10 12 16 17 24 27 8 6 5 4 2. From 10 to 27 it is in increasing order and then decreasing order starts. So he asked me to find the position from where decreasing starts. it should be done in O(logn).
Ques:- Given a sorting order string, sort the input string based on the given sorting order string. Ex sorting order string -> dfbcae Input string -> abcdeeabc output -> dbbccaaee
Ques:- Code your own implementation of Doubly linkedlists, Binary Tree
Ques:- Given a large file containing orders placed in a day. Find the top k order with maximum costs.
Ques:- 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…
Ques:- Write your own strcmp and strcat functions in C.
Ques:- 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 …
Scroll to top