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

SDE - Intern

Codenation
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I did not liked this coding thing at all till my school life, but it was the additional subject in the class 12th, and that is when I eventually started to like them. I then took admission to B.Tech in computer science. I was admitted to NIT, Bhopal and practiced DSA from the very first year of college overall, it has been an exciting journey till now.
Application story
I got a message in my telegram group about the company visiting our campus to hire SDE-Intern. As, It was the peak season for the internships, it was sure that I was going to apply for it. I started preparing accordingly (DSA and some Web Dev Basics).
Why selected/rejected for the role?
I was rejected in the HR Round because I thought my answers were not up to that mark he gets convinced. So, overall I failed to give him a expression of my valuablity for the post.
Preparation
Duration: 2 months
Topics: Data Structures, System Design, Graphs, OOPS, Advance Data Structures
Tip
Tip

Tip 1 : For company like codenation you need to be great in competitive programming as the online test is very difficult to crack
Tip 2 : Focus on leetcode during final months of preparation of interview
Tip 3 : Try to have at least 3 flagship projects in at least 2 different domains

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Keep the resume clean with good text to space ratio.
Tip 2 : Don't mention tech slacks that you have only a little knowledge about as it can backfire if the interviewer is good in that tech slack.

Interview rounds

01
Round
Hard
Online Coding Interview
Duration90 minutes
Interview date17 Aug 2020
Coding problem3

The test was from 10 pm to 11:30 pm at night, Since we had to give the test from home so it was not an uncomfortable timing for me. The test was conducted on hackerrank. Personally I find Hackerrank a better test platform than others like Amcat or Mettle.

1. Minimum Fountains

Easy
10m average time
80% success
0/40
Asked in companies
UberAdobeSamsung R&D Institute

There is a one-dimensional garden of length 'N'. On each of the positions from 0 to 'N', there is a fountain, and this fountain’s water can reach up to a certain range as explained further. In other words, there are 'N' + 1 fountains located at positions 0, 1, 2, 3, …. 'N' which can be activated in the garden.

You are given an integer 'N' and an array/list 'ARR' of length 'N' + 1, where each index of the array denotes the coverage limit of a particular fountain.

A fountain at index 'i' can water the area ranging from the position 'i' - 'ARR'['i'] to 'i' + 'ARR'['i'].

Your task is to find the minimum number of fountains that have to be activated such that the whole garden from position 0 to 'N' has access to the water from at least some fountain.

Note:

1. 0-based indexing is used in the array.
2. We only care about the garden from 0 to 'N' only. So if i - 'ARR'['i'] < 0 or i + 'ARR'['i'] > 'N', you may ignore the exceeding area.
3. If some fountain covers the garden from position 'A' to position 'B', it means that the water from this fountain will spread to the whole line segment with endpoints 'A' and 'B'.
Try solving now

2. Count Inversions

Moderate
40m average time
55% success
0/80
Asked in companies
MicrosoftAdobeSamsung R&D Institute

For a given integer array/list 'ARR' of size 'N' containing all distinct values, find the total number of 'Inversions' that may exist.

An inversion is defined for a pair of integers in the array/list when the following two conditions are met.

A pair ('ARR[i]', 'ARR[j]') is said to be an inversion when:

1. 'ARR[i] > 'ARR[j]' 
2. 'i' < 'j'

Where 'i' and 'j' denote the indices ranging from [0, 'N').
Try solving now
Easy
15m average time
85% success
0/40
Asked in companies
Wells FargoCodenation

You are given an array 'ARR' consisting of 'N' integers and a non-negative integer 'K'. Consider an operation on the array as replacing every element 'ELE' of the array with 'MX - ELE', where 'MX' is the maximum element of the array. You need to return the updated array, given that this operation is performed on the array exactly 'K' number of times.

Note:

1. The array follows 0-based indexing.
2. Note that after each operation, the next operation will be performed on the updated array i.e the array obtained after the last operation.
Try solving now
02
Round
Easy
Telephonic
Duration15 minutes
Interview date19 Aug 2020
Coding problem0

The interview was at 12 noon.
This was a Resume walk-through round. The interview was supposed to be a Google Meet call but due to a weak internet connection on the interviewer's end, he called me directly on my number. He had my Resume open and he asked me to give him a walk-through of the projects I had made. His main interest was in my web development project. Since the project was live, he was able to use it and was quite impressed by my work. He also discussed my tech stack and asked a few questions related to Javascript to check my proficiency. The questions he asked were like to explain Asynchronous Programming in Javascript, Promises in Javascript, and others.

03
Round
Hard
Video Call
Duration90 minutes
Interview date21 Aug 2020
Coding problem2

This interview was at 10 am in the morning and was taken by an SDE 3 of the company who had a very great background in Competitive Coding.
The interview started with me introducing myself. The interviewer then gave me a google doc that had 2 coding questions written. He asked me to go through the first question and explain the approach. After which he asked me to code the solution as well. The same procedure was followed for the second question. The most difficult part in using Google Doc to write code is that it doesn't have automatic indentation like the code editors, so I had to put much effort in keeping my code readable.

1. Count distinct Bitwise OR of all subarrays

Easy
10m average time
90% success
0/40
Asked in companies
OYOOlaSamsung R&D Institute

You are given an array consisting of N positive integers, your task is to count the number of distinct possible values that can be obtained by taking the bitwise OR of the elements of all possible subarrays of the given array

Note:

1) A subarray is a part of the array which is contiguous (i.e. elements in the original array occupy consecutive positions) and inherently maintains the order of elements. For example, the subarrays of the array {1, 2, 3} are {1}, {1, 2}, {1, 2, 3}, {2}, {2, 3}, and {3}.
2) Bitwise OR operation takes two numbers and performs OR operation on every bit of those two numbers. For example, consider two numbers 2 and 3 their bitwise OR will be 3. Because the binary representation of 2 is 10 and the binary representation of 3 is 11. And OR of 10 and 11 will be 11 which evaluates to 3.
3) The array may contain duplicate elements.
Problem approach

I had read this article few days before the interview so I was aware of the approach that was efficient. But I started by explaining the naive O(N^3) solution.
The interviewer asked me to optimize the approach.
Then I gave him the approach I read in the article.
The interviewer asked me to code the solution which I did.

Try solving now

2. Colour the Graph

Moderate
20m average time
80% success
0/80
Asked in companies
MeeshoChegg Inc.Microsoft

You are given a graph with 'N' vertices numbered from '1' to 'N' and 'M' edges. You have to colour this graph in two different colours, say blue and red such that no two vertices connected by an edge are of the same colour.

Note :
The given graph may have connected components.
Try solving now
04
Round
Hard
HR Round
Duration60 minutes
Interview date21 Aug 2020
Coding problem1

The round was at 4 pm evening. This round was taken by one of the Vice President of the company, this made me anxious from the very beginning.
The interviewer was a knowledgeable man and had great knowledge in every field. He always demanded exact answers.
 

1. Basic HR Question

Introduce yourself.

Why do you want to join us?

Tell me about your projects.

Problem approach

Tip 1:Do not mention skills that you don't have much idea about.
Tip 2:Try to be exact with your answers and don't beat around the bush.

Tip 3: Do not ignore system design if you are aiming at good product based companies.

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 - Intern
3 rounds | 3 problems
Interviewed by Codenation
1489 views
0 comments
0 upvotes
company logo
SDE
4 rounds | 8 problems
Interviewed by Codenation
790 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Codenation
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15480 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15338 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10142 views
2 comments
0 upvotes