-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2022-07-30 #2
Comments
/*
* @lc app=leetcode id=67 lang=javascript
*
* [67] Add Binary
*/
// @lc code=start
/**
* @param {string} a
* @param {string} b
* @return {string}
*/
var addBinary = function(a, b) {
};
// @lc code=end
|
/*
* @lc app=leetcode id=58 lang=javascript
*
* [58] Length of Last Word
*/
// @lc code=start
/**
* @param {string} s
* @return {number}
*/
var lengthOfLastWord = function(s) {
};
// @lc code=end
|
1 similar comment
/*
* @lc app=leetcode id=58 lang=javascript
*
* [58] Length of Last Word
*/
// @lc code=start
/**
* @param {string} s
* @return {number}
*/
var lengthOfLastWord = function(s) {
};
// @lc code=end
|
58 [58] Length of Last Word,Length of Last Word /*
* @lc app=leetcode id=58 lang=javascript
*
* [58] Length of Last Word
*/
// @lc code=start
/**
* @param {string} s
* @return {number}
*/
var lengthOfLastWord = function(s) {
};
// @lc code=end
|
/*
* @lc app=leetcode id=58 lang=javascript
*
* [58] Length of Last Word
*/
// @lc code=start
/**
* @param {string} s
* @return {number}
*/
var lengthOfLastWord = function(s) {
};
// @lc code=end
|
Leetcode: 58 Length of Last Word /*
* @lc app=leetcode id=58 lang=javascript
*
* [58] Length of Last Word
*/
// @lc code=start
/**
* @param {string} s
* @return {number}
*/
var lengthOfLastWord = function(s) {
};
// @lc code=end
|
58 Length of Last Word/*
* @lc app=leetcode id=58 lang=javascript
*
* [58] Length of Last Word
*/
// @lc code=start
/**
* @param {string} s
* @return {number}
*/
var lengthOfLastWord = function(s) {
};
// @lc code=end
|
两数之和
|
/*
* @lc app=leetcode.cn id=1 lang=javascript
*
* [1] 两数之和
*/
// @lc code=start
/**
* @param {number[]} nums
* @param {number} target
* @return {number[]}
*/
var twoSum = function(nums, target) {
};
// @lc code=end
|
1 Two Sum/*
* @lc app=leetcode id=1 lang=javascript
*
* [1] Two Sum
*/
// @lc code=start
/**
* @param {number[]} nums
* @param {number} target
* @return {number[]}
*/
var twoSum = function(nums, target) {
const m = {};
for (let i = 0; i < nums.length; i++) {
const num = nums[i];
if (m[target - num] !== undefined) {
return [m[target - num], i];
}
if (m[num] === undefined) {
m[num] = i;
}
}
};
// @lc code=end
|
No description provided.
The text was updated successfully, but these errors were encountered: