← 返回 rippling 的题目列表Intern OA Fixed Set
类型:qbank
Intern OA combining DSA multiple choice and coding. Topics include time complexity, heap validation, DFS path validation, heapify, paginated REST API parsing, and a sliding-window consistent logs problem.
Requirements
Multiple-choice DSA topics:
time complexity of a triple nested loop where the work sums to Theta(n^4);
identify a valid max-heap;
select a valid DFS traversal path from node 0;
run build-max-heap / heapify and output the resulting level-order array.
Coding: Costliest Chocolate. Fetch paginated product data by brand, compute the highest price / weight ratio across product variants, and return the productNumber; ties choose the smaller productNumber.
Coding: Consistent Logs. Compute the global minimum frequency across the full array. Find the longest subarray whose most common element frequency equals that global minimum frequency.
Notes
For Costliest Chocolate, use cross multiplication instead of floating-point division when comparing ratios.
For Consistent Logs, use a hashmap plus sliding window; shrink when the current mode frequency exceeds the global minimum frequency. This is the canonical longest-subarray-with-bounded-frequency template (LC 2958 family): expand the right pointer, update per-value count, and shrink from the left while any count exceeds the cap. Track the answer at each valid window. O(n) time, O(distinct values) space.
The behavioral screen can still filter candidates after a solid OA, so prepare Why Rippling and project-challenge stories.
Preparation
Drill heap properties and DFS traversal validation by simulating stack behavior.
Implement a paginated REST API fetch loop with tie-breaking by product number.
Write a sliding-window frequency template that tracks both per-value counts and the current maximum count.