Skip to content
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

Open
gongpeione opened this issue Jul 30, 2022 · 10 comments
Open

2022-07-30 #2

gongpeione opened this issue Jul 30, 2022 · 10 comments

Comments

@gongpeione
Copy link

No description provided.

@gongpeione
Copy link
Author

/*
 * @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

Nickname: Geeku
From vscode-hzfe-algorithms

@gongpeione
Copy link
Author

/*
 * @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

Nickname: G
From vscode-hzfe-algorithms

1 similar comment
@gongpeione
Copy link
Author

/*
 * @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

Nickname: G
From vscode-hzfe-algorithms

@gongpeione
Copy link
Author

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

Nickname: G
From vscode-hzfe-algorithms

@gongpeione
Copy link
Author

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

Nickname: G
From vscode-hzfe-algorithms

@gongpeione
Copy link
Author

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

Nickname: G
From vscode-hzfe-algorithms

@gongpeione
Copy link
Author

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

Nickname: G
From vscode-hzfe-algorithms

@gongpeione
Copy link
Author

两数之和

/*
 * @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



Nickname: G
From vscode-hzfe-algorithms

@gongpeione
Copy link
Author

/*
 * @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

Nickname: G
From vscode-hzfe-algorithms

@gongpeione
Copy link
Author

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

Nickname: G
From vscode-hzfe-algorithms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant