Oracle Software Engineer Coding & Algorithms Interview Questions
Practice the exact questions companies are asking right now.
Count anagram-based replacements per phrase
Problem You are given: - phrases: a list of strings, where each string is a phrase containing words separated by single spaces. - words: a list of str...
Find users with at least one valid session
You are given: - A list of log entries logs, where each entry is a string in the format: ` "userId action timestamp" ` - userId is a non...
Implement an LRU cache
Design and implement an in-memory cache that evicts entries using the Least Recently Used (LRU) policy. The cache should store key–value pairs and sup...
Design structure for first unique login user
You are given an online stream of user login events. Each event is a user ID (e.g., an integer or string) indicating that this user has just logged in...
Solve three DSA problems: trie, window, intervals
1) Design and implement an autocomplete service. Support insert(word) to add a word and suggest(prefix) to return up to five existing words that start...
Minimize sum with halving operations
You are given an array of non-negative integers nums and an integer k. In one operation, choose any index i and replace nums[i] with ceil(nums[i] / 2)...
Determine if robot path is bounded
A robot starts at (0, 0) facing North on an infinite grid. It executes a string s consisting of 'G' (move forward 1 unit), 'L' (turn left 90°), and 'R...
Find shortest subarray meeting target sum
Given an integer array nums (values may be negative) and an integer T, return the length of the shortest non-empty contiguous subarray whose sum is at...