Filter interviews by
I applied via Job Portal and was interviewed in Sep 2024. There was 1 interview round.
Leetcode style, course scheduler
I was interviewed in Oct 2016.
I applied via Campus Placement
Boundary traversal of a tree is the process of visiting the nodes on the boundary of a tree in a specific order.
The boundary traversal can be done in three steps: left boundary, leaf nodes, and right boundary.
For the left boundary, start from the root and traverse down the left side of the tree until reaching a leaf node.
For the leaf nodes, perform an inorder traversal to visit all the leaf nodes of the tree.
For the ri...
Find the nearest greater value of a given value in a Binary Search Tree (BST).
Start from the root node and compare the given value with the current node's value.
If the given value is less than the current node's value, move to the left subtree.
If the given value is greater than the current node's value, move to the right subtree.
Keep track of the closest greater value encountered while traversing the tree.
Return the cl
Given an infinite staircase with a broken kth step, find the maximum height we can reach in n rounds of jumping i steps.
We can start by jumping the maximum number of steps in each round until we reach the broken step.
After reaching the broken step, we can discard the i steps that would land us on the broken step and jump the remaining steps.
We can continue this pattern until we reach the maximum height we can reach wit
I was interviewed before May 2016.
I am a passionate software engineer with experience in developing web applications and a strong background in computer science.
Experienced in developing web applications using technologies such as HTML, CSS, JavaScript, and React
Strong background in computer science with knowledge of data structures and algorithms
Proficient in programming languages such as Java, Python, and C++
Familiar with Agile development methodolog
Flipkart is a leading e-commerce platform in India with a strong focus on technology and innovation.
Flipkart offers a challenging and dynamic work environment for software engineers.
The company has a strong reputation for investing in technology and innovation.
Flipkart has a large user base and offers opportunities to work on a variety of projects.
The company has a strong focus on customer satisfaction and user experie...
Yes, I am comfortable with reallocating as needed.
I am flexible and adaptable to changing circumstances.
I have experience working in dynamic environments where priorities can shift.
I am willing to take on new challenges and responsibilities as required.
I have a strong technical background, excellent problem-solving skills, and a proven track record of delivering high-quality software.
Extensive experience in software development, including proficiency in multiple programming languages such as Java, Python, and C++
Strong problem-solving skills demonstrated through successful completion of complex projects
Proven track record of delivering high-quality software on time a...
Function to check if a string of parenthesis is balanced
Use a stack to keep track of opening parenthesis
If a closing parenthesis is encountered, pop from stack and check if it matches
If stack is empty and a closing parenthesis is encountered, return False
If all parenthesis are matched and stack is empty, return True
Count the occurrences of words in a paragraph.
Split the paragraph into words using whitespace as a delimiter.
Create a dictionary to store the count of each word.
Iterate through the words and increment the count in the dictionary.
Return the dictionary with the word counts.
Find common elements out of two sorted array
Use two pointers to traverse both arrays simultaneously
Compare elements at each pointer and move the pointer of the smaller element
If elements are equal, add to common elements list and move both pointers
Stop when either pointer reaches end of array
Convert a Binary Search Tree to a Doubly Linked List.
Create a DLL node class with left, right, and data fields.
Traverse the BST in-order and add each node to the DLL.
Adjust the left and right pointers of each node to create the DLL.
Return the head of the DLL.
The task is to fill the 'next' field of each node in a binary tree to point to the next node at the same level.
Use a level order traversal to process the tree nodes.
Maintain a queue to store the nodes at each level.
For each node, set its 'next' field to the next node in the queue.
If a node is the last node at its level, set its 'next' field to NULL.
To find anagrams of a given word in a dictionary, use a hash table to store sorted versions of each word as keys and their corresponding original words as values.
Create a hash table to store the anagrams
Iterate through each word in the dictionary
Sort the characters of the word and use it as a key in the hash table
If the key already exists, add the word to the list of values for that key
Print the list of values for the
Suggest a data structure for efficient search of a string in 10 files and print line number and file if string appears more than once.
Use a hash table to store the file name and line number of each occurrence of the string.
Iterate through each file and for each line, check if the string is present and update the hash table accordingly.
Print the hash table entries for the string.
Amazon is the right place for me because of its innovative culture, vast resources, and opportunities for growth.
Amazon's innovative culture aligns with my passion for pushing boundaries and finding creative solutions.
The company's vast resources provide the necessary tools and support to develop and deliver high-quality software.
Amazon offers numerous opportunities for growth and career advancement, allowing me to con...
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 applied via Recruitment Consultant and was interviewed before Jul 2020. There was 1 interview round.
based on 1 interview
Interview experience
TikTok