Filter interviews by
I applied via Approached by Company and was interviewed in Apr 2022. There were 2 interview rounds.
Given an array of digits, find the largest multiple of 3 that can be formed from the digits.
Sort the array in descending order.
If the sum of digits is divisible by 3, return the array as a string.
If the sum of digits modulo 3 is 1, remove the smallest digit that has a remainder of 1 when divided by 3, or the two smallest digits that have a remainder of 2 when divided by 3.
If the sum of digits modulo 3 is 2, remove the ...
Function to return mutual friends given two ids and getFriends(id) function
Call getFriends(id) for both ids to get their respective friend lists
Iterate through both lists and compare to find mutual friends
Return the list of mutual friends
Function to return list of friends of friends in decreasing order of mutual friends
Use a set to store all friends of friends
Iterate through the list of friends of the given id
For each friend, iterate through their list of friends and count mutual friends
Sort the set of friends of friends by decreasing number of mutual friends
Given time slots, find a specific time with maximum overlap. Prove solution.
Create a list of all start and end times
Sort the list in ascending order
Iterate through the list and keep track of the number of overlaps at each time
Return the time with the maximum number of overlaps
Prove solution by testing with different input sizes and edge cases
Find the longest sub-array with increasing order of integers.
Iterate through the array and keep track of the current sub-array's start and end indices.
Update the start index whenever the current element is smaller than the previous element.
Update the end index whenever the current element is greater than or equal to the next element.
Calculate the length of the sub-array and compare it with the longest sub-array found s
Find the length of longest increasing subsequence and print the sequence from an array of integers.
Use dynamic programming to solve the problem
Create an array to store the length of longest increasing subsequence ending at each index
Traverse the array and update the length of longest increasing subsequence for each index
Print the sequence by backtracking from the index with the maximum length
Time complexity: O(n^2)
Exam...
Code to find a given integer in a rotated sorted array.
Use binary search to find the pivot point where the array is rotated.
Divide the array into two subarrays and perform binary search on the appropriate subarray.
Handle edge cases such as the target integer not being present in the array.
Use a min-heap to keep track of the largest K numbers seen so far.
Create a min-heap of size K.
For each incoming integer, add it to the heap if it's larger than the smallest element in the heap.
If the heap size exceeds K, remove the smallest element.
At the end, the heap will contain the largest K numbers in the input.
LRU Cache is a data structure that stores the most recently used items and discards the least recently used items.
Use a doubly linked list to keep track of the order of items in the cache
Use a hash map to store the key-value pairs for fast access
When an item is accessed, move it to the front of the linked list
When the cache is full, remove the least recently used item from the back of the linked list and the hash map
I was interviewed in Dec 2016.
I applied via Campus Placement and was interviewed in Dec 2016. There were 4 interview rounds.
Given a 2D matrix with doors and walls, fill distance matrix with minimum distance to the nearest door.
Iterate through the matrix and find the doors
Use Breadth-First Search (BFS) to calculate the minimum distance from each cell to the nearest door
Update the distance matrix with the minimum distances
Find kth smallest element in unordered array with O(1) space
Use the QuickSelect algorithm to partition the array and find the kth smallest element
Choose a pivot element and partition the array into two subarrays
Recursively partition the subarray that contains the kth smallest element
Repeat until the pivot element is the kth smallest element
Time complexity: O(n) average case, O(n^2) worst case
To find friends of friends who are not already friends with you, we can first find your friends and then their friends excluding yourself and your friends.
Get your list of friends
For each friend, get their list of friends
Exclude yourself and your friends from the final list of friends of friends
I was interviewed before Apr 2021.
Round duration - 60 minutes
Round difficulty - Medium
It started with an informal talk after he gave his introduction. We talked about the cyclone that was going to be there and what I did in my internship and my previous projects. Then we moved to questions. After solving both questions he asked if I had questions.
Given an array of distinct positive integers and a number 'K', your task is to find the K'th largest element in the array.
Array: [2,1,5,6,3,8], K ...
Find the Kth largest element in an array of distinct positive integers.
Sort the array in non-increasing order
Return the Kth element from the sorted array
Handle multiple test cases
Consider a grid containing oranges. Each cell in this grid can hold one of three integer values:
The task is to determine the minimum time required for all fresh oranges to become rotten in a grid.
Create a queue to store the rotten oranges and their time of rotting.
Iterate through the grid to find the initial rotten oranges and add them to the queue.
Perform BFS by popping each rotten orange from the queue, rot adjacent fresh oranges, and add them to the queue with updated time.
Continue until the queue is empty, ke...
Round duration - 45 minutes
Round difficulty - Easy
This was a design round.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I was interviewed before May 2021.
Round duration - 120 minutes
Round difficulty - Easy
It was a mix of mathematical aptitude, logical ability, and puzzles along with 2 programming questions of easy and medium levels. Time was enough and no sectional time was present. 1-2 MCQs on SQL was also present.
Given a 2-dimensional boolean matrix mat
of size N x M, your task is to modify the matrix such that if any element is 1, set its entire row and column to 1. Specifi...
Modify a boolean matrix such that if any element is 1, set its entire row and column to 1.
Iterate through the matrix to find elements with value 1
Store the row and column indices of these elements
Update the entire row and column for each element found to be 1
Round duration - 60 minutes
Round difficulty - Easy
It was an online video interview round on HackerEarth with a simultaneous code option. It was mostly justifying your resume in the first 15 minutes. After that OOPS was majorly asked. Basics of programming including questions on STL were asked. A class that required inheritance was asked by the interviewer to write. I was helped by the interviewer if I got stuck somewhere, Some questions on the implementation of hashmaps and priority queues were also asked. A puzzle was asked which luckily struct to me at that moment.
Tip 1 : Clear basics
Tip 2 : Prepare well
Tip 3 : Do at-least 2 projects
Tip 1 : Write only those things in resume in which you are 100% confident
Tip 2 : Write maximum projects you have and be ready to explain them thoroughly
Content Moderator
292
salaries
| ₹0 L/yr - ₹0 L/yr |
Quality Analyst
225
salaries
| ₹0 L/yr - ₹0 L/yr |
Content Reviewer
84
salaries
| ₹0 L/yr - ₹0 L/yr |
SME
68
salaries
| ₹0 L/yr - ₹0 L/yr |
Accounts Manager
48
salaries
| ₹0 L/yr - ₹0 L/yr |
TikTok
Udaan