leetcodepushfront-LeetCode:力码

时间:2021-07-07 00:51:13
【文件属性】:
文件名称:leetcodepushfront-LeetCode:力码
文件大小:20KB
文件格式:ZIP
更新时间:2021-07-07 00:51:13
系统开源 leetcode 推前力码 接受的最喜欢/采访问题的提交 1. 二和 相关主题:数组、哈希表 class Solution { public: vector< int > twoSum (vector< int >& nums, int target) { unordered_map< int , int > hash; for ( int i= 0 ;i ({hash[j], i}); } else { hash[target-j]=i; } } return vector< int >(); } }; 2. 两个数相加 相关主题:链表、数学、递归 /* * * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr)
【文件预览】:
LeetCode-main
----README.md(112KB)

网友评论