InterviewBit academy

Yes, they’re emailing people one by one

Hey, Can you share your approach for the last problem?
On which test (A or B),Did you solve all 5 ?

1 Like

did you got email yet?

Test A(19 Oct).

When did you received mail?

@shashi_codes @jesus did you guys got result?

No not yet.

No mail yet, but my roomate has received mail from InterviewBit

I also got the mail today.
I was able to solve only 3.

No not yet. btw there’s one more website providing this 6 months course(coding ninja). Y’all should check it out.

1 Like

When did you got mail? like rn or in the morning? I also solved 3 but havent received anything yet.

i got in morning around 10:30

Bro I’ve solved 4 and haven’t received any mail yet

1 Like

Just had my interview, they asked 4 very basic questions and I answered all of them, the interview only lasted for 20 mins. :stuck_out_tongue:

3 Likes

Can you tell us some of the examples and topic that were asked in the interview?

1 Like

Sure.
Q1.
Interviewer(I) : Given a natural number N, find the numbers of bits required to store it.
Me(M) : \left \lfloor log_{2}(N) \right \rfloor + 1
Q2.
I : You are given 5 Apples, 3 Oranges and 6 Bananas, find the number of ways to arrange them in a single row?
M: \frac{14!}{5! \ . \ 3! \ . \ 6!}
Q3.
I : There is a person and an animal, the person can pet the animal only if either the name of the person is a sub-sequence of animal’s name or vice versa. You have tell if the person can pet the animal.
M: Wrote the code to do that in O(N) time and O(1) space, the interviewer seemed satisfied.
Q4.
I: Given a sorted array and a number N, find the number of occurrences of that number in the array in constant space.
M: subtract the lower_bound pointer for that number on that array from the upper_bound. Told him how these bounds can be implemented using Binary Search. Interviewer seemed satisfied.

3 Likes

Wrote the code, where??, Is the interview on Google docs??

No, they have their own interface for that.

did you use recursion for the 3rd question

Nope iteration. Let’s a be the larger length string of the two(a and b are the input strings). Swap a and b if a is not longer in length than b.
Then this code should work. This is just a pseudo-code-

int length_a = a.length(), length_b = b.length();
if(length_a < length_b)
	swap(a, b);

int ptr_a = 0, ptr_b = 0;

// find if b is a sub-sequence of a
while(ptr_a < length_a && ptr_b < length_b) {
	if(a[ptr_a] == b[ptr_b])
		++ptr_b;
	++ptr_a;
}

// if all chars in b matches
if(ptr_b == length_b)
	cout << "yes, can pet";
else
	cout << "no, cant pet";