Skip to content

Commit 6a0902f

Browse files
Update MergeTools
Changed the for() statement as per conversation
1 parent 55b0839 commit 6a0902f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Strings/MergeTools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Problem : https://www.hackerrank.com/challenges/merge-the-tools/
99
from collections import OrderedDict
1010

1111
def merge_the_tools(string, k):
12-
for i in range(0, len(string), k):
12+
for i in range(0, len(string)-k+1, k):
1313
print(''.join(OrderedDict.fromkeys(string[i:i + k])))
1414

1515
if __name__ == '__main__':

0 commit comments

Comments
 (0)