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

SDE - Intern

CityMall
upvote
share-icon
2 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Journey
I was an active participant in various coding competitions during my college years and solved numerous questions on different competitive programming platforms. Since I secured a placement quite early, I was not eligible to apply to other companies through the college placement process. However, I continued to work hard and focused on exploring various off-campus opportunities.
Application story
I requested a referral from someone working at the company, then received a backend assignment, which was followed by interviews.
Why selected/rejected for the role?
Rejected. I received feedback that I have good problem-solving skills, but more development knowledge was required for this role.
Preparation
Duration: 8 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Computer Networking, Object Oriented Programming, ML
Tip
Tip

Tip 1: Never skip any topic from any chapter or subject.
Tip 2: Learn to explain your thoughts clearly and confidently.
Tip 3: Learn from past experiences, previous interviews, and commonly asked problems.
Tip 4: Include at least 4 well-structured projects in your resume.

Application process
Where: Referral
Eligibility: Good Knowledge of Backend Development
Resume Tip
Resume tip

Tip 1: Include at least 4 projects on your resume.
Tip 2: Never write anything false on your resume. You will always get caught — so be honest and genuine.

Interview rounds

01
Round
Easy
Video Call
Duration60 Minutes
Interview date8 Jul 2022
Coding problem2

After the preliminary assignment, the interview was scheduled. The interviewer asked only data structures and algorithms problems, along with questions related to my projects in this round.

1. Longest Palindromic Substring

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

You are given a string ('STR') of length 'N'. Find the longest palindromic substring. If there is more than one palindromic substring with the maximum length, return the one with the smaller start index.

Note:
A substring is a contiguous segment of a string.

For example : The longest palindromic substring of "ababc" is "aba", since "aba" is a palindrome and it is the longest substring of length 3 which is a palindrome, there is another palindromic substring of length 3 is "bab" since "aba" starting index is less than "bab", so "aba" is the answer.

Problem approach

dp(i, j) represents whether the substring s(i ... j) forms a palindrome. dp(i, j) is true if s(i) is equal to s(j) and the substring s(i+1 ... j-1) is also a palindrome. Whenever a palindrome is found, we check if it is the longest one so far. The time complexity is O(n^2).

Try solving now

2. Intersection of Two Linked Lists

Easy
25m average time
73% success
0/40
Asked in companies
Hewlett Packard EnterpriseSamsungIntuit

You are given two Singly Linked Lists of integers, which may have an intersection point.

Your task is to return the first intersection node. If there is no intersection, return NULL.


Example:-
The Linked Lists, where a1, a2, c1, c2, c3 is the first linked list and b1, b2, b3, c1, c2, c3 is the second linked list, merging at node c1.

alt.txt

Problem approach

In the first iteration, we reset the pointer of one linked list to the head of the other linked list after it reaches the tail node. In the second iteration, we move both pointers until they point to the same node. The operations in the first iteration help counteract the difference in length between the two lists. Therefore, if the two linked lists intersect, the meeting point in the second iteration will be the intersection node. If the two linked lists do not intersect at all, the meeting point in the second iteration will be the tail node of both lists, which is null.

Try solving now
02
Round
Easy
Video Call
Duration60 Minutes
Interview date15 Jul 2022
Coding problem1

This round was conducted by the hiring manager. I was asked several questions related to Java, Spring Boot, and APIs since I had mentioned them in my resume. The round concluded with a Data Structures and Algorithms problem.

1. The Celebrity Problem

Moderate
30m average time
60% success
0/80
Asked in companies
OlaVisaApple

There are ‘N’ people at a party. Each person has been assigned a unique id between 0 to 'N' - 1(both inclusive). A celebrity is a person who is known to everyone but does not know anyone at the party.

Given a helper function ‘knows(A, B)’, It will returns "true" if the person having id ‘A’ know the person having id ‘B’ in the party, "false" otherwise. Your task is to find out the celebrity at the party. Print the id of the celebrity, if there is no celebrity at the party then print -1.

Note:
1. The helper function ‘knows’ is already implemented for you.
2. ‘knows(A, B)’ returns "false", if A doesn't know B.
3. You should not implement helper function ‘knows’, or speculate about its implementation.
4. You should minimize the number of calls to function ‘knows(A, B)’.
5. There are at least 2 people at the party.
6. At most one celebrity will exist.
Problem approach

Create two indices, i and j, where i = 0 and j = n-1.
Run a loop until i is less than j.

  • Check if i knows j. If true, then i cannot be a celebrity, so increment i (i.e., i++).
  • Otherwise, j cannot be a celebrity, so decrement j (i.e., j--).

After the loop, i will be the potential celebrity candidate.

Finally, verify whether this candidate is actually a celebrity by running another loop from 0 to n-1 to check two conditions for every person:

  1. The candidate should not know anyone.
  2. Everyone should know the candidate.

If either of these conditions fails, return -1. Otherwise, at the end of the loop, we can confirm that the candidate is indeed the celebrity.

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 | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
SDE - Intern
2 rounds | 3 problems
Interviewed by CityMall
1083 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6451 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
2 rounds | 4 problems
Interviewed by Arcesium
3689 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Arcesium
2650 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by BNY Mellon
2324 views
0 comments
0 upvotes