Skip to content

Commit 46bb5fc

Browse files
committed
Update Python3 Version
1 parent 1858ef8 commit 46bb5fc

File tree

97 files changed

+99
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+99
-96
lines changed

01-knapsack-problem.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://www.geeksforgeeks.org/0-1-knapsack-problem-dp-10/
33
# https://www.youtube.com/watch?v=fJbIuhs24zQ
44

3sum.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/3sum
33

44
from typing import List

6-type-knapsack-problem.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://www.geeksforgeeks.org/0-1-knapsack-problem-dp-10/
33
# https://www.youtube.com/watch?v=iBnWHZmlIyY
44
# https://leetcode.com/problems/partition-equal-subset-sum

Bash_Scripts/index.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
ps -l

CSES_Problem_Set/Bit-Strings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://cses.fi/problemset/task/1617
33

44
if __name__ == '__main__':

CSES_Problem_Set/Coin-Piles.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://cses.fi/problemset/task/1754
33

44

CSES_Problem_Set/Distinct-Numbers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://cses.fi/problemset/task/1621
33

44
if __name__ == '__main__':

CSES_Problem_Set/Increasing-Array.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://cses.fi/problemset/task/1094
33

44
if __name__ == '__main__':

CSES_Problem_Set/Missing-Number.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://cses.fi/problemset/task/1083
33

44
if __name__ == '__main__':

CSES_Problem_Set/Repetitions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://cses.fi/problemset/task/1069
33

44
if __name__ == '__main__':

CSES_Problem_Set/Trailing-Zeros.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://cses.fi/problemset/task/1618
33

44
if __name__ == '__main__':

CSES_Problem_Set/Two-Sets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://cses.fi/problemset/task/1092
33

44
if __name__ == '__main__':

CSES_Problem_Set/Weird-Algorithm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://cses.fi/problemset/task/1068/
33

44

Longest-Common-Subsequence/lcs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22

33

44
"""

Matrix-Chain-Multiplication/mcm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22

33

44
"""

Python-Code-Challenges/find-all-list-items.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22

33

44
def index_all(search_list, target):

Python-Code-Challenges/find-prime-factors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22

33

44
def get_prime_factors(n):

Python-Code-Challenges/sort-a-string.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22

33

44
def sort_words(string):

alphabet-rangoli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
import string
44

any-or-all.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
if __name__ == '__main__':

average-of-levels-in-binary-tree.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/average-of-levels-in-binary-tree/
33

44

best-time-to-buy-and-sell-stock.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22
# https://leetcode.com/explore/interview/card/top-interview-questions-easy/92/array/564/
33
# https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii
44

binary-search.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
def binary_search(A, n, x):

binary-tree-inorder-traversal.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/binary-tree-inorder-traversal/
33

44

binary-tree-level-order-traversal-2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/binary-tree-level-order-traversal-ii/
33

44

binary-tree-level-order-traversal.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/binary-tree-level-order-traversal/
33

44

binary-tree-paths.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
"""
44
https://leetcode.com/problems/binary-tree-paths/

binary-tree-postorder-traversal.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/binary-tree-postorder-traversal/
33

44

binary-tree-preorder-traversal.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/binary-tree-preorder-traversal/
33

44

bubble-sort.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
def bubble_sort(A, n):

check-if-a-string-can-break-another-string.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
"""
44
https://leetcode.com/problems/check-if-a-string-can-break-another-string/

climbing-stairs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/climbing-stairs/
33

44

conditionals.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
a, b = 0, 1
44
if a < b:

container-with-most-water.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
def max_area(height) -> int:

count-negative-numbers-in-a-sorted-matrix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/
33

44

create-target-array-in-the-given-order.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
"""
44
https://leetcode.com/problems/create-target-array-in-the-given-order/

decrypt-string-from-alphabet-to-integer-mapping.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/decrypt-string-from-alphabet-to-integer-mapping/
33

44

deepest-leaves-sum-2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/deepest-leaves-sum/
33

44

deepest-leaves-sum.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/deepest-leaves-sum/
33

44

delete-columns-to-make-sorted.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
"""
44
https://leetcode.com/problems/delete-columns-to-make-sorted/

designer-door-mat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
def main():

destination-city.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
"""
44
https://leetcode.com/problems/destination-city/

find-second-maximum-number-in-a-list.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
def main():

find-three-largest-number.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
def findThreeLargestNumbers(array):

finding-the-percentage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
def main():

first-unique-character-in-a-string.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3
1+
#!/usr/bin/python3
22
# https://leetcode.com/problems/first-unique-character-in-a-string/
33

44

for-loops.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
lines = open('wap.txt', 'r')
44
for line in lines.readlines():

generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
def is_prime(n):

group-the-people-given-the-group-size-they-belong-to.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
"""
44
https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to/

hello.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
# if __name__ == '__main__':
44
# N, M = [int(x) for x in input().split()]

inclusive-range.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
class InclusiveRange:

inheritance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
class Fibonacci():

input.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
def set_annual():
44
global annual

itertools-product.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
from itertools import product
44

linear-search.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
def linear_search(A, n, x):

linked-list-swap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
class ListNode:

map-and-lambda-expression.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
cube = lambda x: x ** 3
44

matching-specific-string.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
import re
44

maximum-69-number.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
"""
44
https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/

minimum-add-to-make-parentheses-valid.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
"""
44
https://leetcode.com/problems/minimum-add-to-make-parentheses-valid/

name-lookup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
if __name__ == '__main__':
44
N = int(input())

nested-list.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
def main():

path-sum-2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
"""
44
https://leetcode.com/problems/path-sum-ii/

path-sum.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33
"""
44
https://leetcode.com/problems/path-sum/

prime.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
def is_prime(n):

python-lists.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/bin/python3.6
1+
#!/usr/bin/python3
22

33

44
def main():

0 commit comments

Comments
 (0)