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

SDE - Intern

Acko
upvote
share-icon
3 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
Acko visited our campus, and took 1 online coding round and 2 interviews . Whole process was in online mode. Both interviews were technical. First one was based on Problem solving and DSA, and second was based on System design and CS fundamentals
Application story
Company visited our campus on 18th august and took the online coding round, and based on that it shortlisted some candidates for further technical interviews.
Why selected/rejected for the role?
Interviewer asked me system design and coding problems. I told him the approach but could not code that approach in provided time. That's the reason for my rejection.
Preparation
Duration: 6 months
Topics: Data Structures and algorithms, OS, OOPS, System Design, Computer Networks, DBMS
Tip
Tip

Tip 1 : Prepare all the topics by solving adequate amount of problems 
Tip 2 : Give mock interviews
Tip 3 : Work on soft skills

Application process
Where: Campus
Eligibility: 7.5 CGPA
Resume Tip
Resume tip

Tip 1 : Should have an idea about software engineering concepts like SDLC,Scrum.
Tip 2 : Try to solve problems in given time with efficient approach

Interview rounds

01
Round
Medium
Online Coding Test
Duration100 minutes
Interview date18 Aug 2022
Coding problem3

It was 100 minutes round, it had 3 Coding problems

1. Minimum Cost of Reducing Array

Hard
15m average time
80% success
0/120
Asked in companies
DunzoZS AssociatesGrab

You are given an array 'ARR' consisting of 'N' positive integers, and you need to reduce the size of the array to 1 by performing an operation several number of times. In a single operation, you can merge any two adjacent elements of the array, and the cost of merging will be equal to the sum of those two elements. Find the minimum cost of reducing the given array by performing this operation several number of times.

In a single merge operation, the two elements are removed, and their sum is inserted at its place, hence decreasing the size of the array by 1 after each operation. For eg: Consider the array A1, A2, Ai-2, Ai-1, Ai, Aj, Aj+1, Aj+2 ,,,, An. Let the operation be performed on two indices i and j, So after merging the array will look like A1, A2, Ai-2, Ai-1, Ai+Aj, Aj+1, Aj+2,,,, An.

Note:

Note that the given operation will be performed only 'N'-1 times, where 'N' is the size of the given array.
Problem approach

Traverse in reverse order in the given array and keep maintaining the increasing property. If any element is smaller than the maximum of existing elements till that index then, we need to make some decrement operation on that maximum element so that it also follows the increasing property from back traversal and add the required operation in the answer.

Try solving now

2. Number of Ways

Moderate
35m average time
65% success
0/80
Asked in companies
SnapdealApple

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.
Problem approach

USING DP -

int dp[1001][1001];

const int mod=1e9+7;

int solve(int a[],int n,int N,int W){

if(W==0)

return 1;

if(n==0 || W<0)

return 0;

if(dp[n][W]!=-1)

return dp[n][W];

if(a[n-1]<=W)

return dp[n][W]=(solve(a,n-1,N,W)%mod+solve(a,N,N,W-a[n-1])%mod)%mod;

return dp[n][W]=solve(a,n-1,n,W)%mod;

}

int countWays(int a[], int n, int W) { 

//code here.

memset(dp,-1,sizeof(dp));

return solve(a,n,n,W);

}

Try solving now

3. Possible Bipartition

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

You are given an integer ‘N’ which denotes a set of N people numbered from 1 to N and a matrix ‘DISLIKE’ with M rows and 2 columns. Each row in the matrix denotes two people who dislike each other i.e. for any valid row i, DISLIKE[i][0] dislikes DISLIKE[i][1] and vice versa.

Your task is to split the set of N people into two groups under the conditions:

1. It is not allowed to put two persons in the same group who dislike each other.

2. The size of the two groups may or may not be equal.

3. Each person from the set belongs to exactly one group.

Problem approach

bool possibleBipartition(int n, vector>& dislikes) {
vector color(n+1,0);
vector adj[n+1];
for(int i=0;i q;
q.push(i);
while(!q.empty()){
int node=q.front();
q.pop();
for(int child:adj[node]){
if(color[child]==color[node])return false;
if(!color[child]){
q.push(child);
color[child]=-1*color[node];
}
}
}
}
}

return true;
}

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date21 Aug 2022
Coding problem2

It was conducted in morning at 11am. Interviewer asked question related to DSA, projects mentioned in resume and some software engineering concepts like SDLC, Scrum, Software Testing.

1. Rotting Oranges

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

You have been given a grid containing some oranges. Each cell of this grid has one of the three integers values:

  • Value 0 - representing an empty cell.
  • Value 1 - representing a fresh orange.
  • Value 2 - representing a rotten orange.
  • Every second, any fresh orange that is adjacent(4-directionally) to a rotten orange becomes rotten.

    Your task is to find out the minimum time after which no cell has a fresh orange. If it's impossible to rot all the fresh oranges then print -1.

    Note:
    1. The grid has 0-based indexing.
    2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
    
    Problem approach

    Create a visited grid to store the state of the cell (fresh, rotten, or empty).
    Initialize a queue to store the rotten oranges and count the number of fresh oranges.
    Check if there are no fresh oranges, return 0, or if there are no rotten oranges, return -1.
    Loop while the queue is not empty.
    a. Store the size of the queue.
    b. Loop through the size of the queue.
    i. Get the front cell of the queue.
    ii. Check all four directions of the cell to see if there are any fresh oranges.
    iii. If there is a fresh orange, change its state to rotten and decrement the count of fresh oranges, and push the cell into the queue.
    c. Increment the minutes.
    If there are no fresh oranges, return the minutes.
    If there are still fresh oranges, return -1.

    Try solving now
    Easy
    10m average time
    90% success
    0/40
    Asked in companies
    Disney + HotstarMicrosoftPaytm (One97 Communications Limited)

    Given N pairs of parentheses, write a function to generate and print all combinations of well-formed parentheses. That is, you need to generate all possible valid sets of parentheses that can be formed with a given number of pairs.

    Problem approach

    We can solve this problem using Array + Backtracking.

    void solve(vector &ans, int n , int open , int close,string output){
    if(output.length() == 2*n){
    ans.push_back(output);
    return;
    }

    // open 
    if(open generateParenthesis(int n) {
    vector ans;
    solve(ans,n,0,0,"");
    return ans;
    }

    Try solving now
    03
    Round
    Medium
    Video Call
    Duration60 minutes
    Interview date23 Aug 2022
    Coding problem2

    It was 2nd and final interview, it was based on problem solving along with system design and computer science fundamentals.

    1. System Deisgn

    Elevator System Design-
    The interviewer asked me to design functions that should be used for designing an elevator. He just asked for the normal working not to go in very deep as time restriction was there. He was expecting me to provide the Data Structure that would be best suited, different classes & relationships between them, etc.

    Problem approach

    Tip 1 : This is a OO design question 
    Tip 2 : Think in terms of classes and objects 
    Tip 3 : Try to establish relation between objects and methods

    2. Subarrays With At Most ‘K’ Distinct Values

    Moderate
    15m average time
    85% success
    0/80
    Asked in companies
    GoogleSwiggyGoldman Sachs

    You are given an array ‘ARR’ having ‘N’ integers. You are also given an integer ‘K’. The task is to count the number of subarrays that have ‘K’ distinct values.


    Subarray: A consecutive sequence of one or more values taken from an array.


    For Example :
    ‘N’ = 4, ‘K’ = 2
    ‘ARR’ = [1, 1, 2, 3]
    
    There are ‘3’ subarrays with ‘2’ distinct elements, which are as follows: [1, 2], [2, 3], [1, 1, 2].
    Thus, you should return ‘3’ as the answer.
    
    Problem approach

    To directly count the subarrays with exactly K different integers is hard but to find the count of subarrays with at most K distinct integers is easy. So the idea is to find the count of subarrays with at most K different integers, let it be C(K), and the count of subarrays with at most (K – 1) Different integers, let it be C(K – 1) and finally take their difference, C(K) – C(K – 1) which is the required answer. 
    Count of subarrays with at most K different elements can be easily calculated through the sliding window technique. The idea is to keep expanding the right boundary of the window till the count of distinct elements in the window is less than or equal to K, and when the count of distinct elements inside the window becomes more than K, start shrinking the window from the left till the count becomes less than or equal to K. Also for every expansion, keep counting the subarrays as right – left + 1 where right and left are the boundaries of the current window.

    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

    Which SQL keyword removes duplicate records from a result set?

    Choose another skill to practice
    Similar interview experiences
    company logo
    SDE - Intern
    2 rounds | 2 problems
    Interviewed by Acko
    899 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    4 rounds | 7 problems
    Interviewed by Acko
    1923 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    4 rounds | 10 problems
    Interviewed by Acko
    1381 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    3 rounds | 4 problems
    Interviewed by Acko
    771 views
    0 comments
    0 upvotes
    Companies with similar interview experiences
    company logo
    SDE - Intern
    3 rounds | 6 problems
    Interviewed by Amazon
    13918 views
    4 comments
    0 upvotes
    company logo
    SDE - Intern
    4 rounds | 7 problems
    Interviewed by Microsoft
    13230 views
    1 comments
    0 upvotes
    company logo
    SDE - Intern
    2 rounds | 4 problems
    Interviewed by Amazon
    9230 views
    2 comments
    0 upvotes