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

SDE - 1

Incode
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
I started my coding journey on youtube, where I first learned the data structure and Algorithm. Then, I started my preparation of Data Structure.
Application story
The company visited our campus to hire candidates for the post of SDE. I took part in the hiring drive.
Why selected/rejected for the role?
I think I was rejected because I could not answer all the questions correctly during the interview.
Preparation
Duration: 6 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1: Practice at least 250 Questions
Tip 2: Also focus on Core CSE subjects from the interview point of view.  

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

Tip 1: Have some projects on resume.
Tip 2: Highlight job specific skills.

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date22 Jun 2023
Coding problem2

1. Maximum Frequency Number

Easy
10m average time
90% success
0/40
Asked in companies
PayPalHSBCWalmart

Ninja is given an array of integers that contain numbers in random order. He needs to write a program to find and return the number which occurs the maximum times in the given input. He needs your help to solve this problem.

If two or more elements contend for the maximum frequency, return the element which occurs in the array first i.e. whose index is lowest.

For example,

For 'arr' = [ 1, 2, 3, 1, 2]. you need to return 1.
Problem approach

This is a very simple & straightforward question. I stored all the frequencies of elements in an unordered hashmap & then iterated over the map & returned the key of the map with highest value of frequency.

Try solving now

2. Maximum Subarray Sum

Moderate
35m average time
81% success
0/80
Asked in companies
HCL TechnologiesInformaticaSamsung

You are given an array 'arr' of length 'n', consisting of integers.


A subarray is a contiguous segment of an array. In other words, a subarray can be formed by removing 0 or more integers from the beginning and 0 or more integers from the end of an array.


Find the sum of the subarray (including empty subarray) having maximum sum among all subarrays.


The sum of an empty subarray is 0.


Example :
Input: 'arr' = [1, 2, 7, -4, 3, 2, -10, 9, 1]

Output: 11

Explanation: The subarray yielding the maximum sum is [1, 2, 7, -4, 3, 2].
Problem approach

I began with the question with normal brute-force , i.e. I calculated the sum of all subarrays & returned the maximum out of them. To my suprise , the constraints were so weak that the O(n2) approach worked for all test cases & I didn't go for the Kadane's Algorithm which is based on O(n) time complexity.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date22 Jun 2023
Coding problem2

1. Make Maximum Number

Moderate
18m average time
85% success
0/80
Asked in companies
WalmartSamsungIncode

Given a linked list such that each node represents a digit. Construct the maximum number possible from the given digits.

You just need to print the maximum Integer that can be formed

Try solving now

2. Maximum sum path from the leaf to root

Easy
10m average time
90% success
0/40
Asked in companies
OYOSprinklrSamsung

You are given a binary tree of 'N' nodes.

Your task is to find the path from the leaf node to the root node which has the maximum path sum among all the root to leaf paths.

For Example:

sample tree

All the possible root to leaf paths are:
3, 4, -2, 4 with sum 9
5, 3, 4 with sum 12
6, 3, 4 with sum 13
Here, the maximum sum is 13. Thus, the output path will be 6, 3, 4.

Note:

There will be only 1 path with max sum.
Problem approach

I applied DFS with memorization and it was optimized approach with O(n) time complexity.

Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date22 Jun 2023
Coding problem1

1. Is Graph Bipartite?

Moderate
0/80
Asked in companies
FacebookSamsungDirecti

You are given an undirected graph consisting of ‘N’ nodes from 0 to ‘N’ - 1. You are given a list ‘EDGES’ of size ‘M’, consisting of all the edges of this undirected graph. Determine whether the given graph is Bipartite or not.

Note:
The graph has no self-edges, no parallel edges.

The graph may not be connected.

A graph is bipartite if the nodes of the graph can be partitioned into two independent sets A and B such that every edge in the graph connects a node in set A and a node in set B.
For Example,
If ‘N’ = 4, ‘M’ = 5, edgeList = [ [0, 1],[0, 3],[1, 2] ].

Here, you can see that the graph is bipartite as we can divide the nodes in two sets as follows:
setA = [0, 2].
setB = [1, 3].

In the graph, you can see that every edge in the graph connects a node in set A and a node in set B.
Hence, the output is “Yes”.
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
SDE - 1
3 rounds | 6 problems
Interviewed by Incode
333 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Incode
323 views
0 comments
0 upvotes
Software Engineer
2 rounds | 4 problems
Interviewed by Incode
359 views
0 comments
0 upvotes
Software Developer
3 rounds | 7 problems
Interviewed by Incode
317 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