diff --git a/Count And Say.py b/Count And Say.py new file mode 100644 index 0000000..ae3bfa7 --- /dev/null +++ b/Count And Say.py @@ -0,0 +1,21 @@ +class Solution: + # @param A : integer + # @return a string + def countAndSay(self, A): + if A == 1: + return "1" + + array_one = "1" + for _ in range(2, A+1): + j = 0 + array_two = "" + while j < len(array_one): + count = 1 + while j+1 < len(array_one) and array_one[j] == array_one[j+1]: + j += 1 + count += 1 + array_two += str(count) + str(array_one[j]) + j += 1 + array_one = array_two + + return array_one diff --git a/README.md b/README.md index 0088484..e5eb88c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,26 @@ # 365_days_of_challenge_interviewbit_soll -All the InterviewBit Questions Beginners can do during 365 days of code of challenge +This Repo consists of the following files : +- .git +- Count And Say.py +- Leap Year.py +- Max Min.py +- Pick from both sides.py +- Prime Sum.py +- README.md +- Reverse the String.py +- Total Moves For Bishop.py +- Verify Prime.py + + + + +- --->This is a test repository created by @prateek271 +

+--- +

### Features of the project: +
+1. This project is automated +
+ + +- this is a test repo \ No newline at end of file