diff --git a/025_direction_deduction.py b/025_direction_deduction.py index 7285ebf..ad2c892 100644 --- a/025_direction_deduction.py +++ b/025_direction_deduction.py @@ -18,6 +18,7 @@ # i +=1 # return arr + # opposite = {'NORTH': 'SOUTH', 'EAST': 'WEST', 'SOUTH': 'NORTH', 'WEST': 'EAST'} # def dirReduc(plan): # new_plan = [] @@ -28,6 +29,7 @@ # new_plan.append(d) # return new_plan + def dirReduc(arr): dir = " ".join(arr) dir2 = dir.replace("NORTH SOUTH",'').replace("SOUTH NORTH",'').replace("EAST WEST",'').replace("WEST EAST",'') diff --git a/026_valid_parantheses.py b/026_valid_parantheses.py new file mode 100644 index 0000000..e69de29