Skip to content

Instantly share code, notes, and snippets.

Avatar
🍁
繋いだ手を離さないでよ。

Akisame kirainmoe

🍁
繋いだ手を離さないでよ。
View GitHub Profile
View longest_substring_without_repeating_characters.cpp
class Solution {
public:
inline int lengthOfLongestSubstring(string s) {
const int maxs = 96;
int pos[maxs];
int ans = 0;
int cur = 0;
int tmp;
int length = s.length();
View two_sum.cpp
class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
vector<int> res;
map<int, int> numMap;
int size = nums.size();
if (size < 2) {
return res;
}