Main Navigation
Share your interview in your own words — our AI handles the rest. Hardly takes 2 minutes.
Practice mock interviews or book a 1:1 call for career guidance, resume reviews, and more.
Connect with us on social media
Interview experiences & questions tagged Array
The array cannot be modified. Size = N + 1, values range from 1 to N. Find any duplicate. Time Complexity: O(N), Space Complexity: O(1). Example: Input: {10,1,2,3,5,4,9,8,5,6,4} → Output: 5
Design a data structure that supports `insert(value)`, `delete(value)`, and `getRandom()` operations in O(1) time complexity. Discuss trade-offs and edge cases.
You are given an array where each element represents the price of a stock on a given day. Write an algorithm to determine the maximum profit you can achieve by buying on one day and selling on another. Discuss the constraints and provide examples.
Solve the Gas Station problem where you need to determine the starting gas station's index from which you can travel around the circuit once without running out of gas. A circuit is represented as an array of gas stations with their respective gas amounts and an array of distances to the next station. Consider the constraints and provide a brief explanation of your approach.
Given an array of integers, find the contiguous subarray (containing at least one number) which has the largest product and return the product. Implement your solution using dynamic programming.
Coming Soon