Tech Architect interview questions – page 8

1,161 questions. Tap “Show answer” to check yourself.

Advertisement
  1. Given a long string, arrange the words in alphabetical order, delete the duplicates and output the words with their frequency.

  2. Define a data struct for the search engine which will represent whether given word is there in the document or not .It should be fast.

  3. Traverse a tree in preorder fashion

  4. How to insert and delete a node in a sorted linked list?

  5. Implementation and test cases for compare(string str1, string str2)

  6. Given a complete binary search tree in a array. Write a sort function to sort the array in O(n) time-complexity and at constant memory.

  7. Given two values k1 and k2 and a root pointer to a BST. Print all numbers b/w k1 and k2 in increasing order i.e. k1<=x<=k2 where x is an element of tree.

  8. Insert a node into a circular linked list. This CLL is sorted. So, if the CLL is like 1->2->4->6->1 you will be asked to input a node 3 and it must come between 2 and 4. Write a program for this in C++ or JAVA

  9. Given a linked list in sorted order,now it is broken at a point and rearranged.

  10. Given a word and a file containing words in the dictionary find anagrams of that word.

  11. WAP for inplace removal of vowels from a char string

  12. Find the number of strings of length n having u uppercase letters , l lowercase letters and d digits

  13. Advertisement
  14. Given a large linked list and a small linked list, efficiently find the common elements in two LLs.

  15. Merge two BST into One. BST t2 is merged into BST t1.

  16. Tree traversals .. non recursive and recursive ...

  17. How would you allocate memory for a 2d array, using malloc only once... after the allocation the elements of the array shud be accessible by normal notation a[i][j] i.e. its not desired to access the elements in the form *(a+i*rows+col)

  18. Provided a string S of words and no of character per line m ,with m being greater than the longest phrase in S,print S in a set of lines so that every single line includes no far more than m characters and no phrase split between two lines.

  19. A Binary Tree is represented in an int array such that if P is parent and c is its children..a[c]=p a) Construct a Binary Tree if Such An Array is given b) uve given an index of node representing root of sub tree.. If we ignore t...

  20. Given a binary tree with no size limitation, write a program to find the sum of each vertical level and store the result in an appropriate data structure (Note: You cannot use an array as the tree can be of any size).

  21. You are given two strings A and B, you have to find out whether all the characters of A are present in B or not?

  22. Print an integer using only putchar. Try doing it without using extra storage

  23. When the variables are pushed into the stack, which method is used to retrieve them from it. a) pop b) pull c) remove d) none of these.

  24. A recursive function was given...we were asked to draw the recursion tree and give the output-----5 marks the function took an array of 5 elements all initialized to zero as input void somefun(int a[],int n,int size) a is array,n...

  25. Pick the odd man out a. malloc b. calloc c. realloc d. free

  26. Advertisement
  27. Size of integer and pointer? are they always same?

  28. What class is used to display the ALV grid control?

  29. How to convert decimal to octal and hexadecimal?

  30. How do you pass a string to a function by its value ?

  31. Write your own memcopy function

  32. How much space is allocated by the expression " int *a[10]" if size of int is 4 and size of int pointer is 2

Advertisement