-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprototype.h
More file actions
32 lines (28 loc) · 1.12 KB
/
Copy pathprototype.h
File metadata and controls
32 lines (28 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// Created by bright on 16-12-19.
//
#ifndef LEETCODE_PROTOTYPE_H
#define LEETCODE_PROTOTYPE_H
#include <iostream>
#include <vector>
#include <string>
#include <unordered_set>
#include <algorithm>
using namespace std;
string convert(string text, int nRows); //6
int findRadius(vector<int> &houses, vector<int> &heaters); //475
int totalQueens(int n); //52
int guessNumber(int n); //374
bool find132pattern(vector<int> &nums); //456
bool find132pattern_opt(vector<int> &nums); //456 opt
int lengthLongestPath(string input); //388
int lengthLongestPath_opt(string input); //388
int longestIncreasingPath(vector<vector<int>> &matrix); //329
int nthUglyNumber(int n); //264
int nthUglyNumber_opt(int n); //264
vector<int> majorityElement(vector<int> &nums); //Majority Element II
int maxRotateFunction(vector<int> &A); //396
vector<vector<int>> threeSum(vector<int> &nums); //15
vector<vector<string>> findLadders(string beginWord, string endWord, unordered_set<string> &wordList); //126
vector<vector<string> > findLadders_opt(string beginWord, string endWord, unordered_set<string> &dict); //126
#endif //LEETCODE_PROTOTYPE_H