Given two words word1 and word2, find the edit distance between word1 and word2 i.e. minimum number of operations required to convert word1 to word2.
You have the following 3 operations permitted on … Read More
Interview Questions asked in Google, Microsoft, Amazon
Given two words word1 and word2, find the edit distance between word1 and word2 i.e. minimum number of operations required to convert word1 to word2.
You have the following 3 operations permitted on … Read More
by Dhaval Dave
You are given a string T which consists of 0’s and 1’s. Now you input two non-empty strings U and V. Then your task is to match the Regular Expression – U*V with the given … Read More
by Dhaval Dave
Given two strings x and y, What is the cheapest possible way to convert x into y where following operations are allowed to perform –
by Dhaval Dave
Write a code to Convert number to words . example ip 15 op : fifteen
ip : 1234 op : one thousand and thirty four
Algorithm : When we detect a number at any place … Read More
by Dhaval Dave
Set of Numbers are given to you.
convert them to Roman numbers.
Solution is in Hacker Earth style… Read More
by Dhaval Dave
Power Set Power set P(S) of a set S is the set of all subsets of S. For example S = {a, b, c} then P(s) =
by Dhaval Dave
strtok() : Split string into tokens
Syntax :
char * strtok ( char * str, const char * delimiters );
Parameters
str C string to truncate.Notice that this string is modified by being broken into … Read More
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
three of the most common data types used in programming: numbers, strings and booleans. We assigned those data