SDE - Intern
1 rounds | 5 Coding problems
128 views
Interview preparation journey
Preparation
Duration: 4 months
Topics: Data Structures, OOPs, DBMS, OS, CN, Project
Tip

Tip 1 : work on communication skills
Tip 2 : Data Structures and Algorithums

Application process
Where: Other
Eligibility: No criteria
Resume tip

Tip 1 : Include al teast two good project
Tip 2 : good to mention your skills

Interview rounds
01
Round
Medium
Video Call
Duration50 mins
Interview date13 Oct 2022
Problems5
System Design question

How to Design BookMyShow, Fandango (or similar movie ticketing application)
A movie ticket booking application such as BookMyShow facilitates users to browse through movies and live events, watch trailers, check seat availability and purchase a ticket. Let’s discuss how to design a similar online ticketing system

Check Permutation

#### For a given two strings, 'str1' and 'str2', check whether they are a permutation of each other or not.

##### Permutations of each other
view more
Problem approach

bool isAnagram(string s, string t) {

int a[256]={0};

for(int i=0;i {
a[s[i]]++;
}
for(int i=0;i {
a[t[i]]--;
}
for(int i=0;i<256;i++)
if(a[i]!=0)
return false;
return true;

}

Find Peak Element

#### Given an array of ‘n’ integers arr. Find the Peak element of the array. The peak element of an array is defined as that element which is greater than both of...

view more
Problem approach

int findPeakElement(vector& nums) {
int max=-2147483648;
int pos=0;
for(int i=0;imax)
{
max=nums[i];
pos=i;
}
}
return pos;

}

Diameter of Binary Tree

#### The diameter of a binary tree is the length of the longest path between any two end no...

view more
Problem approach

int height(TreeNode* root,int *x)
{
int lh=0;
int rh=0;
int ld=0;
int rd=0;
if(root==NULL)
return 0;
ld=height(root->left,&lh);
rd=height(root->right,&rh);

*x=max(lh,rh)+1;
return max(lh+rh+1,max(ld,rd));

}
int diameterOfBinaryTree(TreeNode* root) {
int x=0;
return height(root,&x)-1;
}

Puzzle

Make a fair coin from a biased coin

You are given a function foo() that represents a biased coin. When foo() is called, it returns 0 with 60% probability, and 1 with 40% probability. Write a new function that returns 0 and 1 with a 50% probability each. Your function should use only foo(), no other library method.

Problem approach

We know foo() returns 0 with 60% probability. How can we ensure that 0 and 1 are returned with a 50% probability?
The solution is similar to this post. If we can somehow get two cases with equal probability, then we are done. We call foo() two times. Both calls will return 0 with a 60% probability. So the two pairs (0, 1) and (1, 0) will be generated with equal probability from two cal...

view more
Start a Discussion
Similar interview experiences
Software Quality Engineer
6 rounds | 19 problems
431 views
Member of Technical Staff
3 rounds | 10 problems
279 views
Technical Consultant Intern
2 rounds | 2 problems
102 views
SDE - 1
3 rounds | 6 problems
60 views
Companies with similar interview experiencs
SDE - Intern
2 rounds | 3 problems
Interviewed by Trilogy Innovations
16837 views