Skip to content

Latest commit

 

History

History
87 lines (82 loc) · 4.82 KB

README.md

File metadata and controls

87 lines (82 loc) · 4.82 KB

Mobikwik Interview Questions


Coding round questions

  • Given an array of distinct elements, rearrange the elements of an array in zig-zag fashion in O(n) time. The converted array should be in form a < b > c < d > e < f.

  • Find k max in an array and print it.

  • Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting up the rod and selling the pieces.

  • You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount.

  • Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.

  • Convert string to palindrome string with minimum insertions.

  • Given a matrix of n*n. Each cell contain 0, 1, -1. 0 denotes there is no diamond but there is a path. 1 denotes there is a diamond at that location with a path -1 denotes that the path is blocked. Now you have started from 0,0 and reach to the last cell & then return to 0,0 collecting maximum no of diamonds. While going to the last cell you can move only right and down. While returning you can move only left and up.

  • Build a super stack.

     Print value of "peak" after each operation.
     n: the number of operations
    POP: get the value of "peak", if there is no more value after the pop,
          then print "EMPTY".
    PUSH d: put the new value(d) after "peak", then print the value of "peak".
    INC x d : add the new value(d) from index 0 to x elements, then print
              the value of "peak".
    
  • Given a graph of connected and unconnected cities and cost for connecting unconnected cities were provided and we were asked to find minimum cost to connect all cities.


Technical Interview Questions

Data Structures and Algorithms

  • Given a binary tree, print its top, bottom left and right view.
  • Implement queue with two stacks.
  • Level order traversal.
  • Find the LCA of two nodes in BST.
  • Find successor and predecessor of a node in BST.
  • Write a program for solving the Tower of Hanoi problem.
  • Write a program for string reversal through recursion.
  • WAP to reverse Doubly LL.
  • From a given string find the maximum length substring which is a palindrome.
  • Kruskal's MST algorithm.
  • Dijkstra's Algorithm.
  • Write codes for Heap sort, Radix sort and Merge sort.
  • Find whether the linked list has a loop or not.
  • Find the meeting point of the loop in a linked list.
  • Reverse a linked list by recursion.
  • Reverse a stack without using extra memory.
  • Make a balanced BST from the given sorted linked list.
  • Given a string, find the maximum substring having an equal number of 1's an equal number of 0's.
  • Find the total number of ways in which 2 x N strip can be filled with 2 x 1 brick. ( O(log n)).
  • Find the elements having the sum equal to k from BST in O(n) time complexity.
  • Find the maximum square submatrix from a given matrix filled with only '1'.
  • Find 35/3 without using recursion.

DBMS

  • Make a normalised database of Student Database in college, right from ER to normalized relational database.
  • The foreign key, primary key and the entity types.
  • Indexing, clustering and joins.
  • Write a query for the maximum number.
  • Difference between the “having by” and “group by”?

Miscellaneous

  • Principle of OOPS.
  • Multithreading in Java.
  • What is serialization?
  • Briefly explain DNS, TCP, UDP, OSI layer.
  • Why there is some null interface in java? What does it mean? Give me some null interfaces in JAVA?
  • What is JNI?
  • What is a compilation unit?
  • Is string a wrapper class?
  • Why Java is not 100 objects oriented language?
  • What is a resource bundle?
  • Is Iterator a Class or Interface? What is its use?
  • Why do threads block on I/O?
  • What is synchronization and why is it important?
  • How class level lock is acquired?
  • Is null is a keyword in Java?
  • What is checked and unchecked exceptions?
  • Does garbage collection guarantee that a program will not run out of memory?
  • What restrictions are placed on the location of a package statement within a source code file?
  • What is the immediate superclass of the Applet class?
  • What is the size of an empty class in C++ and Java? Why is it not zero? sizeof(); returns 1 in the case of C++.
  • Explain compile time polymorphism and runtime polymorphism.
  • What is the reason for single inheritance in Java?
  • What is the reason for single inheritance in Java ?
  • How to compute 33/5 without using ‘/’, ‘%’ and ‘*’ operator.