Find the kth number with prime factors 3, 5 and 7
Design an algorithm such that we have to find the k th element in the array such that their only prime factors are 3,5
Interview Questions asked in Google, Microsoft, Amazon
by Dhaval Dave
Design an algorithm such that we have to find the k th element in the array such that their only prime factors are 3,5
by Dhaval Dave
by Dhaval Dave
by Dhaval Dave
by Dhaval Dave
You have a rectangular chocolate bar that consists of width x height square tiles. You can split it into two rectangular … Read More
by Dhaval Dave
Given two sequences, print the longest subsequence present in both of them.
Examples:
LCS for input Sequences “ABCDGH” and “AEDFHR” is “ADH” of length 3.
LCS for input Sequences “AGGTAB” and
by Dhaval Dave
With two different solutions.
Eg : Input : teeterson Output : r,
by Dhaval Dave
We have given Two methods in O(n^2)
by Dhaval Dave
by Dhaval Dave
Method 1 (Brute Force Method)
We can consider all substrings.
One by one and check for each substring whether it contains all unique characters or not.
There