File tree 4 files changed +30
-0
lines changed
4 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ LeetCode Problems' Solutions in JavaScript
14
14
8 . [ 反转整数] ( ./algorithms/easy/reverse/reverse.js )
15
15
9 . [ 第一个错误的版本] ( ./algorithms/easy/solution/solution.js )
16
16
10 . [ 两个数组的交集 II] ( ./algorithms/easy/intersect/intersect.js )
17
+ 11 . [ 汉明距离] ( ./algorithms/easy/hammingDistance/hammingDistance.js )
17
18
18
19
## medium
19
20
Original file line number Diff line number Diff line change
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
+ } ;
Original file line number Diff line number Diff line change
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 ) { } ;
Original file line number Diff line number Diff line change
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
+ } ;
You can’t perform that action at this time.
0 commit comments