Oracle interview experience Real time questions & tips from candidates to crack your interview

Application Developer

Oracle
upvote
share-icon
4 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: OOPs Concepts, DS & Algo (Array, LinkedList, Tree, String, Stack, Queue, Dynamic Programming),High Level System Design (Different AWS services like EC2, API Gateway, Load Balancer, Auto Scaling Group, RDS, S3 bucket )Low Level System Design- ( Design patterns - Singleton, Factory, Strategy, Class Diagram, Activity Diagram )Database concepts ( ACID properties, CAP theorem, SQL queries )
Tip
Tip

Tip 1 : Practice at least 10-20 questions of DS & Also on each topic from difficulty level easy to hard.
Tip 2 : Prepare well around OOPs concepts and Database concepts.
Tip 3 : If you have 2.5+ year of experience practice around HLD and LLD.

Application process
Where: Linkedin
Eligibility: No Criteria
Resume Tip
Resume tip

Tip 1 : Please mention the keyword related to the work that you have done. (eg. Git, Maven, JUnit, Java, AWS )
Tip 2 : Please mention any certification that you have done. And try to keep your resume within one page.

Interview rounds

01
Round
Medium
Video Call
Duration60 Minutes
Interview date15 Apr 2021
Coding problem1

Overall the first round was for 1h. At start interviewer introduced himself and asked for my introduction. After that he directly jumped to coding question. Interviewer was friendly and he gave me suggestion whenever I got stuck somewhere.

1. Minimum Sum Subarray Of Given Size

Easy
15m average time
85% success
0/40
Asked in companies
AmazonOracleAirtel

You have been given an array 'ARR' of integers consisting of ‘N’ integers and a positive integer ‘K’. Your task is to find a subarray(contiguous) of size ‘K’ such that the sum of its elements is minimum.

Note :
You can assume that the value of ‘K’ will always be less than or equal to ‘N’. So, the answer will always exist.
Problem approach

The general approach/algorithm of sliding door is:

Use two pointers to represent your window. "start" & "end"
Keep moving the end pointer until your condition is true or in other words; the window is valid.
Start to condense your window by moving your start pointer while also simultaneously making sure your window is still valid.

public int minSubArrayLen(int target, int[] nums) {
// basic constraint checking
if (nums == null || nums.length == 0)
return 0;

// initialization of the start & end index of your sliding window 
int start = 0, end = 0, sum = 0, minLength = Integer.MAX_VALUE;

while (end < nums.length) {
// keep a running sum as the end pointer expands your window
sum += nums[end++];

// this while loop will be skipped until your window meets the condition that 
// the running sum is equal or greater than the int 's' passed in. aka the window
// is valid
while (sum >= target) {
// now you want to condense your window to find the minimum window as the 
// problem wants

// updates the min length
minLength = Math.min(minLength, end - start);

// this moves your start index by one condensing your window and 
// decreasing the sum to make sure that it's still valid
sum -= nums[start++];
}
}

// if no min is found, return 0 or else return the min length you found above. 
return minLength == Integer.MAX_VALUE ? 0 : minLength;
}

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date29 Apr 2021
Coding problem1

This was the second round which was scheduled on in day time. It was based on DS Algo problems.
Interview environment was positive. Interviewer made me comfortable by asking normal question about me and the work that I have done.Overall the interview experience was really great.

1. Remove Duplicates From Sorted List

Easy
0/40
Asked in companies
AdobeAppleAmazon

A doubly-linked list is a data structure that consists of sequentially linked nodes, and the nodes have reference to both the previous and the next nodes in the sequence of nodes.


You are given a sorted doubly linked list of size 'n'.


Remove all the duplicate nodes present in the linked list.


Example :
Input: Linked List: 1 <-> 2 <-> 2 <-> 2 <-> 3

Output: Modified Linked List: 1 <-> 2 <-> 3

Explanation: We will delete the duplicate values ‘2’ present in the linked list.


Problem approach

public ListNode deleteDuplicates(ListNode head) {
ListNode curr = head;
if(head == null) return null;

// if the head.next == null it means that the list contains only one node (head) 
//so there is no duplicates we will simply return the head of the list

if(head.next == null) return head;
else{
while(curr.next != null){
//we compare the data of the current node with the next node if they are equal
//we remove the next node 
if(curr.val == curr.next.val) 
curr.next = curr.next.next;
else
//if they are not equal we simply move forward
curr=curr.next;
}
}
return head;
}

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date12 May 2022
Coding problem1

This round was scheduled in day time. It was based on Low level system design.
Interview environment was positive. Interviewer made me comfortable by asking normal question about me and the work that I have done.Overall the interview experience was really great.

1. LRU Cache Implementation

Moderate
25m average time
65% success
0/80
Asked in companies
MicrosoftUberSalesforce

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:

1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.

2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
You will be given ‘Q’ queries. Each query will belong to one of these two types:
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
Note :
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).

2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
Problem approach

Solution : Use doubly linked list with HashMap to get O(1) time compleixty for get and put method.

class LRUCache {

Map nodeMap;
DoublyLinkedList doublyLinkedList;
int capacity;


public LRUCache(int capacity) {
nodeMap = new HashMap();
doublyLinkedList = new DoublyLinkedList();
this.capacity = capacity; 
}

public int get(int key) {
if(nodeMap.containsKey(key)){
Node node = nodeMap.get(key);
doublyLinkedList.removeGiven(node);
doublyLinkedList.addFirst(node);
return node.val;
}
return -1;
}

public void put(int key, int value) {
if(nodeMap.containsKey(key)){
Node node = nodeMap.get(key);
node.val = value;
doublyLinkedList.removeGiven(node);
doublyLinkedList.addFirst(node);
}else{
if(nodeMap.size() == capacity){
Node node = doublyLinkedList.getTail(); 
doublyLinkedList.removeLast();
nodeMap.remove(node.key);
}
Node node = new Node(key, value);
doublyLinkedList.addFirst(node);
nodeMap.put(key, node);

}


}

class DoublyLinkedList{

private Node head;
private Node tail;

public DoublyLinkedList(){
head = null;
tail = null;
}

public Node getHead(){
return head;
}

public Node getTail(){
return tail;
}

public void addFirst(Node node){
node.prev = null;
node.next = null;
if(head == null ){
head = node;
tail = node;
}else{
node.next = head;
head.prev = node;
head = node; 
}
}

public void removeLast(){
if(tail == null ) return;
if(tail.prev == null ) {
tail = null;
head = null;
return;
}
tail.prev.next = null;
tail = tail.prev;
}

public void removeGiven(Node node){
if(node.prev == null ){
head = node.next;
if(node.next == null) tail = null;
else node.next.prev = null;
}else{
node.prev.next = node.next;
if(node.next == null) tail = node.prev;
else node.next.prev = node.prev;
}
}

}

class Node{
int val;
int key;
Node prev;
Node next;
public Node(int key, int val){
this.key = key;
this.val =val;
this.prev = null;
this.next = null;
}
}

Try solving now
04
Round
Medium
Video Call
Duration60 minutes
Interview date27 May 2021
Coding problem1

This round was scheduled in day time. This was engineering manager round. He asked me the questions related to the work that I have done in my projects. He also asked one coding question as well. Overall the interview experience was great.

1. Attend Maximum Parties

Moderate
0/80
Asked in companies
AmazonFacebookTwitter

There are ‘N’ parties organised and you are also given a matrix ‘Party’ where Party[i] contains two integers the starting date and the ending date (both inclusive) of the i’th party.

You are only allowed to attend a single party each day, you are a party animal and want to attend a maximum number of different parties, find the maximum parties that you can attend.

Example :
If ‘N’ = 5 and ‘Party’ = { {1, 1}, {2, 2}, {1, 3}, {4, 4}, {3, 3}, }

You can attend a maximum of 4 different parties, you can attend the 1’st party on the 1’st day, 2’nd party on the 2’nd day, 3’rd party on the 3’rd day and 4’th party on the 4’th day. But it is impossible to attend the 5’th (last) party, as if we were to attend this party then we would have to attend it instead of the 3’rd party (3’rd day), there may be many other combinations possible, but no combination will result in a maximum number of different parties attend greater than four.
Problem approach

public int maxEvents(int[][] events) {
Comparator comparator = (a, b)-> a[0]-b[0];
Arrays.sort(events, comparator);
PriorityQueue pq = new PriorityQueue();
int i = 0;
int count = 0;
int day = 0'
while(i < events.length || !pq.isEmpty()){
if(pq.isEmpty()) day = events[i][0];
// add all the concurrent event to the queue
while( i< events.length && day == events[i][0]){
pq.add(events[i][1]);
i++;
}
// process the event which is ending early
pq.poll();
count++; // one possible result
//remove events which been ended till current day 
while( !pq.isEmpty() && day >= pq.peek()){
pq.poll();
}
//go to next day
day++;
}

return count;
}

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
Application Developer
4 rounds | 11 problems
Interviewed by Oracle
3526 views
0 comments
0 upvotes
company logo
Application Developer
4 rounds | 12 problems
Interviewed by Oracle
1228 views
0 comments
0 upvotes
company logo
Application Developer
4 rounds | 12 problems
Interviewed by Oracle
953 views
0 comments
0 upvotes
company logo
Application Developer
3 rounds | 4 problems
Interviewed by Oracle
1840 views
0 comments
0 upvotes