Questions
Questions
Questions
com/discuss/interview-question/672135/Dunzo-Online-Assessment-Hackerrank
https://www.geeksforgeeks.org/top-25-interview-questions/
Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[].
Singleton Design pattern. How you make it double ton(in even call of getInstance() first object should be
return and odd call of getInstance() second instance should be return). Make it triple ton.
DP problems,BST
Given two sorted arrays, find the median of them.
segment tree then about the lazy propagation(I said yes). Then he asked the following question
Ques 3: Normal segment tree with update operation on [l, r] and some constant value x s.t add add x to
a[l], x+1 to a[l+1], ……., x+r-l to a[r]. Normal range query i.e calculate the sum in [l, r].
Immutable classes in Java. Started with basic details on how to make any class immutable.
Question 1: House Robber Question link: https://leetcode.com/problems/house-robber/
Question 2: Print boundary Traversal of a Treelink: Boundary Traversal of binary tree
Left View of a Binary Tree (Most optimal solution required O(n) time and O(1) space)link: Print Left View
of a Binary Tree
Height of a Tree
Some question on Tree which can be solved using PostOrder Traversal
Merge Sort vs Quick Sort (which is to be used with Arrays/LinkedLists)
Quick Sort (Discussion on Pivot) – Randomized Quick Sort (Only basic discussion on this)
Find the running median
Internal working of HashSet
Write a code for building a heap and explain its time complexity
ArrayList vs LinkedList (In terms of usage)
Hashtable vs HashMap vs ConcurrentHashMap
50 challenging problems in probability
Explain JAVA memory model.
Design Messenger System.
3. Stateful vs Stateless.
4. What is Caching?
5. How redis store data? Why you use it in your project.
6. Rest v/s Soap
https://www.geeksforgeeks.org/puzzle-round-table-coin-game/
https://www.geeksforgeeks.org/tag/goldman-sachs/page/4/
https://www.geeksforgeeks.org/must-do-coding-questions-for-companies-like-amazon-microsoft-adobe/
https://www.geeksforgeeks.org/geeksforgeeks-special-21-prepare-for-top-tech-companies/?ref=leftbar-rightbar
https://www.geeksforgeeks.org/load-factor-and-rehashing/
Design questions
Lift system
what are reference type in java? I said anything other than primitive types in java are objects and we can
say reference, he then said weak reference ,i said weak,soft and strong references ,I had forgotten their
difference
dependency management .I said what you have written is IoC ,DI is different from Ioc .
How concurrent HashMap works? I explained .I did say it is still not safe to use in multi threaded
environment ,use atomic methods like putIfAbsent . May be he was not aware of it.
Quick Sort Algorithm and its time complexity in best case & worst case
1 Answer
Linked List copy with random nodes
Sort an array of zeros and ones
Delete a specific node
Delete a random node without root
8. Given a linked list, find the mid-node. I gave a solution, I was asked to give a second approach as well.
9. Given a string, swap the nth index with (l-n-1)th index , where l is the length of the string. Have to write
working code.
What is the difference between checked and unchecked exception .Draw the exception hierarchy.
Problem on finding a palindrome on Linked List.
https://www.geeksforgeeks.org/given-a-binary-tree-print-all-root-to-leaf-paths/
find the minimum platform needed to accommodate all trains in station
Mirror of tree
rotate a array of length L by k ,in o(n)
show the code for executor service with fixed thread pool and callable thread
Desing a booking system (basically propose a design with all possible tables in the database)
int findMin(int a[])
// array is sorted in increasing order, but is rotated some spaces i.e. {6, 1, 2, 3, 4, 5} or {4, 5, 6, 1, 2, 3}
// must be completed in O(log n) time .
boolean isPowerOfTen(int x) // Need to handle case where x > INTEGER.MAX_VALUE or < MIN_VALUE
What is DNL
What is cache
Convert 10 based number to 7 based
String compression and one about calculating the maximum average of students' scores in a 2D array.
Design an elevator
looking to test your understanding of how to manipulate data. String manipulation and matrix operations
were focused upon.
looking to test your understanding of how to manipulate data. String manipulation and matrix operations
were focused upon.
Round 4: Tell me the most challenging project you work on again. Have you have any nontechnical
problem , how do you came about it.
Round 5: DS question.
median of two sorted array, hash map implementation, 2nd smallest in a array
- Create Hashmap
- Multi-threading questions - hard (easy if taken Masters level OS course in college)
- Java Garbage collection questions
- Array/String manipulation - Leetcode basic/medium difficulty
- Distributed systems design questions
2D Array, best average calculator using HashMap
Basic data structure questions, like graph, linked list related questions.
Implement BST
[8:20 PM, 5/19/2020] Vibs: Implement a run length encoding function. For a string input the function returns
output encoded as follows: