mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-19 03:55:50 +08:00
Update worst_best_time_complexity,
leetcode_two_sum
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
|
||||
#include "../include/include.hpp"
|
||||
|
||||
/* 方法一:暴力枚举 */
|
||||
class SolutionBruteForce {
|
||||
public:
|
||||
vector<int> twoSum(vector<int>& nums, int target) {
|
||||
@ -21,6 +22,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/* 方法二:辅助哈希表 */
|
||||
class SolutionHashMap {
|
||||
public:
|
||||
vector<int> twoSum(vector<int>& nums, int target) {
|
||||
|
Reference in New Issue
Block a user