Skip to content

Aliparviz/Recursive-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Recursive-Algorithms

In this Repo there is 2 questions that solved with recursive functions .

Q1 : At first we have just one 0 . in each step we should recursively replace 0 with 01 and 1 with 10 . we are giving N and K to application and we want to find K-th digit from the left in the N-th step. input example : 3 4 output example : 0 explain: 0 -> 01 -> 0110 the forth digit from the left is 0

Q2 : We define the operation of permuting two strings as follows: the output string is obtained from the letters of the two main strings, not letters It has more and nothing less. For example, an example placement of two strings FULL and FAT can be FAFULTL. Be careful The position of the letters in the final string (the string resulting from placing two strings) have the same ratio to each other as they had in the two main strings. That is, if we have the string "ABST", in placing this string with other strings, the letter B must be after the letter A comes. In this issue, you have been given three fields; In the output, specify whether the third string is an insertion of the first two strings or not.

input example 1 : ABSTD LCKD ALCKBSTDD out put example 1 : Interleaving

input example 2 : JSSLC ISSOAAX SJSISSLCOAAX out put example 2 : Not Interleaving

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages