Paytm
Interview Questions and Answers
Q1. Separate out 0's, 1's, and 2's in an array
Separate out 0's, 1's, and 2's in an array
Create three variables to count the number of 0's, 1's, and 2's in the array
Loop through the array and increment the respective variable for each occurrence
Create a new array and add the counted number of 0's, 1's, and 2's in order
Q2. Design system for gaming android app like ludo.
Design a system for a gaming android app like ludo.
Implement game logic for ludo including dice rolling, moving pieces, and winning conditions.
Create a user interface with a game board, player pieces, and dice.
Incorporate multiplayer functionality for online play.
Include features like in-game chat, leaderboards, and customizable game settings.
Utilize a backend server to handle game synchronization and data storage.
Q3. Remove duplicates from the given array
Remove duplicates from given array of strings
Create a new empty array
Loop through the original array and check if the element already exists in the new array
If not, add it to the new array
Return the new array
Q4. Detect a loop in linked list
Loop in linked list can be detected using Floyd's cycle-finding algorithm.
Floyd's cycle-finding algorithm uses two pointers, one moving at twice the speed of the other.
If there is a loop, the faster pointer will eventually catch up to the slower pointer.
If there is no loop, the faster pointer will reach the end of the list.
Time complexity of this algorithm is O(n) and space complexity is O(1).
Q5. search in rotated binary search
Search for a target value in a rotated sorted array using binary search
Find the pivot point where the array is rotated
Determine which half of the array the target value lies in
Perform binary search on the appropriate half of the array
Q6. Design YT recommendation system
Designing a recommendation system for YouTube
Utilize collaborative filtering to recommend videos based on user preferences
Incorporate content-based filtering to suggest videos similar to ones previously watched
Implement a hybrid approach combining collaborative and content-based filtering for more accurate recommendations
Q7. make a method thread safe
Use synchronization mechanisms like locks or synchronized blocks to ensure only one thread can access the method at a time.
Use synchronized keyword in method signature
Use synchronized blocks inside the method
Use ReentrantLock for more fine-grained control
Q8. PRoduct array itself
A product array is an array of strings representing different products.
Each element in the array is a string representing a product
Example: ['iPhone', 'Samsung Galaxy', 'Google Pixel']
Can be used to store and manipulate a list of products
Interview Process at null
Top Technical Lead Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month