Skip to content

Commit 6b44b3b

Browse files
committed
update
1 parent 4bbd03b commit 6b44b3b

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ LeetCode Problems' Solutions in JavaScript
1414
8. [反转整数](./algorithms/easy/reverse/reverse.js)
1515
9. [第一个错误的版本](./algorithms/easy/solution/solution.js)
1616
10. [两个数组的交集 II](./algorithms/easy/intersect/intersect.js)
17+
11. [汉明距离](./algorithms/easy/hammingDistance/hammingDistance.js)
1718

1819
## medium
1920

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// description: https://leetcode-cn.com/explore/interview/card/top-interview-questions-easy/26/others/65/
2+
// 汉明距离
3+
4+
/**
5+
* @param {number} x
6+
* @param {number} y
7+
* @return {number}
8+
*/
9+
var hammingDistance = function(x, y) {
10+
return (x ^ y).toString(2).replace(/0/g, "").length;
11+
};

algorithms/easy/rotate/rotate.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// description: https://leetcode-cn.com/explore/interview/card/top-interview-questions-easy/1/array/31/
2+
// 旋转图像
3+
4+
/**
5+
* @param {number[][]} matrix
6+
* @return {void} Do not return anything, modify matrix in-place instead.
7+
*/
8+
var rotate = function(matrix) {};
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// description: https://leetcode-cn.com/explore/interview/card/top-interview-questions-medium/29/array-and-strings/75/
2+
// 三数之和
3+
4+
/**
5+
* @param {number[]} nums
6+
* @return {number[][]}
7+
*/
8+
var threeSum = function(nums) {
9+
//
10+
};

0 commit comments

Comments
 (0)