LeetCode 1021. Best Sightseeing Pair

1
2
3
4
5
6
7
int maxScoreSightseeingPair(int* A, int ASize) {
   
    int lastIpart=0;
    int max=INT_MIN;
   
    for(int i=0;imax){
                ma[......]<p class="read-more"><a href="https://www.gerrytang.top/?p=485">Read more</a></p>

LeetCode 365. Water and Jug Problem

1
2
3
4
5
6
7
8
9
int getGCD(int a,int b){
    if(a==0){
        return b;
    }
    if(b==0){
        return a;
    }
    if(a==b)return a;
    if(a[......]<p class="read-more"><a href="https://www.gerrytang.top/?p=482">Read more</a></p>

LeetCode 399. Evaluate Division

1
2
3
4
5
6
7
8
9
static auto x = []()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    return 0;
}();
class GraphNode{
public:
    string key;[......]<p class="read-more"><a href="https://www.gerrytang.top/?p=480">Read more</a></p>

LeetCode 290. Word Pattern

1
2
3
4
5
6
class Solution(object):
    def wordPattern(self, pattern, str):
        map1={}
        map2={}
        strarr=str.split(' ')
        if len(p[......]<p class="read-more"><a href="https://www.gerrytang.top/?p=475">Read more</a></p>

LeetCode 79. Word Search

1
2
3
bool check(char** board,bool** flag,char* w,int row,int col, int boardRowSize, int boardColSize){
    if(*w=='\0')return true;
    if(row>0){[......]<p class="read-more"><a href="https://www.gerrytang.top/?p=473">Read more</a></p>

LeetCode 916. Word Subsets

1
2
3
4
5
6
7
8
9
static auto x = []()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    return 0;
}();
class Solution {
private:
    int* getSig(s[......]<p class="read-more"><a href="https://www.gerrytang.top/?p=470">Read more</a></p>

LeetCode 914. X of a Kind in a Deck of Cards

1
2
3
4
5
6
7
8
9
static auto x = []()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    return 0;
}();
class Solution {
private:
    int getGreate[......]<p class="read-more"><a href="https://www.gerrytang.top/?p=468">Read more</a></p>