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

SDE - Intern

Freecharge
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
Starting my B.tech in Computer Science was an exhilarating experience. In the first year, I discovered the joy of coding. During my sophomore year, I delved into data structures and algorithms. By the third year, I began to specialize, exploring various facets of computer science, and internships gave me practical insights into real-world applications.
Application story
The company visited our campus for placements. We first had to clear the aptitude test.
Why selected/rejected for the role?
I was not able to answer all the questions during my interview.
Preparation
Duration: 5 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1: Establish a consistent coding routine by allocating dedicated time daily.

Tip 2: Work on real-world projects to apply theoretical knowledge.

Tip 3: Actively engage in coding communities, attend hackathons, and collaborate with peers.

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

Tip 1: Tailor your resume for each application.

Tip 2: Use action verbs and quantifiable achievements to showcase your impact.

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date30 Sep 2022
Coding problem2

1. Boundary Traversal of Binary Tree

Hard
20m average time
85% success
0/120
Asked in companies
SalesforceAmazonGoldman Sachs

You are given a binary tree having 'n' nodes.


The boundary nodes of a binary tree include the nodes from the left and right boundaries and the leaf nodes, each node considered once.


Figure out the boundary nodes of this binary tree in an Anti-Clockwise direction starting from the root node.


Example :
Input: Consider the binary tree A as shown in the figure:

alt text

Output: [10, 5, 3, 7, 18, 25, 20]

Explanation: As shown in the figure

The nodes on the left boundary are [10, 5, 3]

The nodes on the right boundary are [10, 20, 25]

The leaf nodes are [3, 7, 18, 25].

Please note that nodes 3 and 25 appear in two places but are considered once.
Problem approach

This is the simple tree question.

Try solving now

2. Intersection Of Two Sorted Arrays

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

You are given two arrays 'A' and 'B' of size 'N' and 'M' respectively. Both these arrays are sorted in non-decreasing order. You have to find the intersection of these two arrays.

Intersection of two arrays is an array that consists of all the common elements occurring in both arrays.

Note :
1. The length of each array is greater than zero.
2. Both the arrays are sorted in non-decreasing order.
3. The output should be in the order of elements that occur in the original arrays.
4. If there is no intersection present then return an empty array.
Problem approach

You are given two arrays 'A' and 'B' of size 'N' and 'M' respectively. Both these arrays are sorted in non-decreasing order. You have to find the intersection of these two arrays.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date3 Oct 2022
Coding problem2

1. M-Coloring Problem

Moderate
15m average time
85% success
0/80
Asked in companies
Bank Of AmericaSamsungEditorialist YX

You are given an undirected graph as an adjacency matrix consisting of 'v' vertices and an integer 'm'.


You need to return 'YES' if you can color the graph using at most 'm' colors so that no two adjacent vertices are the same. Else, return 'NO'.


For example:
Input:
If the given adjacency matrix is:
[0 1 0]
[1 0 1]
[0 1 0] and 'm' = 3.

alt.txt

Output: YES

Explanation:
The given adjacency matrix tells us that 1 is connected to 2 and 2 is connected to 3. We can use three different colors and color all three nodes.
Hence we return true.


Problem approach

One can observe that the number of ways to traverse this tree is essentially the product of factorials of the number of children of each node in an n-ary tree. We can utilize a level-order traversal to count the children of a node, then calculate the factorial at each node and multiply the factorials calculated at each node.

Try solving now

2. Compress the String

Moderate
25m average time
60% success
0/80
Asked in companies
AdobeMathworksCIS - Cyber Infrastructure

Ninja has been given a program to do basic string compression. For a character that is consecutively repeated more than once, he needs to replace the consecutive duplicate occurrences with the count of repetitions.

Example:

If a string has 'x' repeated 5 times, replace this "xxxxx" with "x5".

The string is compressed only when the repeated character count is more than 1.

Note :

The consecutive count of every character in the input string is less than or equal to 9.
Problem approach

You have been given a sorted (lexical order) dictionary of an alien language.
Write a function that returns the order of characters as a string in the alien language. This dictionary will be given to you as an array of strings called 'dictionary', of size 'N'.

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 | 2 problems
Interviewed by Freecharge
1611 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Freecharge
0 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Freecharge
1042 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Freecharge
42 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