Some memory based questions:

  1. Time complexity to find the maximum element in the min heap and explain the method?
  2. Given an array of length $n$ and a number $x$ find out two such elements in the array such that their sum is equal to the number $x.$
  3. Given an array of length $n,$ find two numbers such that their sum is equal to the rest of $n-2$ elements if there exist such case?
  4. Two linked lists are given and due to programming error end node of first linked list is now pointing to some node of second linked list, how will you find that node? and you don't know which one is $1^{\text{st}}$ linked list and which one is $2^{\text{nd}}.$ The data values are not distinct.
  5. Define joint probability in terms of conditional probability?
  6. How will you find a cycle in a directed graph? some questions on forward edge and back edge.
  7. Sort an array of $n$ elements with k distinct elements optimally. How will you find the distinct elements in the array optimally
  8. A $n\ast n$ matrix is given such that $A_{ij} = A_{ji},$ what will be the rank of this matrix?
  9. How many different values a random variable can take with zero variance and why?
  10. Prove that a directed acyclic graph has atleast one vertex with zero indegree.
  11. Various ways to solve subset sum . Variations of the same problem.
  12. Algorithm to get maximally connected graph having two components.
  13. Suppose we have $A\ast B.$ If we know determinant of $A$ is $1.$ What can we tell about Rank of $A\ast B$ in terms of $B.$
  14. Give $O(k\log k)$ algorithm for finding $k$ minimum element.
  15. Prove two vertices of a graph have same degree.
posted May 26, 2021
2
Like
0
Love
0
Haha
0
Wow
0
Angry
0
Sad

1 Comment