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";
Whatever, i havenāt received the mail yet, Iām losing hope now
same dude idk what is happening.
How many did you solve
They have interviews till 26 th, so donāt worry you may get an email soon. Otherwise why not ping them directly and ask if results are still pending for some students?
Maybe theyāre going through the applications in the order they came, i had applied for the course just before the deadline
Iāll ping them by the end of the day when i reach home. Thanks
Possible, I had applied around a month before or so.
Hope so
(10 chars)
3 and a half
You probably get in, you should ping them too.
I checked the website, it says, āCongrats, you have cleared the entrance test. As a next step please select a slot of 30 mins for personal interviewā, but I didnāt receive any mail, Lol, I was worried, anyways, thanks for the support, good luck to all of you.
What happens when the array is [1, 2, 2, 2, 2, 2], where will the upper bound pointer point at ??
Didnāt know that there is also a case of direct selection .
You didnāt specify the number N, but lets take both 1 and 2
1-
lower_bound points to 0 and upper_bound points to 1. So, 1 - 0 = 1, and there only 1 instance of 1
2-
lower bound points to 1 and upper bound points to the end of the array that is 6, so 6 - 1 = 5 and there are 5 instances of 2.
I meant n to be 2, anyways good solution, congrats on your selection!
Hopefully Iāll see you in IBAcademy then
donāt you think the answer for the second question is 3!.5!.3!.6! , if the same type of fruits should be together and duplication is allowed
If same type fruit are together itās 3!
Because we think of same fruits together as a single unit, looking at the question i think the examiner means that same type of fruits are idemtical
Share your approach for 5th question