Filter interviews by
Clear (1)
Hashmap problem involving storing and retrieving data efficiently.
Hashmap is a data structure that stores key-value pairs.
It allows for fast retrieval of values based on keys.
Examples include storing student grades by student ID, or mapping employee names to their salaries.
Top trending discussions
Find an index in array where sum of elements on left side is equal to sum of elements on right side.
Loop through array and calculate sum of all elements
Then loop through array again and check if sum of elements on left side is equal to sum of elements on right side
Return the index if found, else return -1
Find minimum number of jumps required to reach end of array with max moves in right direction at each index.
Use dynamic programming approach to solve the problem
Maintain an array to store minimum number of jumps required to reach each index
Traverse the array and update the minimum number of jumps for each index
Return the minimum number of jumps required to reach the end of array
Tournament tree is a binary tree where each node represents a match between two players/teams.
Tournament tree is used in sports tournaments to determine the winner.
The leaf nodes represent the players/teams and the internal nodes represent the matches.
The winner of each match is the node with the higher score.
Code can be written using a recursive function to traverse the tree and determine the winner.
Find 2 maximum elements in array in O(n+log(n)) comparison
Use divide and conquer approach
Divide array into two halves
Recursively find max elements in each half
Compare the two max elements to find the overall max elements
Find row with maximum 1s in a sorted 2D array of 0s and 1s.
Use binary search to find the first occurrence of 1 in each row.
Calculate the number of 1s in each row using the index found in step 1.
Keep track of the row with maximum number of 1s.
Time complexity: O(m log n), where m is the number of rows and n is the number of columns.
Efficiently check if a number is present in an array where each element differs by 1.
Use binary search to find the element in the array
Calculate the difference between the middle element and the first element
If the difference is equal to the index of the middle element minus the index of the first element, then the left half of the array is consecutive
If the difference is not equal, then the right half of the array is ...
Microsoft Excel
Add more chart types (p1)
Improve collaboration features (p2)
Enhance data analysis tools (p3)
Integrate with more external data sources (p4)
Improve error handling and debugging (p5)
Program to rearrange shuffled 16 squares to get original big square
Create a 4x4 matrix to represent the big square and fill it with shuffled squares
Loop through the matrix and check if each square is in the correct position
If a square is not in the correct position, swap it with the square in the correct position
Repeat until all squares are in the correct position
The first declaration casts i to int pointer and dereferences it, while the second declaration casts the address of i to int pointer and dereferences it.
The first declaration assumes i is already an int pointer.
The second declaration takes the address of i and casts it to an int pointer.
The first declaration may cause a segmentation fault if i is not an int pointer.
The second declaration may cause unexpected behavior i...
Minimum comparisons needed to find median in unsorted array of size n
For odd n, median is the middle element. For even n, median is the average of middle two elements
Minimum comparisons needed for odd n is (n-1)/2. For even n, it is n/2
Various sorting algorithms can be used to find median in an unsorted array
Time complexity to find an element in an alternatively sorted array.
The time complexity will be O(log n) using binary search.
Check the middle element and compare with the target element.
If the middle element is greater than the target, search in the left half of the array.
If the middle element is smaller than the target, search in the right half of the array.
Repeat until the target element is found or the array is exha
I applied via Campus Placement and was interviewed in Jan 2024. There was 1 interview round.
3 coding questions, mostly focused on dp, graphs strings and arrays, it was medium to hard level
Coding test which was difficult (Hard Leetcode)
I applied via LinkedIn and was interviewed in Mar 2023. There were 3 interview rounds.
Reverse a tree using DSA involves traversing the tree in a specific order and swapping the left and right child nodes.
Start by traversing the tree in post-order or level-order traversal.
Swap the left and right child nodes of each node as you traverse the tree.
Continue until all nodes have been visited and their children swapped.
I applied via Naukri.com and was interviewed before Oct 2022. There were 2 interview rounds.
It was of 3 hours and they have their own software for this.
I applied via Job Portal
2 Coding quesiton were asked based on dsa
I applied via Walk-in and was interviewed in May 2022. There were 3 interview rounds.
Basic coding round with 3 CP based questions
Namespace in C++ is used to avoid naming conflicts and organize code.
Namespace allows grouping of related functions, classes, and variables.
It helps in avoiding naming conflicts by providing a unique identifier to each entity.
Namespace can be nested within another namespace.
Using namespace keyword, we can access the entities within a namespace.
Example: namespace std { class string {}; }
Example: using namespace std; str
The expression would increment the value of i twice before using it in the operation.
The value of i would be incremented by 2 before being used in the operation.
This is equivalent to writing i = i + 2; followed by the operation using the new value of i.
For example, if i was initially 3, the expression would evaluate to 6.
I applied via LinkedIn and was interviewed in Oct 2024. There were 2 interview rounds.
Abcdef jssu ksye ksyd kahe jeheb
based on 1 interview
Interview experience
Software Engineer
4
salaries
| ₹0 L/yr - ₹0 L/yr |
Program Manager 2
4
salaries
| ₹0 L/yr - ₹0 L/yr |
Microsoft Corporation
Apple
Samsung