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

SDE - 1

Apple
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 Months
Topics: C, C++, Java, DSA, competitive programming, system design, dynamic programming, OOps
Tip
Tip

Tip 1 : Practice atleast 300+ coding problems from leetcode and codeshef
Tip 2 : Share your thought process while solving coding question during the interview
Tip 3 : Prepare 2 good projects and do at least one internship

Application process
Where: Campus
Eligibility: Above 8 CGPA
Resume Tip
Resume tip

Tip 1 : Resume should be simple, crisp, well written and make it a one page resume
Tip 2 : Mention only those skills in which you have knowledge in depth

Interview rounds

01
Round
Medium
Online Coding Interview
Duration53 Minutes
Interview date1 Apr 2019
Coding problem1

This round has been taken on the Amcat platform in which 9 MCQs were there based on the coding and two medium level questions.

1. Merge Intervals

Moderate
20m average time
80% success
0/80
Asked in companies
FacebookInnovaccerSalesforce

You are given N number of intervals, where each interval contains two integers denoting the start time and the end time for the interval.

The task is to merge all the overlapping intervals and return the list of merged intervals sorted by increasing order of their start time.

Two intervals [A,B] and [C,D] are said to be overlapping with each other if there is at least one integer that is covered by both of them.

For example:

For the given 5 intervals - [1, 4], [3, 5], [6, 8], [10, 12], [8, 9].

Since intervals [1, 4] and [3, 5] overlap with each other, we will merge them into a single interval as [1, 5].

Similarly, [6, 8] and [8, 9] overlap, merge them into [6,9].

Interval [10, 12] does not overlap with any interval.

Final List after merging overlapping intervals: [1, 5], [6, 9], [10, 12].
Problem approach

vector merge(vector& ins) {
if (ins.empty()) return vector{};
vector res;
sort(ins.begin(), ins.end(), [](Interval a, Interval b){return a.start < b.start;});
res.push_back(ins[0]);
for (int i = 1; i < ins.size(); i++) {
if (res.back().end < ins[i].start) res.push_back(ins[i]);
else
res.back().end = max(res.back().end, ins[i].end);
}
return res;
}

Try solving now
02
Round
Medium
Face to Face
Duration60 Minutes
Interview date18 Apr 2019
Coding problem2

This was a technical round completely based on problem solving. Interviewer were very friendly and they helped whenever I got struck at any step.

1. Shortest subarray with sum at least K

Moderate
15m average time
85% success
0/80
Asked in companies
ApplePayPalMAQ Software

Given an array/list 'ARR' of integers and an integer ‘K’. You are supposed to return the length of the shortest subarray that has a sum greater than or equal to ‘K’. If there is no subarray with a sum greater than or equal to K, then return -1.

Note :
An array ‘B’ is a subarray of an array ‘A’ if ‘B’ that can be obtained by deletion of, several elements(possibly none) from the start of ‘A’ and several elements(possibly none) from the end of ‘A’. 
Try solving now

2. Pair count

Moderate
0/80
Asked in companies
AppleMathworksAmazon

You are given an array ‘ARR’, and a positive integer ‘K’. Your task is to count the total number of pairs whose sum is divisible by ‘K’.

For example:
You are given, ‘ARR’ =[4, 3, 5, 1, 4, 5], and ‘K’ = 5.  In the given array the pair sums divisible by ‘K’ are [4,1], [5, 5], [4, 1]. Since there are a total of 3 pairs, the answer is 3.
Try solving now
03
Round
Medium
Video Call
Duration60 Minutes
Interview date30 Apr 2019
Coding problem2

This was 2nd technical round and some behavioral interview questions were also asked in this interview round

1. Number of Ways

Moderate
35m average time
65% success
0/80
Asked in companies
AppleSnapdeal Ltd.

Consider a game in which players can choose any of the three coins => 3 or 5 or 10 in a move. There is an infinite supply of all the three types of coins. Given a total amount ‘N’, find the distinct combinations which sums up to 'N'.

Note :
3,5 and 5,3 are not distinct combinations.
Try solving now

2. Nearest Pallindrome

Moderate
30m average time
70% success
0/80
Asked in companies
AppleeBayMorgan Stanley

You have been given a string ‘S' representing a number. Your task is to find the closest palindromic number from this integer represented by 'S'. The closest number is defined as the one for which the absolute difference between the given integer represented by 'S' and the palindrome number is minimum. If more than one number have the same difference then return the smaller integer.

Example:

Let 'S' is 121. Then the nearest integers are 111 and 131 which are palindrome. Both have the same absolute difference but 111 is smaller. Hence 111 is the answer.
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

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by Apple
2581 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 10 problems
Interviewed by Apple
3812 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Apple
2089 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3320 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes