Skip to content

[IMP] CODE IMPROVED AND REMOVED DEAD CODE #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 0 additions & 5 deletions HackerRank-A-Very-Big-Sum/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ def aVeryBigSum(ar):

if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')

ar_count = int(input())

ar = list(map(int, input().rstrip().split()))

result = aVeryBigSum(ar)

fptr.write(str(result) + '\n')

fptr.close()
11 changes: 2 additions & 9 deletions HackerRank-Birthday-Cake-Candles/solution.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
#!/bin/python3

import math

import os
import random
import collections
import re
import sys


def birthdayCakeCandles(ar):
return (max(collections.Counter(ar).values()))

if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')

ar_count = int(input())

ar = list(map(int, input().rstrip().split()))

result = birthdayCakeCandles(ar)

fptr.write(str(result) + '\n')

fptr.close()
10 changes: 0 additions & 10 deletions HackerRank-Bon-Appetit/solution.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/python3

import math
import os
import random
import re
import sys

def bonAppetit(bill, k, b):
count=0
Expand All @@ -19,13 +14,8 @@ def bonAppetit(bill, k, b):

if __name__ == '__main__':
nk = input().rstrip().split()

n = int(nk[0])

k = int(nk[1])

bill = list(map(int, input().rstrip().split()))

b = int(input().strip())

bonAppetit(bill, k, b)
6 changes: 1 addition & 5 deletions HackerRank-Climbing-The-Leaderboard/solution.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/bin/python3

import math
import os
import random
import re
import sys

def climbingLeaderboard(scores, alice):
scores = sorted(list(set(scores)))
Expand All @@ -14,7 +10,7 @@ def climbingLeaderboard(scores, alice):
for i in alice:
while (n > index and i >= scores[index]):
index += 1
rank_list.append(n+1-index)
rank_list.append(n+1-index)
return rank_list

if __name__ == '__main__':
Expand Down
11 changes: 2 additions & 9 deletions HackerRank-Compare-Triplets/solution.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/bin/python3

import math

import os
import random
import re
import sys


def compareTriplets(a, b):
score = [0,0]
Expand All @@ -19,14 +17,9 @@ def compareTriplets(a, b):

if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')

a = list(map(int, input().rstrip().split()))

b = list(map(int, input().rstrip().split()))

result = compareTriplets(a, b)

fptr.write(' '.join(map(str, result)))
fptr.write('\n')

fptr.close()
8 changes: 0 additions & 8 deletions HackerRank-Day-Of-Programmer/solution.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/bin/python3

import math
import os
import random
import re
import sys
import calendar

def solve(year):
Expand All @@ -16,11 +12,7 @@ def solve(year):

if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')

year = int(input())

result = solve(year)

fptr.write(result + '\n')

fptr.close()
12 changes: 0 additions & 12 deletions HackernRank-Birthday-Chocolate/solution.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/bin/python3

import math
import os
import random
import re
import sys

# Complete the birthday function below.
def birthday(s, d, m):
Expand All @@ -24,19 +20,11 @@ def birthday(s, d, m):

if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')

n = int(input().strip())

s = list(map(int, input().rstrip().split()))

dm = input().rstrip().split()

d = int(dm[0])

m = int(dm[1])

result = birthday(s, d, m)

fptr.write(str(result) + '\n')

fptr.close()