4 ms·
So are these just copied from leetcode? For example, leetcode's hamming distance versus yours: LeetCode: The Hamming distance between two integers is the numb
by elbigbad 10y ago
So are these just copied from leetcode? For example, leetcode's hamming distance versus yours:
LeetCode:
The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
Given two integers x and y, calculate the Hamming distance.
Yours:
1)Hamming Distance
The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
Given two integers x and y, calculate the Hamming distance.
Another one, LeetCode:
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
Yours:
2)Single Number
Given an array of integers, every element appears twice except for one. Find that single one.
Note:Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
- Sherxon 10y agoYes, many problems are the same as leetcode problems. The purpose of this repo is just learning.