Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8f076d2
Add @vishalshirke7 as a contributor
vishalshirke7 Dec 25, 2018
5e96f6d
Update @vishalshirke7 as a contributor
vishalshirke7 Dec 25, 2018
1ea674f
Added python solutions for Day 4
vishalshirke7 Dec 25, 2018
3e185fe
modified readme
vishalshirke7 Dec 25, 2018
255b352
Merge branch 'master' into master
vishalshirke7 Dec 25, 2018
0310ed4
minor changes
vishalshirke7 Dec 26, 2018
43e1c9f
minor changes
vishalshirke7 Dec 26, 2018
1927037
minor changes
vishalshirke7 Dec 26, 2018
df272be
Add @vishal
vishalshirke7 Dec 26, 2018
65f23db
reverted adding as a contributor
vishalshirke7 Dec 26, 2018
f078b32
Update README.md
MadhavBahl Dec 26, 2018
5ed238a
Update CONTRIBUTORS.md
MadhavBahl Dec 26, 2018
c51210c
Update CONTRIBUTORS.md
MadhavBahl Dec 26, 2018
0005f73
update readme
vishalshirke7 Dec 27, 2018
05d5f27
update readme
vishalshirke7 Dec 27, 2018
034499d
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Dec 27, 2018
afcddef
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Dec 27, 2018
a14aad0
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Dec 27, 2018
06c3743
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Dec 27, 2018
2902744
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Dec 28, 2018
29426f0
Added python solutions for day 7
vishalshirke7 Dec 28, 2018
f8d6c47
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Dec 28, 2018
dcc8efc
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Dec 28, 2018
5ba1f3c
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Dec 29, 2018
e34f464
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Dec 30, 2018
8d89351
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Dec 31, 2018
d862c57
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Dec 31, 2018
1dd4195
Edited python solution for day 7
vishalshirke7 Dec 31, 2018
33134d2
Edited python solution for day 7
vishalshirke7 Dec 31, 2018
ed04738
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Dec 31, 2018
19f25ba
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Jan 1, 2019
0dd6f8a
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Jan 1, 2019
3cf4a60
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Jan 2, 2019
146ea2f
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Jan 2, 2019
e0335fc
Added python solution for day 10
vishalshirke7 Jan 2, 2019
8e45003
Changed readme for day 10
vishalshirke7 Jan 2, 2019
7633570
Merge remote-tracking branch 'upstream/master'
vishalshirke7 Jan 3, 2019
c0c97a5
minor changes
vishalshirke7 Jan 3, 2019
82df904
Python solution for day 11
vishalshirke7 Jan 3, 2019
ca212d5
Python solution for day10 and day11
vishalshirke7 Jan 3, 2019
883cc6d
Merge branch 'master' into master
MadhavBahl Jan 3, 2019
4ba50e3
resolved conflicts
vishalshirke7 Jan 7, 2019
73dcd30
Added python solution for day 13
vishalshirke7 Jan 7, 2019
970ef1d
Added python solution for day 13
vishalshirke7 Jan 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion day10/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ main()

### [Solution 2 by @vishalshirke7](./Python/permutations1.py)
```python

from itertools import permutations
"""
@author : vishalshirke7
Expand Down Expand Up @@ -185,6 +184,7 @@ String = "123"

for each in permutations(String):
print(''.join(each))

```

## Java Implementation
Expand Down
5 changes: 3 additions & 2 deletions day11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ public class longestCommonSubstring {
## Python Implementation

### [Solution using dynamic programming](./Python/lcs.py)

```python
"""
@author : vishalshirke7
Expand Down Expand Up @@ -355,4 +354,6 @@ def longest_common_substring(str1, str2):
print_output("abcdefg", "xyabcz")
print_output("XYXYXYZ", "XYZYX")
print_output("abcd", "efgh")
```
```


16 changes: 16 additions & 0 deletions day13/Python/factorial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
@author : vishalshirke7
@date : 07/01/2019
"""


def factorial(no):
if no <= 1:
return 1
else:
return no * factorial(no - 1)


n = int(input())
print("factorial of %d is %d" % (n, factorial(n)))

31 changes: 31 additions & 0 deletions day13/Python/fibonacci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""
@author : vishalshirke7
@date : 07/01/2019
"""


# Fibonacci Series using Dynamic Programming
def fibonacci(n):
if n <= 1:
return n
else:
if fib_series[n - 1] == 0:
fib_series[n - 1] = fibonacci(n - 1)

if fib_series[n - 2] == 0:
fib_series[n - 2] = fibonacci(n - 2)

fib_series[n] = fib_series[n - 2] + fib_series[n - 1]
return fib_series[n]


n = int(input())
fib_series = [0, 1]
while len(fib_series) < n + 1:
fib_series.append(0)
print(fibonacci(n))
if n == 0:
print(0)
else:
print(", ".join(map(str, fib_series)))

60 changes: 60 additions & 0 deletions day13/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,29 @@ int main()
return 0;
}
```

### Python Implementation

#### [Solution by @vishalshirke7](./Python/factorial.py)
```python
"""
@author : vishalshirke7
@date : 07/01/2019
"""


def factorial(no):
if no <= 1:
return 1
else:
return no * factorial(no - 1)


n = int(input())
print("factorial of %d is %d" % (n, factorial(n)))

```

***

***
Expand Down Expand Up @@ -230,4 +253,41 @@ int main()
cout<<"The "<<n<<pos<<" number of the fibonacci series is "<<fibonacci(n)<<endl;
return 0;
}
```

### Python Implementation

#### [Solution by @vishalshirke7](./Python/fibonacci.py)
```python
"""
@author : vishalshirke7
@date : 07/01/2019
"""


# Fibonacci Series using Dynamic Programming
def fibonacci(n):
if n <= 1:
return n
else:
if fib_series[n - 1] == 0:
fib_series[n - 1] = fibonacci(n - 1)

if fib_series[n - 2] == 0:
fib_series[n - 2] = fibonacci(n - 2)

fib_series[n] = fib_series[n - 2] + fib_series[n - 1]
return fib_series[n]


n = int(input())
fib_series = [0, 1]
while len(fib_series) < n + 1:
fib_series.append(0)
print(fibonacci(n))
if n == 0:
print(0)
else:
print(", ".join(map(str, fib_series)))

```