Flipkart DSA Questions | Compiled

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2025-04-18Added By Anonymous
Source: Link
Flipkart DSA Questions | Compiled - DSA Round (60 mins) - 2 Questions (Medium level) - 45 mins to solve - 15 mins for Introduction & Q/A - Areas to focus on - Time Complexity understanding - Edge Cases - Choice of best data structure. - Be verbose, keep it interactive. - Other Rounds - Check Flipkart Tech blog - Medium articles - Topics to cover - Binary Search - Priority Queue (Min Heap and Max Heap) - Array - Trees (BFS) - https://leetcode.com/problems/add-two-numbers/description/ - https://leetcode.com/problems/lru-cache/description/ - https://leetcode.com/problems/binary-tree-right-side-view/description/ - Design a map that allows you to do the following: Maps a string key to a given value Void insert(string key, int val) : Inserts the key-val pair into the map. If the key already existed, the original key-value pair will be overridden to the new one. Returns the sum of the values that have a key with a prefix equal to a given string. Int sum(string prefix) : Returns the sum of all the pairs value whose key starts with the prefix. There is an initialize() method, in case you want to initialize any internal data structure of your map. - You have “n” empty baskets, you are given the position of the empty baskets in an array called "position", where position[i] specifies the position of the ith basket. Additionally you have m balls to be distributed among the n baskets, You have to distribute the m balls into n baskets such that the minimum magnetic force between any two balls is maximum. The magnetic force between two different balls at position x and y is defined as |x-y| - Maximum Volume of Water: Find the maximum amount of water that can be stored between vertical towers. (https://leetcode.com/problems/trapping-rain-water/description/) - Sliding Window Maximum: Print the maximum element from every k consecutive elements in an array of size n. - https://leetcode.com/discuss/post/6305772/flipkart-sde-2-ps-ds-round-by-anonymous_-gwjn/ - Given an integer array, print the count of subarrays which had atmost k distinct elements. - Given a number, find the minimum no of operations done to reduce the number to zero. An operation is defined as subtracting one of the digits from the number. - https://leetcode.com/problems/rotting-oranges/description/ - https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/description/ - https://leetcode.com/problems/longest-substring-without-repeating-characters/description/ - Minimum time required to propagate the information from root to all child nodes of n-ary tree where in one path, the information can only be propagated at one level and other levels will need to wait. -
Comments