This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <iostream> | |
| #include <unordered_map> | |
| using namespace std; | |
| class Solution { | |
| public: | |
| int kthGrammar(int N, int K) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <iostream> | |
| #include <unordered_map> | |
| using namespace std; | |
| // Definition for singly-linked list. | |
| struct ListNode { | |
| int val; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution { | |
| public: | |
| unordered_map<int, double> mp; | |
| double myPow(double x, int n) { | |
| int64_t m = (int64_t)n; | |
| if (n < 0) { | |
| x = 1 / x; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <iostream> | |
| #include <unordered_map> | |
| using namespace std; | |
| // Definition for a binary tree node. | |
| struct TreeNode { | |
| int val; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <iostream> | |
| #include <unordered_map> | |
| using namespace std; | |
| class Solution { | |
| public: | |
| unordered_map<int, int> mp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <iostream> | |
| using namespace std; | |
| // Definition for singly-linked list. | |
| struct ListNode { | |
| int val; | |
| ListNode *next; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <iostream> | |
| using namespace std; | |
| class Solution { | |
| public: | |
| vector<int> getRow(int rowIndex) { | |
| vector<int> array{}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <iostream> | |
| using namespace std; | |
| class Solution { | |
| public: | |
| vector<vector<int>> generate(int numRows) { | |
| vector<vector<int>> result{}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <iostream> | |
| using namespace std; | |
| class Solution { | |
| public: | |
| vector<vector<int>> generate(int numRows) { | |
| vector<vector<int>> result{}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| git_branch=`git branch -r` | |
| touch ../result.txt | |
| date > ../result.txt | |
| branches=() | |
| for line in ${git_branch} |