Find number of ways a string can be decoded into, if A=1, B=2, C=3 … Z=25 and encoding number is 123 ways decoding can be done is
1 2 3 = A B C
1
… Read More 1 2 3 = A B C
1
Interview Questions asked in Google, Microsoft, Amazon
by Dhaval Dave
by Dhaval Dave
by Dhaval Dave
Given two strings string1 and string2, find the smallest substring in string1 containing all characters of string2 efficiently.For Example:
Input string1: “this is a test string”
Input string2: “tist”
Output string: “t stri”
by Dhaval Dave
by Dhaval Dave
We have array a[ ]= {1, 2, 3, 4, 5, 6, 7, 8, 4, 10};
And we need to find a number which is duplicate in O(n) and Space complexity O(1)
Method 1 ) Sorting
by Dhaval Dave
by Dhaval Dave
by Dhaval Dave
by Dhaval Dave
by Dhaval Dave
[1]