Tip 1 : Must solve coding problems minimum 2-3 daily and 300+ problems would be great to tackle interview questions.
Tip 2 : Work on at least 3 major projects which involve many technology stacks.
Tip 3 : Prepare your resume really well because it's our first impression.
Tip 1 : Have at least 3 good projects in your resume mentioning in detail, can also use Google framework "Accomplished [X] as measured by [Y] by doing [Z]" while mentioning the project details.
Tip 2 : For less than 2 years experience keep it a single-page resume and check your grammatical errors. I would recommend you Grammarly for it.
Around 8 pm I got the call from Interviewer. The interview was friendly, Only one problem was asked then general discussion.
Swapping 2 numbers without any 3rd variable.
Tip 1 : x = x + y
Tip 2 : y= x - y
Tip 3 : x =x - y
It was given the flexibility of 1 day to take as per our convenience. The Environment of Coderbyte was good. Ten MCQs and five coding questions were asked.
If the given string is: STR = "abcde". You have to print the string "edcba".
Try to solve the problem in O(1) space complexity.
They expected us to solve using Javascript:
Step 1 : split()
Step 2 : reverse()
Step 3 : join()
Strings ‘STR’ and ‘PTR’ consist only of English uppercases.
Length of string ‘STR’ will always be greater than or equal to the length of string ‘PTR’.
The index is ‘0’ based.
In case, there is no anagram substring then return an empty sequence.
For example, the given ‘STR’ is ‘BACDGABCD’ and ‘PTR’ is ‘ABCD’. Indices are given
0-3 in ‘STR’ index 0,1,2,3 are ‘BACD’ and it is an anagram with ‘ABCD’
1-4 in ‘STR’ index 1,2,3,4 are ‘ACDG’ and it is not anagram with ‘ABCD’
2-5 in ‘STR’ index 2,3,4,5 are ‘CDGA’ and it is not anagram with ‘ABCD’
3-6 in ‘STR’ index 3,4,5,6 are ‘DGAB’ and it is not anagram with ‘ABCD’
4-7 in ‘STR’ index 4,5,6,7 are ‘GABC’ and it is not anagram with ‘ABCD’
5-8 in ‘STR’ index 5,6,7,8 are ‘ABCD’ and it is an anagram with ‘ABCD’
Hence there are 2 starting indices of substrings in the string ‘STR’ that are anagram with given ‘PTR’ which are index 0 and 5.
If the first expression is: (a + (b + c)) and the second expression is: a + b + c. The expressions are the same because if they are evaluated, they will give the same output. So the answer is “YES”.
You can assume that any expression is evaluated according to the BODMAS rule.
Step 1 : Using .replace() regex inside the method
Step 2 : Checking the length and returning 0 or 1
You need to return the root of the binary tree, the tree will be printed in level order format.
Step 1 : Using a map with regex
Step 2 : Creating an object initializing it to null
Step 3 : Taking for loop till the length
Step 4 : Checking for parent and child
Step 5 : Each child cannot have 2 parent
Step 6 : We check if there's more than one root node
Step 7 : Only one node to have no parent, which is the root node.
If the given string is S = "abcba", then the possible substrings are "abc" and "cba". As "abc" starts with a lower index (i.e. 0, "cba" start with index 2), we will print "abc" as our shortest substring that contains all characters of 'S'.
Step 1 : Need to have 0 index in one variable and then use .split() for the rest in the next variable
Step 2 : Take a loop start with the smallest possible substrings, then go up.
Step 3 : To make a function to check to see if all the chars in the needle are in the given string
Afternoon at 2 pm, The interviewer was friendly. Two questions and then general discussion.
What is the event loop and event queue?
Tip 1 : JavaScript runtime uses a message queue, which is a list of messages to be processed
Tip 2 : Each message has an associated function which gets called in order to handle the message
Tip 3 : At some point during the event loop, the runtime starts handling the messages on the queue, starting with the oldest one
Resource allocation and deadlock avoidance algorithm
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which operator is used for exponentiation in Python?