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

SDE - 1

Kempston
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
I have done my BTech during my studies. I started doing the coding questions and participating in the interview mocks. Till then, I have done several questions on all the practicing websites.
Application story
This is an on-campus opportunity for my company to my campus for the placement. They have given a CGPA-wise cutoff, also
Why selected/rejected for the role?
I was rejected because I could not provide an accurate solution to the question given to me.
Preparation
Duration: 6 months
Topics: Data Structures and Algorithms, Object-Oriented Programming System, Operating system, Database Management System
Tip
Tip

Try to do Data Structures and Algorithm-based questions and first attempt them yourself before going to the solution; also, try to do it as quickly as you can. I also prepared for theory subjects like Operating systems, Database Management Systems, etc, which I prepared through Coding Ninjas subjective notes, and they are very accurate and up-to-mark

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

Tip 1 : Have some projects on your resume.
Tip 2 : Do not put false things on your resume.

Interview rounds

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

1. Prime Number

Easy
15m average time
80% success
0/40
Asked in companies
HSBCSalesforceDeutsche Bank

You are given a positive integer ‘N’. Your task is to print all prime numbers less than or equal to N.

Note: A prime number is a natural number that is divisible only by 1 and itself. Example - 2, 3, 17, etc.

You can assume that the value of N will always be greater than 1. So, the answer will always exist.

Problem approach

STEP 1: Take num as input.

STEP 2: Initialize a variable temp to 0.

STEP 3: Iterate a “for” loop from 2 to num/2.

STEP 4: If num is divisible by loop iterator, then increment temp.

STEP 5: If the temp is equal to 0,

Return “Num IS PRIME”.

Else,

Return “Num IS NOT PRIME”.

Try solving now

2. Split Array Into Fibonacci Sequence

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

In this problem, You are given a string S of digits, such as S = "123456579", we can split it into a Fibonacci-like sequence [123, 456, 579]. Formally, a Fibonacci-like sequence is a list F of non-negative integers such that:

1: 0 <= F[i] <= 2^31 - 1, (that is, each integer fits a 32-bit signed integer type);

2: F.length >= 3;

3: and F[i] + F[i+1] = F[i+2] for all 0 <= i < F.length - 2.

Also, note that when splitting the string into pieces, each piece must not have extra leading zeroes, except if the piece is the number 0 itself.

Return any Fibonacci-like sequence split from S, or return [] if it cannot be done.

Example :
Input: "123456579"
Output: [123, 456, 579]

Explanation:
Since 123 + 456 = 579, therefore the given string can be broken into fibonacci sequence
Problem approach

Start
Declare variables I, a,b, and show
Initialize the variables, a=0, b=1, and show =0
STEP 1: Enter the number of terms of the Fibonacci series to be printed
STEP 2: Print the first two terms of series
STEP 3: Use a loop for the following steps
show=a+b
a=b
b=show
increase the value of I each time by 1
print the value of the show
End

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

1. Factorial of a Number

Moderate
25m average time
70% success
0/80
Asked in companies
HCL TechnologiesWells FargoSquadstack

You are given an integer ‘N’. You have to print the value of Factorial of ‘N’. The Factorial of a number ‘N’ is defined as the product of all numbers from 1 to ‘N’.

For Example:
Consider if ‘N’ = 4, the Factorial of 4 will be the product of all numbers from 1 to 4, which is 1 * 2 * 3 * 4 = 24. Hence, the answer is 24.
Try solving now

2. Median of two sorted arrays

Hard
25m average time
65% success
0/120
Asked in companies
GrabAtlassianAmazon

Given two sorted arrays 'a' and 'b' of size 'n' and 'm' respectively.


Find the median of the two sorted arrays.


Median is defined as the middle value of a sorted list of numbers. In case the length of list is even, median is the average of the two middle elements.


The expected time complexity is O(min(logn, logm)), where 'n' and 'm' are the sizes of arrays 'a' and 'b', respectively, and the expected space complexity is O(1).


Example:
Input: 'a' = [2, 4, 6] and 'b' = [1, 3, 5]

Output: 3.5

Explanation: The array after merging 'a' and 'b' will be { 1, 2, 3, 4, 5, 6 }. Here two medians are 3 and 4. So the median will be the average of 3 and 4, which is 3.5.
Problem approach

We will do a binary search in one of the arrays which have a minimum size among the two.

Firstly, calculate the median position with (n+1)/2. Point two-pointer, say low and high, equal to 0 and size of the array on which we are applying binary search respectively. Find the partition of the array. Check if the left half has a total number of elements equal to the median position. If not, get the remaining elements from the second array. Now, check if partitioning is valid. This is only when l1<=r2 and l2<=r1. If valid, return max(l1,l2)(when odd number of elements present) else return (max(l1,l2)+min(r1,r2))/2.

If partitioning is not valid, move ranges. When l1>r2, move left and perform the above operations again. When l2>r2, move right and perform the above operations.

Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date8 Jun 2023
Coding problem1
Easy
30m average time
80% success
0/40
Asked in companies
OYOThought WorksAdobe

You are given an input string 'S'. Your task is to find and return all possible permutations of the input string.

Note:
1. The input string may contain the same characters, so there will also be the same permutations.

2. The order of permutation does not matter.
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 Kempston
678 views
0 comments
0 upvotes
SDE - 1
3 rounds | 5 problems
Interviewed by Kempston
408 views
0 comments
0 upvotes
SDE - 1
3 rounds | 5 problems
Interviewed by Kempston
398 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3451 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
57824 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes