We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Hamming Distance
Hamming Distance
Sort by
recency
|
29 Discussions
|
Please Login in order to post a comment
after reading the editorial I undertand why this problem is expert the proposed sol uses musch less memory (unimportant, my uses 100k) and is much more fast (may be 32 (or 64) times faster ?) BUT using basic C my sol runs in less than 1 sec on test case 12 (50k string) the only I have unlocked All test run whith time limit so why use a contrived solution?
why this problem is valutaed so high ? expert 150 points ?
solved with very basic coding, no problem at all Why 50 points problem are so hard ?
My python code passed 20 test case but other 20 test cases showing time exceeded problem.Please any one let me know which lines of code i can optimize.
N=int(input())
while True:
S = input() if len(S) != N: print("Invalid input") exit() M=int(input()) result=[] for i in range(M): cmd=input() c=cmd.split(' ')
r=[print(i) for i in result]
Here is Hamming Distance problem solution in Python Java C++ and c programming - https://programs.programmingoneonone.com/2021/07/hackerrank-hamming-distance-problem-solution.html
How to make this code run within time limit?