SYMBOL INDEX (2441 symbols across 711 files) FILE: algorithms/cpp/3Sum/3Sum.cpp function threeSum (line 48) | vector > threeSum(vector &num) { function threeSum2 (line 99) | vector > threeSum2(vector &num) { function isSumZero (line 110) | bool isSumZero(vector < int>& v) { function sum (line 114) | int sum(vector& v) { function combination (line 122) | vector > combination(vector &v, int k) { function printMatrix (line 168) | void printMatrix(vector > &matrix) function main (line 181) | int main() FILE: algorithms/cpp/3SumClosest/3SumClosest.cpp function threeSumClosest (line 47) | int threeSumClosest(vector &num, int target) { function main (line 97) | int main() FILE: algorithms/cpp/4Sum/4Sum.cpp function fourSum (line 38) | vector > fourSum(vector &num, int target) { function threeSum (line 57) | vector > threeSum(vector num, int target) { function printMatrix (line 102) | int printMatrix(vector< vector > &vv) function main (line 114) | int main() FILE: algorithms/cpp/FindValidMatrixGivenRowAndColumnSums/FindValidMatrixGivenRowAndColumnSums.cpp class Solution (line 48) | class Solution { method restoreMatrix (line 50) | vector> restoreMatrix(vector& row, vector& col) { FILE: algorithms/cpp/LRUCache/LRUCache.cpp class Node (line 32) | class Node { method Node (line 37) | Node(int k, int v) { key=k; value=v; next = prev = NULL; } class DoubleLinkedList (line 42) | class DoubleLinkedList { method DoubleLinkedList (line 52) | DoubleLinkedList(){ method Size (line 64) | int Size() const { method Node (line 68) | Node* NewAtBegin(int key, int value) { method Node (line 73) | Node* NewAtEnd(int key, int value) { method Node (line 78) | Node* AddAtBegin(Node* n){ method Node (line 93) | Node* AddAtEnd(Node* n) { method Unlink (line 107) | void Unlink(Node* n){ method Delete (line 128) | void Delete(Node* n){ method TakeToBegin (line 133) | void TakeToBegin(Node* n){ method Node (line 138) | Node* GetTailNode() { method DeleteLast (line 142) | void DeleteLast() { method Print (line 146) | void Print(){ class LRUCache (line 158) | class LRUCache{ method LRUCache (line 169) | LRUCache(int capacity) { method print (line 172) | void print(){ method get (line 176) | int get(int key) { method set (line 186) | void set(int key, int value) { function main (line 206) | int main(int argc, char** argv) FILE: algorithms/cpp/NumberOfWaysToSplitString/NumberOfWaysToSplitString.cpp class Solution (line 49) | class Solution { method numWays (line 51) | int numWays(string s) { FILE: algorithms/cpp/UTF8Validation/UTF8Validation.cpp class Solution (line 49) | class Solution { method validUtf8 (line 51) | bool validUtf8(vector& data) { FILE: algorithms/cpp/accountsMerge/AccountsMerge.cpp class Solution_Time_Limit_Exceeded (line 45) | class Solution_Time_Limit_Exceeded { method accountsMerge (line 50) | vector> accountsMerge(vector>& accounts) { method string (line 85) | string find(unordered_map& emails_chains, method join (line 93) | bool join(unordered_map& emails_chains, class Solution (line 112) | class Solution { method accountsMerge (line 117) | vector> accountsMerge(vector>& accounts) { method find (line 161) | int find(unordered_map& emails_chains, int id) { method join (line 168) | bool join(unordered_map& emails_chains, int id1, int id2) { FILE: algorithms/cpp/addAndSearchWord/AddAndSearchWord.cpp class TrieNode (line 42) | class TrieNode { method TrieNode (line 44) | TrieNode():isWord(false) { method TrieNode (line 47) | TrieNode* & operator [] (char idx){ method TrieNode (line 51) | TrieNode* & operator [] (int idx){ class TrieTree (line 62) | class TrieTree { method TrieTree (line 64) | TrieTree():root(new TrieNode()){ } method put (line 67) | void put(string &s) { method search (line 77) | bool search(string &s){ method get (line 83) | bool get(string &s, TrieNode* root, int idx=0){ method freeTree (line 114) | void freeTree(TrieNode* root){ class WordDictionary (line 125) | class WordDictionary { method addWord (line 129) | void addWord(string word) { method search (line 135) | bool search(string word) { function main (line 147) | int main() FILE: algorithms/cpp/addBinary/addBinary.cpp function string (line 21) | string addBinary(string a, string b) { function main (line 41) | int main(int argc, char** argv) FILE: algorithms/cpp/addDigits/addDigits.cpp class Solution (line 16) | class Solution { method addDigits (line 19) | int addDigits(int num) { method addDigits01 (line 31) | int addDigits01(int num) { method addDigits02 (line 43) | int addDigits02(int num) { method addDigits03 (line 74) | int addDigits03(int num) { method addDigits04 (line 79) | int addDigits04(int num){ method addDigits05 (line 84) | int addDigits05(int num){ FILE: algorithms/cpp/addStrings/AddStrings.cpp class Solution (line 19) | class Solution { method string (line 21) | string addStrings(string num1, string num2) { FILE: algorithms/cpp/addToArrayFormOfInteger/AddToArrayFormOfInteger.cpp class Solution (line 45) | class Solution { method addToArrayForm (line 47) | vector addToArrayForm(vector& A, int K) { FILE: algorithms/cpp/addTwoNumbers/addTwoNumbers.cpp class Solution (line 24) | class Solution { method ListNode (line 27) | ListNode *addTwoNumbers(ListNode *l1, ListNode *l2) { method getValueAndMoveNext (line 52) | int getValueAndMoveNext(ListNode* &l){ FILE: algorithms/cpp/additiveNumber/AdditiveNumber.cpp class Solution (line 35) | class Solution { method isAdditiveNumber (line 37) | bool isAdditiveNumber(string num) { method isAdditiveNumberHelper (line 54) | bool isAdditiveNumberHelper(string& n1, string& n2, string& n3){ method string (line 71) | string StringAdd(string n1, string n2) { FILE: algorithms/cpp/anagrams/GroupAnagrams.cpp class Solution (line 30) | class Solution { method groupAnagrams (line 32) | vector< vector > groupAnagrams(vector &strs) { method groupAnagrams01 (line 56) | vector< vector > groupAnagrams01(vector &strs) { method anagrams (line 74) | vector anagrams(vector &strs) { FILE: algorithms/cpp/anagrams/ValidAnagram.cpp class Solution (line 19) | class Solution { method isAnagram01 (line 23) | bool isAnagram01(string s, string t) { method isAnagram02 (line 30) | bool isAnagram02(string s, string t) { method isAnagram (line 52) | bool isAnagram(string s, string t) { FILE: algorithms/cpp/arithmeticSlices/ArithmeticSlices.cpp class Solution (line 34) | class Solution { method sum1toN (line 55) | int sum1toN(int n) { method numberOfArithmeticSlices (line 59) | int numberOfArithmeticSlices(vector& A) { FILE: algorithms/cpp/backspaceStringCompare/BackspaceStringCompare.cpp class Solution (line 64) | class Solution { method removeBackspaces (line 66) | void removeBackspaces(string &s) { method backspaceCompare (line 78) | bool backspaceCompare(string S, string T) { FILE: algorithms/cpp/balancedBinaryTree/balancedBinaryTree.cpp class Solution (line 24) | class Solution { method isBalanced (line 26) | bool isBalanced(TreeNode *root) { method isBalancedUtil (line 31) | bool isBalancedUtil(TreeNode* root, int& height){ method isBalanced (line 50) | bool isBalanced(TreeNode *root) { method treeDepth (line 62) | int treeDepth(TreeNode *root) { class Solution (line 48) | class Solution { method isBalanced (line 26) | bool isBalanced(TreeNode *root) { method isBalancedUtil (line 31) | bool isBalancedUtil(TreeNode* root, int& height){ method isBalanced (line 50) | bool isBalanced(TreeNode *root) { method treeDepth (line 62) | int treeDepth(TreeNode *root) { FILE: algorithms/cpp/basicCalculator/BasicCalculator.II.cpp function isOperator (line 37) | bool isOperator(const char ch) { function Priority (line 42) | int Priority(const char c) { function calculate_exp (line 52) | long long calculate_exp(long long x, long long y, char op) { function calculate_two_stacks (line 64) | int calculate_two_stacks(string& s) { function calculate (line 108) | int calculate(string s) { function main (line 112) | int main(int argc, char**argv) FILE: algorithms/cpp/basicCalculator/BasicCalculator.cpp class Expression (line 41) | class Expression class Number (line 48) | class Number: public Expression method Number (line 52) | Number(string num) { this->number = atoi(num.c_str()); } method interpret (line 54) | int interpret() { return number; } class Plus (line 59) | class Plus : public Expression method Plus (line 62) | Plus(Expression* left, Expression* right) :leftOperand(left), rightOpe... method interpret (line 64) | int interpret() { return leftOperand->interpret() + rightOperand->inte... class Minus (line 70) | class Minus : public Expression method Minus (line 73) | Minus(Expression* left, Expression* right) :leftOperand(left), rightOp... method interpret (line 75) | int interpret() { return leftOperand->interpret() - rightOperand->inte... class Multiply (line 81) | class Multiply : public Expression method Multiply (line 84) | Multiply(Expression* left, Expression* right) :leftOperand(left), righ... method interpret (line 86) | int interpret() { return leftOperand->interpret() * rightOperand->inte... class Divide (line 92) | class Divide : public Expression method Divide (line 95) | Divide(Expression* left, Expression* right) :leftOperand(left), rightO... method interpret (line 97) | int interpret() { return leftOperand->interpret() / rightOperand->inte... function isOperator (line 103) | bool isOperator(const string &c) { function isOperator (line 106) | bool isOperator(const char &c) { class Evaluator (line 110) | class Evaluator : public Expression method Evaluator (line 116) | Evaluator(vector& s) method interpret (line 144) | int interpret() { function Parse (line 152) | vector Parse(string& s){ function Priority (line 175) | int Priority(const string &c) { function Infix2RPN (line 185) | vector Infix2RPN(vector& infix) { function calculate_RPN_design_pattern (line 218) | int calculate_RPN_design_pattern(string& s) { function calculate_RPN_evluation (line 240) | int calculate_RPN_evluation(string& s) { function calculate_two_stacks (line 262) | inline void calculate_two_stacks(stack& num_stack, stack& op_... function calculate_two_stacks (line 269) | int calculate_two_stacks(string& s) { function calculate (line 298) | int calculate(string s) { function main (line 304) | int main(int argc, char** argv) { FILE: algorithms/cpp/bestTimeToBuyAndSellStock/BestTimeToBuyAndSellStockWithCooldown.cpp class Solution (line 22) | class Solution { method maxProfit (line 41) | int maxProfit(vector& prices) { FILE: algorithms/cpp/bestTimeToBuyAndSellStock/BestTimeToBuyAndSellStockWithTransactionFee.cpp class Solution (line 33) | class Solution { method max (line 35) | int max(int x, int y) { method max (line 38) | int max(int x, int y, int z) { method maxProfit (line 44) | int maxProfit(vector& prices, int fee) { method genPricesPairs (line 52) | void genPricesPairs(vector &prices, vector< pair > &pri... method maxProfit_dp01 (line 74) | int maxProfit_dp01(vector &prices, int &fee) { method maxProfit_dp02 (line 93) | int maxProfit_dp02(vector &prices, int &fee) { method maxProfit_dp03 (line 187) | int maxProfit_dp03(vector &prices, int &fee) { FILE: algorithms/cpp/bestTimeToBuyAndSellStock/bestTimeToBuyAndSellStock.II.cpp class Solution (line 37) | class Solution { method maxProfit (line 39) | int maxProfit(vector& prices) { method maxProfit01 (line 47) | int maxProfit01(vector &prices) { method maxProfit02 (line 74) | int maxProfit02(vector& prices) { FILE: algorithms/cpp/bestTimeToBuyAndSellStock/bestTimeToBuyAndSellStock.III.cpp class Solution (line 37) | class Solution { method maxProfit (line 51) | int maxProfit(vector &prices) { FILE: algorithms/cpp/bestTimeToBuyAndSellStock/bestTimeToBuyAndSellStock.IV.cpp class Solution (line 29) | class Solution { method maxProfit (line 52) | int maxProfit(int k, vector &prices) { method maxProfit_DP01 (line 79) | int maxProfit_DP01 (int k, vector &prices) { method maxProfit_DP02 (line 98) | int maxProfit_DP02 (int k, vector &prices) { method maxProfit_DP03 (line 119) | int maxProfit_DP03 (int k, vector &prices) { FILE: algorithms/cpp/bestTimeToBuyAndSellStock/bestTimeToBuyAndSellStock.cpp class Solution (line 29) | class Solution { method maxProfit (line 44) | int maxProfit(vector &prices) { method maxProfit (line 72) | int maxProfit(vector& prices) { class Solution (line 70) | class Solution { method maxProfit (line 44) | int maxProfit(vector &prices) { method maxProfit (line 72) | int maxProfit(vector& prices) { FILE: algorithms/cpp/binarySearchTreeIterator/binarySearchTreeIterator.cpp class BSTIterator (line 17) | class BSTIterator { method BSTIterator (line 23) | BSTIterator(TreeNode *root) { method hasNext (line 40) | bool hasNext() { method next (line 45) | int next() { FILE: algorithms/cpp/binaryTreeInorderTraversal/binaryTreeInorderTraversal.cpp class Solution (line 53) | class Solution { method inorderTraversal (line 55) | vector inorderTraversal(TreeNode *root) { FILE: algorithms/cpp/binaryTreeLevelOrderTraversal/binaryTreeLevelOrderTraversal.II.cpp class Solution (line 58) | class Solution { method levelOrderBottom (line 60) | vector > levelOrderBottom(TreeNode *root) { FILE: algorithms/cpp/binaryTreeLevelOrderTraversal/binaryTreeLevelOrderTraversal.cpp type TreeNode (line 59) | struct TreeNode { method TreeNode (line 63) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function levelOrder (line 71) | vector > levelOrder(TreeNode *root) { function levelOrder1 (line 81) | vector > levelOrder1(TreeNode *root) { function levelOrder2 (line 125) | vector > levelOrder2(TreeNode *root) { function levelOrder3 (line 156) | vector > levelOrder3(TreeNode *root) { function printTree (line 185) | void printTree(TreeNode *root) function printTree_level_order (line 197) | void printTree_level_order(TreeNode *root) function TreeNode (line 215) | TreeNode* createTree(int a[], int n) method TreeNode (line 63) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function printMatrix (line 240) | int printMatrix(vector< vector > &vv) function main (line 251) | int main() FILE: algorithms/cpp/binaryTreeMaximumPathSum/binaryTreeMaximumPathSum.cpp type TreeNode (line 28) | struct TreeNode { method TreeNode (line 32) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function maxPathSum (line 36) | int maxPathSum(TreeNode *root, int& maxSum ) { function maxPathSum (line 60) | int maxPathSum(TreeNode *root) { function main (line 67) | int main() FILE: algorithms/cpp/binaryTreePaths/binaryTreePaths.cpp class Solution (line 34) | class Solution { method DFS (line 37) | void DFS(TreeNode* node, string answer) method binaryTreePaths (line 50) | vector binaryTreePaths(TreeNode* root) { method binaryTreePathsHelper (line 68) | void binaryTreePathsHelper(TreeNode* root, vector solution, vecto... method binaryTreePaths (line 89) | vector binaryTreePaths(TreeNode* root) { class Solution (line 66) | class Solution { method DFS (line 37) | void DFS(TreeNode* node, string answer) method binaryTreePaths (line 50) | vector binaryTreePaths(TreeNode* root) { method binaryTreePathsHelper (line 68) | void binaryTreePathsHelper(TreeNode* root, vector solution, vecto... method binaryTreePaths (line 89) | vector binaryTreePaths(TreeNode* root) { FILE: algorithms/cpp/binaryTreePostorderTraversal/binaryTreePostorderTraversal.cpp type TreeNode (line 32) | struct TreeNode { method TreeNode (line 36) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function postorderTraversal (line 47) | vector postorderTraversal(TreeNode *root) { function postorderTraversal1 (line 57) | vector postorderTraversal1(TreeNode *root) { function postorderTraversal2 (line 80) | vector postorderTraversal2(TreeNode *root) { function TreeNode (line 108) | TreeNode* createTree(int a[], int n) method TreeNode (line 36) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function printTree_post_order (line 133) | void printTree_post_order(TreeNode *root) function printArray (line 145) | void printArray(vector v) function main (line 153) | int main() FILE: algorithms/cpp/binaryTreePreorderTraversal/binaryTreePreorderTraversal.cpp type TreeNode (line 31) | struct TreeNode { method TreeNode (line 35) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function preorderTraversal (line 41) | vector preorderTraversal(TreeNode *root) { function preorderTraversal1 (line 50) | vector preorderTraversal1(TreeNode *root) { function preorderTraversal2 (line 70) | vector preorderTraversal2(TreeNode *root) { function TreeNode (line 91) | TreeNode* createTree(int a[], int n) method TreeNode (line 35) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function printTree_pre_order (line 116) | void printTree_pre_order(TreeNode *root) function printArray (line 128) | void printArray(vector v) function main (line 136) | int main() FILE: algorithms/cpp/binaryTreeRightSideView/binaryTreeRightSideView.cpp class Solution (line 34) | class Solution { method rightSideViewHelper (line 36) | void rightSideViewHelper(TreeNode* root, int level, vector& resul... method rightSideViewHelper (line 43) | void rightSideViewHelper(TreeNode* root, vector& result) { method rightSideView (line 67) | vector rightSideView(TreeNode *root) { FILE: algorithms/cpp/binaryTreeUpsideDown/binaryTreeUpsideDown.cpp class Solution (line 39) | class Solution { method TreeNode (line 41) | TreeNode *upsideDownBinaryTree(TreeNode *root) { FILE: algorithms/cpp/binaryTreeZigzagLevelOrderTraversal/binaryTreeZigzagLevelOrderTraversal.cpp type TreeNode (line 57) | struct TreeNode { method TreeNode (line 61) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function zigzagLevelOrder (line 66) | vector > zigzagLevelOrder(TreeNode *root) { function zigzagLevelOrder1 (line 73) | vector > zigzagLevelOrder1(TreeNode *root) { function TreeToArray_level_order (line 109) | vector TreeToArray_level_order(TreeNode* root){ function zigzagLevelOrder2 (line 130) | vector > zigzagLevelOrder2(TreeNode *root) { function printTree_level_order (line 159) | void printTree_level_order(TreeNode *root) function TreeNode (line 177) | TreeNode* createTree(int a[], int n) method TreeNode (line 61) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function printMatrix (line 202) | int printMatrix(vector< vector > &vv) function main (line 214) | int main(int argc, char** argv) FILE: algorithms/cpp/binaryWatch/BinaryWatch.cpp class Solution (line 29) | class Solution { method combination (line 31) | void combination(int nLED, int nLight, int max, bool zero, method generate_combination (line 54) | void generate_combination(int nLED, int max, bool zero, vector>& vv) { method Solution (line 76) | Solution():hour(4, vector()), mins(6, vector()){ method readBinaryWatch (line 95) | vector readBinaryWatch(int num) { FILE: algorithms/cpp/bitwiseANDOfNumbersRange/BitwiseAndOfNumbersRange.cpp function rangeBitwiseAnd (line 41) | int rangeBitwiseAnd(int m, int n) { function main (line 56) | int main(int argc, char**argv) { FILE: algorithms/cpp/brokenCalculator/BrokenCalculator.cpp class Solution (line 47) | class Solution { method brokenCalc (line 49) | int brokenCalc(int X, int Y) { FILE: algorithms/cpp/buddyStrings/BuddyStrings.cpp class Solution (line 69) | class Solution { method buddyStrings (line 71) | bool buddyStrings(string A, string B) { FILE: algorithms/cpp/buildingBoxes/BuildingBoxes.cpp class Solution (line 85) | class Solution { method total (line 87) | int total(long h){ method minimumBoxes (line 91) | int minimumBoxes(int n) { FILE: algorithms/cpp/bulbSwitcher/BulbSwitcher.II.cpp class Solution (line 77) | class Solution { method flipLights (line 79) | int flipLights(int n, int m) { FILE: algorithms/cpp/bulbSwitcher/BulbSwitcher.III.cpp class Solution (line 51) | class Solution { method numTimesAllBlue (line 53) | int numTimesAllBlue(vector& light) { FILE: algorithms/cpp/bulbSwitcher/BulbSwitcher.IV.cpp class Solution (line 54) | class Solution { method minFlips (line 56) | int minFlips(string target) { FILE: algorithms/cpp/bulbSwitcher/bulbSwitcher.cpp class Solution (line 47) | class Solution { method bulbSwitch (line 49) | int bulbSwitch(int n) { method bulbSwitch (line 77) | int bulbSwitch(int n) { class Solution (line 75) | class Solution { method bulbSwitch (line 49) | int bulbSwitch(int n) { method bulbSwitch (line 77) | int bulbSwitch(int n) { FILE: algorithms/cpp/bullsAndCows/bullsAndCows.cpp class Solution (line 37) | class Solution { method string (line 39) | string getHint(string secret, string guess) { method string (line 44) | string getHint01(string secret, string guess) { method string (line 64) | string getHint02(string secret, string guess) { FILE: algorithms/cpp/burstBalloons/BurstBalloons.cpp class Solution (line 37) | class Solution { method maxCoins (line 39) | int maxCoins(vector& nums) { method maxCoins_DC (line 66) | int maxCoins_DC(vector& nums, vector>& matrix, int lo... method maxCoins_DP (line 83) | int maxCoins_DP(vector& nums, vector>& dp) { method printVector (line 97) | void printVector(vector& nums) { FILE: algorithms/cpp/calculateMoneyInLeetcodeBank/CalculateMoneyInLeetcodeBank.cpp class Solution (line 41) | class Solution { method totalMoney (line 43) | int totalMoney(int n) { FILE: algorithms/cpp/candy/candy.cpp function candy (line 54) | int candy(vector &ratings) { function generateRatings (line 74) | void generateRatings(vector &ratings, int n) { function print (line 81) | void print(vector &v) { function main (line 88) | int main(int argc, char**argv) FILE: algorithms/cpp/checkIfArrayIsSortedAndRotated/CheckIfArrayIsSortedAndRotated.cpp class Solution (line 55) | class Solution { method check (line 57) | bool check(vector& nums) { FILE: algorithms/cpp/checkIfBinaryStringHasAtMostOneSegmentOfOnes/CheckIfBinaryStringHasAtMostOneSegmentOfOnes.cpp class Solution (line 28) | class Solution { method checkOnesSegment (line 30) | bool checkOnesSegment(string s) { FILE: algorithms/cpp/checkIfNumberIsASumOfPowersOfThree/CheckIfNumberIsASumOfPowersOfThree.cpp class Solution (line 34) | class Solution { method checkPowersOfThree (line 36) | bool checkPowersOfThree(int n) { method checkPowersOfThree_DFS (line 41) | bool checkPowersOfThree_DFS(int n, int p) { method checkPowersOfThree_Base3 (line 59) | bool checkPowersOfThree_Base3(int n) { FILE: algorithms/cpp/checkIfOneStringSwapCanMakeStringsEqual/CheckIfOneStringSwapCanMakeStringsEqual.cpp class Solution (line 43) | class Solution { method areAlmostEqual (line 45) | bool areAlmostEqual(string s1, string s2) { FILE: algorithms/cpp/checkIfTheSentenceIsPangram/CheckIfTheSentenceIsPangram.cpp class Solution (line 29) | class Solution { method checkIfPangram (line 31) | bool checkIfPangram(string sentence) { FILE: algorithms/cpp/checkIfWordEqualsSummationOfTwoWords/CheckIfWordEqualsSummationOfTwoWords.cpp class Solution (line 59) | class Solution { method strToInt (line 61) | int strToInt(string& str) { method isSumEqual (line 68) | bool isSumEqual(string firstWord, string secondWord, string targetWord) { FILE: algorithms/cpp/climbStairs/climbStairs.cpp class Solution (line 14) | class Solution { method climbStairs (line 17) | int climbStairs(int n) { method climbStairs2 (line 28) | int climbStairs2(int n) { FILE: algorithms/cpp/cloneGraph/cloneGraph.cpp class Solution (line 43) | class Solution { method UndirectedGraphNode (line 45) | UndirectedGraphNode *cloneGraph(UndirectedGraphNode *node) { FILE: algorithms/cpp/closestDessertCost/ClosestDessertCost.cpp class Solution (line 70) | class Solution { method abs_min (line 72) | int abs_min (int x, int y, int z) { method abs_min (line 77) | int abs_min(int x, int y) { method closestCost (line 84) | int closestCost(vector& baseCosts, vector& toppingCosts, int... method closetToppingCost (line 95) | int closetToppingCost(vector& costs, int target, int idx ){ FILE: algorithms/cpp/closestRoom/ClosestRoom.cpp class Solution (line 55) | class Solution { method print (line 57) | void print(vector>& vv) { method closestRoom (line 66) | vector closestRoom(vector>& rooms, vector... FILE: algorithms/cpp/closestSubsequenceSum/ClosestSubsequenceSum.cpp class Solution (line 44) | class Solution { method abs (line 46) | int abs(int n){ method printSet (line 50) | void printSet(set& s){ method findClosetDiff (line 58) | int findClosetDiff(set& sums, int goal) { method getAllSums (line 71) | void getAllSums(int index, int end, vector& nums, int sum, set& nums, set& sums) { method minAbsDifference (line 91) | int minAbsDifference(vector& nums, int goal) { FILE: algorithms/cpp/coinChange/CoinChange2.cpp class Solution (line 42) | class Solution { method change (line 44) | int change(int amount, vector& coins) { method change_recursive (line 50) | int change_recursive(int amount, vector& coins) { method change_recursive_helper (line 57) | void change_recursive_helper(int amount, vector& coins, int idx, ... method change_dp (line 70) | int change_dp(int amount, vector& coins) { FILE: algorithms/cpp/coinChange/coinChange.cpp function Solution (line 31) | class Solution { method coinChange (line 88) | int coinChange(vector& coins, int amount) { class Solution (line 86) | class Solution { method coinChange (line 88) | int coinChange(vector& coins, int amount) { FILE: algorithms/cpp/combinationSum/combinationSum.II.cpp function combinationSumHelper (line 35) | void combinationSumHelper(vector &candidates, int start, int target... function combinationSum2 (line 55) | vector > combinationSum2(vector &candidates, int target) { function printMatrix (line 68) | void printMatrix(vector< vector > &vv) function printArray (line 79) | void printArray(vector &v) function test (line 88) | void test(int a[], int len, int target) function main (line 99) | int main(int argc, char** argv) FILE: algorithms/cpp/combinationSum/combinationSum.III.cpp function combinationSumHelper (line 31) | void combinationSumHelper(vector& candidates, int start, int num, i... function combinationSum3 (line 48) | vector< vector > combinationSum3(int k, int n) { function PrintResults (line 63) | void PrintResults(int k, int n, vector< vector >& results) { function main (line 75) | int main(int argc, char** argv) FILE: algorithms/cpp/combinationSum/combinationSum.cpp function combinationSumHelper (line 32) | void combinationSumHelper(vector &candidates, int start, int target... function combinationSum (line 51) | vector > combinationSum(vector &candidates, int target) { function printMatrix (line 64) | void printMatrix(vector< vector > &vv) function printArray (line 75) | void printArray(vector &v) function main (line 85) | int main(int argc, char** argv) FILE: algorithms/cpp/combinationSumIV/combinationSumIV.cpp class Solution (line 52) | class Solution { method combinationSum4 (line 54) | int combinationSum4(vector& nums, int target) { FILE: algorithms/cpp/combinations/combinations.cpp function combine (line 36) | vector > combine(int n, int k) { function combine1 (line 45) | vector > combine1(int n, int k) { function getCombination (line 52) | void getCombination(int n, int k, vector& solution, vector< vector<... function combine2 (line 67) | vector > combine2(int n, int k) { function printResult (line 114) | void printResult(vector >& result) function main (line 125) | int main(int argc, char** argv) FILE: algorithms/cpp/compareStringsByFrequencyOfTheSmallestCharacter/CompareStringsByFrequencyOfTheSmallestCharacter.cpp class Solution (line 35) | class Solution { method numSmallerByFrequency (line 37) | vector numSmallerByFrequency(vector& queries, vector &v, int target) { FILE: algorithms/cpp/compareVersionNumbers/compareVersionNumbers.cpp class Solution (line 21) | class Solution { method split (line 33) | vector split(const string &s, char delim) { method rightTrimZero (line 39) | void rightTrimZero(vector &v){ method compareVersion (line 45) | int compareVersion(string version1, string version2) { FILE: algorithms/cpp/constructBinaryTreeFromInorderAndPostorderTraversal/constructBinaryTreeFromInorderAndPostorderTraversal.cpp type TreeNode (line 20) | struct TreeNode { method TreeNode (line 24) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function TreeNode (line 29) | TreeNode *buildTree(vector &inorder, vector &postorder) { method TreeNode (line 24) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function TreeNode (line 34) | TreeNode *buildTree(vector &inorder, int in_offset, vector &po... method TreeNode (line 24) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function TreeNode (line 63) | TreeNode *buildTree2(vector &inorder, vector &postorder) { method TreeNode (line 24) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function printTree_pre_order (line 102) | void printTree_pre_order(TreeNode *root) function printTree_in_order (line 114) | void printTree_in_order(TreeNode *root) function printTree_level_order (line 127) | void printTree_level_order(TreeNode *root) function main (line 146) | int main() FILE: algorithms/cpp/constructBinaryTreeFromPreorderAndInorderTraversal/constructBinaryTreeFromPreorderAndInorderTraversal.cpp type TreeNode (line 20) | struct TreeNode { method TreeNode (line 24) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function TreeNode (line 29) | TreeNode *buildTree(vector &preorder, vector &inorder) { method TreeNode (line 24) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function TreeNode (line 34) | TreeNode *buildTree(vector& preorder, int& preidx, vector& ino... method TreeNode (line 24) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function printTree_pre_order (line 74) | void printTree_pre_order(TreeNode *root) function printTree_in_order (line 86) | void printTree_in_order(TreeNode *root) function printTree_level_order (line 99) | void printTree_level_order(TreeNode *root) function main (line 118) | int main() FILE: algorithms/cpp/constructTheLexicographicallyLargestValidSequence/ConstructTheLexicographicallyLargestValidSequence.cpp class Solution (line 42) | class Solution { method print (line 44) | void print(vector& v) { method constructDistancedSequence (line 52) | vector constructDistancedSequence(int n) { method dfs (line 62) | bool dfs(vector& available, vector& result, int pos, int cnt){ FILE: algorithms/cpp/containerWithMostWater/containerWithMostWater.cpp class Solution (line 17) | class Solution { method maxArea (line 19) | int maxArea(vector &height) { FILE: algorithms/cpp/containsDuplicate/ContainsDuplicate.II.cpp class Solution (line 14) | class Solution { method containsNearbyDuplicate (line 16) | bool containsNearbyDuplicate(vector& nums, int k) { FILE: algorithms/cpp/containsDuplicate/ContainsDuplicate.III.cpp class Solution (line 15) | class Solution { method containsNearbyAlmostDuplicate (line 17) | bool containsNearbyAlmostDuplicate(vector& nums, int k, int t) { FILE: algorithms/cpp/containsDuplicate/ContainsDuplicate.cpp class Solution (line 14) | class Solution { method containsDuplicate (line 16) | bool containsDuplicate(vector& nums) { FILE: algorithms/cpp/convertANumberToHexadecimal/ConvertANumberToHexadecimal.cpp class Solution (line 37) | class Solution { method string (line 40) | string toHex(int num) { FILE: algorithms/cpp/convertSortedArrayToBinarySearchTree/convertSortedArrayToBinarySearchTree.cpp class Solution (line 20) | class Solution { method TreeNode (line 22) | TreeNode *sortedArrayToBST(vector &num) { FILE: algorithms/cpp/convertSortedListToBinarySearchTree/convertSortedListToBinarySearchTree.cpp type ListNode (line 19) | struct ListNode { method ListNode (line 22) | ListNode(int x) : val(x), next(NULL) {} type TreeNode (line 26) | struct TreeNode { method TreeNode (line 30) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function TreeNode (line 36) | TreeNode *sortedListToBST(ListNode *head) { method TreeNode (line 30) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function TreeNode (line 45) | TreeNode* sortedListToBST(int low, int high, ListNode*& head) { method TreeNode (line 30) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function printTree_level_order (line 62) | void printTree_level_order(TreeNode *root) function ListNode (line 80) | ListNode* createList(int a[], int n) method ListNode (line 22) | ListNode(int x) : val(x), next(NULL) {} function printList (line 94) | void printList(ListNode* h) function main (line 104) | int main(int argc, char** argv) FILE: algorithms/cpp/copyListWithRandomPointer/copyListWithRandomPointer.cpp class Solution (line 69) | class Solution { method RandomListNode (line 71) | RandomListNode *copyRandomList(RandomListNode *head) { class MySolution (line 147) | class MySolution { method RandomListNode (line 149) | RandomListNode *copyRandomList(RandomListNode *head) { FILE: algorithms/cpp/countAndSay/countAndSay.cpp function string (line 28) | string vecToStr(vector v) { function getNext (line 36) | vector getNext(vector& v) { function string (line 63) | string countAndSay(int n) { function main (line 79) | int main(int argc, char** argv) FILE: algorithms/cpp/countCompleteTreeNodes/CountCompleteTreeNodes.cpp class Solution (line 28) | class Solution { method isCompleteTree (line 31) | int isCompleteTree(TreeNode* root) { method countNodes (line 46) | int countNodes(TreeNode* root) { FILE: algorithms/cpp/countGoodMeals/CountGoodMeals.cpp class Solution (line 38) | class Solution { method countPairs (line 40) | int countPairs(vector& deliciousness) { FILE: algorithms/cpp/countItemsMatchingARule/CountItemsMatchingARule.cpp class Solution (line 43) | class Solution { method countMatches (line 45) | int countMatches(vector>& items, string ruleKey, string... FILE: algorithms/cpp/countNicePairsInAnArray/CountNicePairsInAnArray.cpp class Solution (line 36) | class Solution { method rev (line 38) | int rev(int n) { method countNicePairs (line 48) | int countNicePairs(vector& nums) { method countNicePairs01 (line 52) | int countNicePairs01(vector& nums) { method countNicePairs02 (line 72) | int countNicePairs02(vector& nums) { FILE: algorithms/cpp/countNumberOfHomogenousSubstrings/CountNumberOfHomogenousSubstrings.cpp class Solution (line 45) | class Solution { method countHomogenous (line 47) | int countHomogenous(string s) { FILE: algorithms/cpp/countNumbersWithUniqueDigits/CountNumbersWithUniqueDigits.cpp class Solution (line 35) | class Solution { method countNumbersWithUniqueDigits (line 37) | int countNumbersWithUniqueDigits(int n) { method nine_factor (line 45) | int nine_factor(int n) { method countNumbersWithUniqueDigits (line 59) | int countNumbersWithUniqueDigits(int n) { class Solution (line 57) | class Solution { method countNumbersWithUniqueDigits (line 37) | int countNumbersWithUniqueDigits(int n) { method nine_factor (line 45) | int nine_factor(int n) { method countNumbersWithUniqueDigits (line 59) | int countNumbersWithUniqueDigits(int n) { FILE: algorithms/cpp/countOddNumbersInAnIntervalRange/CountOddNumbersInAnIntervalRange.cpp class Solution (line 27) | class Solution { method countOdds1 (line 29) | int countOdds1(int low, int high) { method countOdds2 (line 35) | int countOdds2(int low, int high) { method countOdds (line 38) | int countOdds(int low, int high) { FILE: algorithms/cpp/countOfRangeSum/CountOfRangeSum.cpp class Node (line 73) | class Node{ method Node (line 78) | Node(long long v):val(v), cnt(1), left(NULL), right(NULL) {} class Tree (line 82) | class Tree{ method Tree (line 84) | Tree():root(NULL){ } method Insert (line 87) | void Insert(long long val) { method LessThan (line 90) | int LessThan(long long sum, int val) { method Insert (line 98) | void Insert(Node* &root, long long val) { method LessThan (line 115) | int LessThan(Node* root, long long sum, int val, int res) { method freeTree (line 134) | void freeTree(Node* root){ class Solution (line 145) | class Solution { method countRangeSum (line 147) | int countRangeSum(vector& nums, int lower, int upper) { FILE: algorithms/cpp/countOfSmallerNumbersAfterSelf/countOfSmallerNumbersAfterSelf.cpp class Solution (line 31) | class Solution { method search (line 35) | int search(int t) method compute (line 45) | int compute(int t) method add (line 52) | void add(int t) method countSmaller (line 57) | vector countSmaller(vector& nums) { method countSmaller (line 139) | vector countSmaller(vector& nums) { class BinarySearchTreeNode (line 83) | class BinarySearchTreeNode method BinarySearchTreeNode (line 90) | BinarySearchTreeNode(int value) : val(value), less(0),count(1),left(NU... class BinarySearchTree (line 93) | class BinarySearchTree method BinarySearchTree (line 98) | BinarySearchTree(const int value):root(new BinarySearchTreeNode(value)... method insert (line 102) | void insert(const int value, int &numLessThan) { method freeTree (line 106) | void freeTree(BinarySearchTreeNode* root){ method insert (line 113) | void insert(BinarySearchTreeNode* root, const int value, int &numLessT... class Solution (line 137) | class Solution { method search (line 35) | int search(int t) method compute (line 45) | int compute(int t) method add (line 52) | void add(int t) method countSmaller (line 57) | vector countSmaller(vector& nums) { method countSmaller (line 139) | vector countSmaller(vector& nums) { FILE: algorithms/cpp/countPairsOfNodes/CountPairsOfNodes.cpp class Solution (line 107) | class Solution { method countPairs (line 109) | vector countPairs(int n, vector>& edges, vector&... FILE: algorithms/cpp/countPairsWithXorInARange/CountPairsWithXorInARange.cpp type TrieNode (line 116) | struct TrieNode { method TrieNode (line 119) | TrieNode() { function insertTrie (line 127) | void insertTrie(TrieNode *root, int n) { class Solution (line 146) | class Solution { method countSmallerPairs (line 149) | int countSmallerPairs(TrieNode * root, int N, int K) { method countPairs (line 177) | int countPairs(vector& nums, int low, int high) { FILE: algorithms/cpp/countPrimes/CountPrimes.cpp function countPrimes (line 117) | int countPrimes(int n) { function main (line 139) | int main(int argc, char**argv) FILE: algorithms/cpp/countingBits/CountingBits.cpp class Solution (line 31) | class Solution { method countBits (line 59) | vector countBits(int num) { FILE: algorithms/cpp/courseSchedule/CourseSchedule.II.cpp class Solution (line 48) | class Solution { method topologicalSort (line 51) | bool topologicalSort( int n, vector& explored, vector& path, method findOrder (line 79) | vector findOrder(int numCourses, vector>& prerequi... FILE: algorithms/cpp/courseSchedule/CourseSchedule.cpp class Solution (line 44) | class Solution { method hasCycle (line 47) | bool hasCycle(int n, vector& explored, vector& path, map>& prerequisites) { FILE: algorithms/cpp/courseSchedule/non-recursive/course_schedule.cpp type _node (line 29) | struct _node { type _node (line 32) | struct _node class Solution (line 35) | class Solution { method canFinish (line 37) | bool canFinish(int numCourses, vector>& prerequisites) { method to_neighbor_repr (line 47) | vector> to_neighbor_repr(int numOfvex, vector&... method dsf (line 62) | bool dsf(int numOfvex, vector>& graph, vector&... FILE: algorithms/cpp/courseSchedule/non-recursive/main.cpp function main (line 17) | int main(int argc, const char * argv[]) { FILE: algorithms/cpp/cousinsInBinaryTree/CousinsInBinaryTree.cpp class Solution (line 47) | class Solution { method isCousins (line 49) | bool isCousins(TreeNode* root, int x, int y) { method DepthAndParent (line 62) | int DepthAndParent(TreeNode* root, TreeNode*& parent, int depth, int x) { FILE: algorithms/cpp/createMaximumNumber/CreateMaximumNumber.cpp class Solution (line 69) | class Solution { method maxNumber (line 71) | vector maxNumber(vector& nums1, vector& nums2, int k) { method compareTwoArray (line 88) | bool compareTwoArray(vector& nums1, int start1, vector& nums... method mergeTwoArrays (line 99) | vector mergeTwoArrays(vector& nums1, vector& nums2) { method findMaxSubArray (line 132) | vector findMaxSubArray(vector& nums, int k) { FILE: algorithms/cpp/decodeString/DecodeString.cpp class Solution (line 27) | class Solution { method string (line 29) | string decodeString(string s) { method isValid (line 82) | bool isValid(string& s) { method isNum (line 101) | bool isNum(char ch) { FILE: algorithms/cpp/decodeWays/decodeWays.cpp function check (line 34) | int check(char ch){ function check (line 39) | int check(char ch1, char ch2){ function numDecodings (line 44) | int numDecodings(string s) { function main (line 69) | int main(int argc, char**argv) FILE: algorithms/cpp/decodeXORedPermutation/DecodeXoredPermutation.cpp class Solution (line 80) | class Solution { method decode (line 82) | vector decode(vector& encoded) { FILE: algorithms/cpp/deleteNodeInALinkedList/DeleteNodeInALinkedList.cpp class Solution (line 23) | class Solution { method deleteNode (line 27) | void deleteNode(ListNode* node) { FILE: algorithms/cpp/designAuthenticationManager/DesignAuthenticationManager.cpp class AuthenticationManager (line 63) | class AuthenticationManager { method AuthenticationManager (line 69) | AuthenticationManager(int timeToLive):ttl(timeToLive) { } method generate (line 71) | void generate(string tokenId, int currentTime) { method renew (line 76) | void renew(string tokenId, int currentTime) { method countUnexpiredTokens (line 87) | int countUnexpiredTokens(int currentTime) { method clean (line 91) | int clean(int expired) { FILE: algorithms/cpp/detectCapital/DetectCapital.cpp class Solution (line 31) | class Solution { method is_lower (line 32) | bool is_lower(char ch) { method is_upper (line 35) | bool is_upper(char ch) { method is_alpha (line 38) | bool is_alpha(char ch) { method detectCapitalUse (line 42) | bool detectCapitalUse(string word) { FILE: algorithms/cpp/determineColorOfAChessboardSquare/DetermineColorOfAChessboardSquare.cpp class Solution (line 39) | class Solution { method squareIsWhite (line 41) | bool squareIsWhite(string coordinates) { FILE: algorithms/cpp/diameterOfBinaryTree/diameterOfBinaryTree.cpp class Solution (line 15) | class Solution { method maxDepth (line 18) | int maxDepth(TreeNode* root) { method diameterOfBinaryTree (line 26) | int diameterOfBinaryTree(TreeNode* root) { FILE: algorithms/cpp/differentWaysToAddParentheses/DifferentWaysToAddParentheses.cpp function isOperator (line 39) | bool isOperator(char ch){ function diffWaysToCompute (line 45) | vector diffWaysToCompute(string input) { function printVector (line 89) | void printVector(vector& v) { function main (line 97) | int main(int argc, char**argv) FILE: algorithms/cpp/distinctSubsequences/distinctSubsequences.cpp function numDistinct1 (line 94) | int numDistinct1(string S, string T) { function numDistinct2 (line 146) | int numDistinct2(string S, string T) { function numDistinct (line 172) | int numDistinct(string S, string T) { function main (line 183) | int main(int argc, char** argv) FILE: algorithms/cpp/distributeCoinsInBinaryTree/DistributeCoinsInBinaryTree.cpp class Solution (line 55) | class Solution { method distributeCoins (line 57) | int distributeCoins(TreeNode* root) { method dfs (line 79) | int dfs(TreeNode* root, int& result) { FILE: algorithms/cpp/divideTwoInt/divideTwoInt.cpp function divide (line 21) | int divide(int dividend, int divisor) { function main (line 54) | int main() FILE: algorithms/cpp/dungeonGame/dungeonGame.cpp class Solution (line 48) | class Solution { method calculateMinimumHP (line 50) | int calculateMinimumHP(vector > &dungeon) { FILE: algorithms/cpp/editDistance/editDistance.cpp function min (line 81) | int min(int x, int y, int z) { function minDistance (line 85) | int minDistance(string word1, string word2) { function main (line 115) | int main(int argc, char**argv) FILE: algorithms/cpp/eggDropWith2EggsAndNFloors/EggDropWith2EggsAndNFloors.cpp class Solution (line 79) | class Solution { method twoEggDrop (line 81) | int twoEggDrop(int n) { FILE: algorithms/cpp/eliminationGame/EliminationGame.cpp class Solution (line 30) | class Solution { method lastRemaining (line 32) | int lastRemaining(int n) { FILE: algorithms/cpp/equalSumArraysWithMinimumNumberOfOperations/EqualSumArraysWithMinimumNumberOfOperations.cpp class Solution (line 50) | class Solution { method print (line 52) | void print(vector& n) { method minOpsBySort (line 60) | int minOpsBySort(int gaps, vector& small, vector& big) { method minOpsByCnt1 (line 84) | int minOpsByCnt1(int gaps, vector& small, vector& big) { method minOpsByCnt2 (line 110) | int minOpsByCnt2(int gaps, vector& small, vector& big) { method minOperations (line 129) | int minOperations(vector& nums1, vector& nums2) { FILE: algorithms/cpp/evaluateDivision/EvaluateDivision.cpp class Solution (line 28) | class Solution { method dfs (line 30) | bool dfs( unordered_map>& m, method calcEquation (line 62) | vector calcEquation(vector> equations, FILE: algorithms/cpp/evaluateReversePolishNotation/evaluateReversePolishNotation.cpp class Solution (line 28) | class Solution { method evalRPN (line 30) | int evalRPN(vector &tokens) { method isOp (line 75) | bool isOp(string &op) { method isNum (line 79) | bool isNum(string &num) { function main (line 90) | int main() FILE: algorithms/cpp/evaluateTheBracketPairsOfAString/EvaluateTheBracketPairsOfAString.cpp class Solution (line 68) | class Solution { method isBracket (line 70) | bool isBracket(char c) { method string (line 74) | string evaluate(string s, vector>& knowledge) { FILE: algorithms/cpp/excelSheetColumnNumber/excelSheetColumnNumber.cpp function string (line 31) | string base26_int2str(long long n) { function base26_str2int (line 42) | long long base26_str2int(string& s){ function string (line 52) | string titleToNumber(int n) { function main (line 56) | int main(int argc, char**argv) FILE: algorithms/cpp/excelSheetColumnTitle/excelSheetColumnTitle.cpp function string (line 30) | string base26_int2str(long long n) { function base26_str2int (line 41) | long long base26_str2int(string& s){ function string (line 51) | string convertToTitle(int n) { function main (line 55) | int main(int argc, char**argv) FILE: algorithms/cpp/expressionAddOperators/ExpressionAddOperators.cpp class Solution (line 23) | class Solution { method addOperators (line 25) | vector addOperators(string num, int target) { method helper (line 33) | void helper(const string &num, const int target, //`num` and `target` ... FILE: algorithms/cpp/factorialTrailingZeroes/factorialTrailingZeroes.cpp class Solution (line 63) | class Solution { method trailingZeroes (line 65) | int trailingZeroes(int n) { method trailingZeroes (line 75) | int trailingZeroes(int n) { FILE: algorithms/cpp/fibonacciNumber/FibonacciNumber.cpp class Solution (line 38) | class Solution { method fib (line 40) | int fib(int N) { FILE: algorithms/cpp/filterRestaurantsByVeganFriendlyPriceAndDistance/FilterRestaurantsByVeganFriendlyPriceAndDistance.cpp function cmp (line 59) | static bool cmp(const vector& v1, const vector& v2) { class Solution (line 62) | class Solution { method filterRestaurants (line 64) | vector filterRestaurants(vector>& restaurants, int ve... FILE: algorithms/cpp/findAllAnagramsInAString/Find-All-Anagrams-in-a-String.cpp class Solution (line 38) | class Solution { method findAnagrams (line 40) | vector findAnagrams(string s, string p) { FILE: algorithms/cpp/findKthLargestXorCoordinateValue/FindKthLargestXorCoordinateValue.cpp class Solution (line 49) | class Solution { method print (line 51) | void print(vector>& m) { method kthLargestValue (line 63) | int kthLargestValue(vector>& matrix, int k) { FILE: algorithms/cpp/findMedianFromDataStream/FindMedianFromDataStream.cpp class MedianFinder (line 33) | class MedianFinder { method addNum (line 42) | void addNum(int num) { method findMedian (line 63) | double findMedian() { FILE: algorithms/cpp/findMinimumInRotatedSortedArray/findMinimumInRotatedSortedArray.II.cpp function findMin (line 40) | int findMin(vector &num) { function rotate_array (line 75) | void rotate_array(int a[], int n, int pos){ function printArray (line 103) | void printArray(int A[], int n) { function main (line 111) | int main(int argc, char** argv) FILE: algorithms/cpp/findMinimumInRotatedSortedArray/findMinimumInRotatedSortedArray.cpp function findMin (line 29) | int findMin(vector &num) { function rotate_array (line 63) | void rotate_array(int a[], int n, int pos){ function printArray (line 91) | void printArray(int A[], int n) { function main (line 99) | int main(int argc, char** argv) FILE: algorithms/cpp/findNearestPointThatHasTheSameXOrYCoordinate/FindNearestPointThatHasTheSameXOrYCoordinate.cpp class Solution (line 45) | class Solution { method nearestValidPoint (line 47) | int nearestValidPoint(int x, int y, vector>& points) { FILE: algorithms/cpp/findPeakElement/findPeakElement.cpp function findPeakElement (line 52) | int findPeakElement(const vector &num) { function printVector (line 87) | void printVector(vector &n) { function test (line 96) | void test(int a[], int n) { function main (line 105) | int main(int argc, char**argv) FILE: algorithms/cpp/findTheDifference/FindTheDifference.cpp class Solution (line 27) | class Solution { method findTheDifference (line 29) | char findTheDifference(string s, string t) { FILE: algorithms/cpp/findTheDuplicateNumber/findTheDuplicateNumber.cpp class Solution (line 25) | class Solution { method findDuplicate (line 33) | int findDuplicate(vector& nums) { FILE: algorithms/cpp/findTheHighestAltitude/FindTheHighestAltitude.cpp class Solution (line 32) | class Solution { method largestAltitude (line 34) | int largestAltitude(vector& gain) { FILE: algorithms/cpp/findTheWinnerOfAnArrayGame/FindTheWinnerOfAnArrayGame.cpp class Solution (line 53) | class Solution { method getWinner (line 55) | int getWinner(vector& arr, int k) { FILE: algorithms/cpp/findTheWinnerOfTheCircularGame/FindTheWinnerOfTheCircularGame.cpp class Solution (line 50) | class Solution { method findTheWinner (line 52) | int findTheWinner(int n, int k) { FILE: algorithms/cpp/findXorSumOfAllPairsBitwiseAnd/FindXorSumOfAllPairsBitwiseAnd.cpp class Solution (line 39) | class Solution { method getXORSum (line 41) | int getXORSum(vector& arr1, vector& arr2) { FILE: algorithms/cpp/findingMkAverage/FindingMkAverage.cpp class MKAverage (line 61) | class MKAverage { method print (line 72) | void print(T& v) { method takeMax (line 78) | int takeMax(multiset& s) { method takeMin (line 84) | int takeMin(multiset& s) { method MKAverage (line 91) | MKAverage(int _m, int _k): ring(_m, 0), m(_m), k(_k), sum(0), pos(0), ... method ins (line 95) | void ins(int n) { method del (line 109) | void del(int n) { method addElement (line 125) | void addElement(int num) { method calculateMKAverage (line 144) | int calculateMKAverage() { class MKAverage1 (line 169) | class MKAverage1 { method print (line 180) | void print(T& v) { method MKAverage1 (line 187) | MKAverage1(int _m, int _k): ring(_m,0), m(_m), k(_k), sum(0), pos(0),... method ins (line 190) | void ins(int n) { method del (line 208) | void del(int n) { method addElement (line 225) | void addElement(int num) { method calculateMKAverage (line 259) | int calculateMKAverage() { FILE: algorithms/cpp/findingTheUsersActiveMinutes/FindingTheUsersActiveMinutes.cpp class Solution (line 51) | class Solution { method findingUsersActiveMinutes (line 53) | vector findingUsersActiveMinutes(vector>& logs, int k) { FILE: algorithms/cpp/firstBadVersion/FirstBadVersion.cpp class Solution (line 27) | class Solution { method firstBadVersion (line 30) | int firstBadVersion(int n) { FILE: algorithms/cpp/firstMissingPositive/firstMissingPositive.cpp function firstMissingPositive_move (line 38) | int firstMissingPositive_move(int A[], int n) { function firstMissingPositive_map (line 74) | int firstMissingPositive_map(int A[], int n) { function firstMissingPositive (line 120) | int firstMissingPositive(int A[], int n) { function printArray (line 129) | void printArray(int a[], int n){ function Test (line 137) | void Test(int a[], int n, int expected) { function main (line 145) | int main() FILE: algorithms/cpp/firstUniqueCharacterInAString/FirstUniqueCharacterInAString.cpp class Solution (line 21) | class Solution { method firstUniqChar (line 23) | int firstUniqChar(string s) { FILE: algorithms/cpp/fizzBuzz/FizzBuzz.cpp class Solution (line 37) | class Solution { method fizzBuzz_old_school_way (line 39) | vector fizzBuzz_old_school_way(int n) { class FizzBuzz (line 56) | class FizzBuzz { method FizzBuzz (line 58) | FizzBuzz() : x(0) {} method string (line 60) | string operator()() { method fizzBuzz_cpp_way (line 76) | vector fizzBuzz_cpp_way(int n) { method fizzBuzz (line 82) | vector fizzBuzz(int n) { FILE: algorithms/cpp/flattenBinaryTreeToLinkedList/flattenBinaryTreeToLinkedList.cpp class Solution (line 48) | class Solution { method flatten (line 50) | void flatten(TreeNode *root) { FILE: algorithms/cpp/flattenNestedListIterator/FlattenNestedListIterator.cpp class NestedIterator (line 42) | class NestedIterator { method flatten (line 46) | void flatten(vector &nestedList) { method NestedIterator (line 56) | NestedIterator(vector &nestedList) { method next (line 61) | int next() { method hasNext (line 65) | bool hasNext() { FILE: algorithms/cpp/formArrayByConcatenatingSubarraysOfAnotherArray/FormArrayByConcatenatingSubarraysOfAnotherArray.cpp class Solution (line 51) | class Solution { method canChoose (line 53) | bool canChoose(vector>& groups, vector& nums) { FILE: algorithms/cpp/fractionToRecurringDecimal/fractionToRecurringDecimal.cpp function string (line 46) | string fractionToDecimal(int numerator, int denominator) { function test (line 95) | void test(int num, int deno) function main (line 100) | int main(int argc, char** argv) FILE: algorithms/cpp/frequencyOfTheMostFrequentElement/FrequencyOfTheMostFrequentElement.cpp class Solution (line 43) | class Solution { method maxFrequency (line 45) | int maxFrequency(vector& nums, int k) { FILE: algorithms/cpp/friendCircles/FriendCircles.cpp class Solution (line 46) | class Solution { method findCircleNum_DFS (line 51) | int findCircleNum_DFS(vector>& M) { method mark (line 65) | void mark(vector>& M, int i ) { method findCircleNum_UF (line 76) | int findCircleNum_UF(vector>& M) { method find (line 96) | int find(vector& relations, int i ) { method join (line 104) | bool join(vector &relations, int x, int y) { method findCircleNum (line 113) | int findCircleNum(vector>& M) { FILE: algorithms/cpp/frogJump/FrogJump.cpp class Solution (line 46) | class Solution { method canCross_recursion (line 48) | bool canCross_recursion(vector& stones, int curr, int last_jump) { method canCross_recursion_with_cache (line 61) | bool canCross_recursion_with_cache(vector& stones, int curr, int ... method canCross_non_recursion (line 82) | bool canCross_non_recursion(vector& stones) { method canCross (line 112) | bool canCross(vector& stones) { FILE: algorithms/cpp/gameOfLife/GameOfLife.cpp class Solution (line 51) | class Solution { method liveCheck (line 58) | void liveCheck(vector>& board, int r, int c) { method gameOfLife (line 79) | void gameOfLife(vector>& board) { FILE: algorithms/cpp/gasStation/gasStation.cpp class Solution (line 20) | class Solution { method canCompleteCircuit (line 22) | int canCompleteCircuit(vector &gas, vector &cost) { FILE: algorithms/cpp/generateParentheses/generateParentheses.cpp function generateParenthesis (line 23) | vector generateParenthesis(int n) { function generator (line 31) | void generator(vector& result, int left, int right, string s){ function printResult (line 44) | void printResult(vector& result) function main (line 51) | int main(int argc, char** argv) FILE: algorithms/cpp/grayCode/grayCode.cpp function grayCode01 (line 73) | vector grayCode01(int n) { function grayCode02 (line 102) | vector grayCode02(int n) { function grayCode (line 112) | vector grayCode(int n) { function printBits (line 120) | void printBits(int n, int len){ function printVector (line 130) | void printVector(vector& v, int bit_len) function main (line 143) | int main(int argc, char** argv) FILE: algorithms/cpp/greatestCommonDivisorOfStrings/GreatestCommonDivisorOfStrings.cpp class Solution (line 34) | class Solution { method findGCD_r (line 41) | int findGCD_r(int a, int b) { method findGCD (line 47) | int findGCD(int a, int b) { method isStrRepeatByLen (line 57) | bool isStrRepeatByLen(string& s, int len) { method strPrefixComp (line 68) | bool strPrefixComp(string& s1, string &s2, int len){ method string (line 75) | string gcdOfStrings(string s1, string s2) { FILE: algorithms/cpp/h-Index/h-Index.II.cpp class Solution (line 14) | class Solution { method hIndex (line 17) | int hIndex(vector& citations) { FILE: algorithms/cpp/h-Index/h-Index.cpp class Solution (line 41) | class Solution { method hIndex (line 43) | int hIndex(vector& citations) { method hIndex01 (line 47) | int hIndex01(vector& citations) { method hIndex02 (line 57) | int hIndex02(vector& citations) { FILE: algorithms/cpp/happyNumber/HappyNumber.cpp function squares (line 29) | int squares(int n) { function isHappy (line 39) | bool isHappy(int n) { function main (line 59) | int main(int argc, char** argv) FILE: algorithms/cpp/houseRobber/houseRobber.II.cpp class Solution (line 23) | class Solution { method orginal_rob (line 25) | int orginal_rob(vector &money, int start, int end) { method rob (line 37) | int rob(vector& nums) { FILE: algorithms/cpp/houseRobber/houseRobber.cpp function rob1 (line 38) | int rob1(vector &money) { function rob2 (line 57) | int rob2(vector &money) { function rob (line 69) | int rob(vector &num) { function printVector (line 75) | void printVector( vector &v ){ function main (line 83) | int main(int argc, char** argv) { FILE: algorithms/cpp/houseRobber/houseRobberIII.cpp class Solution (line 68) | class Solution { method rob (line 71) | int rob(TreeNode* root) { method max (line 95) | int max(int a, int b) { method max (line 98) | int max(int a, int b, int c) { method max (line 101) | int max(int a, int b, int c, int d) { method rob_or_not (line 105) | void rob_or_not(TreeNode* root, int& max_robbed, int& max_not_robbed) { method rob (line 129) | int rob(TreeNode* root) { class Solution (line 93) | class Solution { method rob (line 71) | int rob(TreeNode* root) { method max (line 95) | int max(int a, int b) { method max (line 98) | int max(int a, int b, int c) { method max (line 101) | int max(int a, int b, int c, int d) { method rob_or_not (line 105) | void rob_or_not(TreeNode* root, int& max_robbed, int& max_not_robbed) { method rob (line 129) | int rob(TreeNode* root) { FILE: algorithms/cpp/implementQueueUsingStacks/ImplementQueueUsingStacks.cpp class Queue (line 31) | class Queue { method push (line 34) | void push(int x) { method pop (line 39) | void pop(void) { method peek (line 46) | int peek(void) { method empty (line 54) | bool empty(void) { method transfer (line 59) | void transfer(stack& s1, stack& s2) { FILE: algorithms/cpp/implementStackUsingQueues/ImplementStackUsingQueues.cpp class Stack (line 37) | class Stack { method push (line 40) | void push(int x) { method pop (line 44) | void pop() { method top (line 56) | int top() { method empty (line 60) | bool empty() { FILE: algorithms/cpp/implementTriePrefixTree/ImplementTriePrefixTree.cpp class TrieNode (line 16) | class TrieNode { method TrieNode (line 19) | TrieNode():isWord(false) { } class Trie (line 24) | class Trie { method Trie (line 26) | Trie() { method insert (line 31) | void insert(string s) { method search (line 44) | bool search(string key) { method startsWith (line 50) | bool startsWith(string prefix) { method retrieve (line 56) | inline bool retrieve(const string& key, bool isWord) { FILE: algorithms/cpp/increasingTripletSubsequence/increasingTripletSubsequence.cpp class Solution (line 23) | class Solution { method increasingTriplet (line 25) | bool increasingTriplet(vector& nums) { method increasingTriplet (line 49) | bool increasingTriplet(vector& nums) { class Solution (line 47) | class Solution { method increasingTriplet (line 25) | bool increasingTriplet(vector& nums) { method increasingTriplet (line 49) | bool increasingTriplet(vector& nums) { FILE: algorithms/cpp/incrementalMemoryLeak/IncrementalMemoryLeak.cpp class Solution (line 52) | class Solution { method memLeak (line 54) | vector memLeak(int memory1, int memory2) { FILE: algorithms/cpp/insertDeleteGetRandom/InsertDeleteGetrandomO1.cpp class RandomizedSet (line 42) | class RandomizedSet { method RandomizedSet (line 45) | RandomizedSet() { method insert (line 50) | bool insert(int val) { method remove (line 58) | bool remove(int val) { method getRandom (line 79) | int getRandom() { method find (line 86) | bool find(int val) { FILE: algorithms/cpp/insertDeleteGetRandom/InsertDeleteGetrandomO1DuplicatesAllowed.cpp class RandomizedCollection (line 42) | class RandomizedCollection { method RandomizedCollection (line 45) | RandomizedCollection() { method insert (line 50) | bool insert(int val) { method remove (line 57) | bool remove(int val) { method getRandom (line 84) | int getRandom() { method find (line 90) | bool find(int val) { FILE: algorithms/cpp/insertInterval/insertInterval.cpp type Interval (line 27) | struct Interval { method Interval (line 30) | Interval() : start(0), end(0) {} method Interval (line 31) | Interval(int s, int e) : start(s), end(e) {} function compare (line 35) | bool compare(const Interval& lhs, const Interval& rhs){ function merge (line 39) | vector merge(vector &intervals) { function insert (line 61) | vector insert(vector &intervals, Interval newInterva... function main (line 68) | int main(int argc, char**argv) FILE: algorithms/cpp/insertionSortList/insertionSortList.cpp type ListNode (line 15) | struct ListNode { method ListNode (line 18) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 21) | ListNode *insertionSortList(ListNode *head) { method ListNode (line 18) | ListNode(int x) : val(x), next(NULL) {} function printList (line 48) | void printList(ListNode* h) function ListNode (line 57) | ListNode* createList(int a[], int n) method ListNode (line 18) | ListNode(int x) : val(x), next(NULL) {} function main (line 72) | int main(int argc, char** argv) FILE: algorithms/cpp/integerBreak/IntegerBreak.cpp class Solution (line 23) | class Solution { method integerBreak (line 34) | int integerBreak(int n) { method integerBreak (line 50) | int integerBreak(int n) { class Solution (line 48) | class Solution { method integerBreak (line 34) | int integerBreak(int n) { method integerBreak (line 50) | int integerBreak(int n) { FILE: algorithms/cpp/integerReplacement/IntegerReplacement.cpp class Solution (line 39) | class Solution { method integerReplacement_recursion (line 43) | int integerReplacement_recursion(int n) { method integerReplacement_recursionWithCache (line 50) | int integerReplacement_recursionWithCache(int n) { method integerReplacement_simple (line 66) | int integerReplacement_simple(int n){ method integerReplacement (line 80) | int integerReplacement(int n) { FILE: algorithms/cpp/integerToEnglishWords/IntegerToEnglishWords.cpp function string (line 42) | string numberLess1000ToWords(int num) { function string (line 64) | string numberToWords(int num) { function main (line 89) | int main(int argc, char** argv) FILE: algorithms/cpp/integerToRoman/integerToRoman.cpp function string (line 19) | string intToRoman(int num) { function main (line 35) | int main(int argc, char** argv) FILE: algorithms/cpp/interleavingString/interleavingString.cpp function isInterleave (line 67) | bool isInterleave(string s1, string s2, string s3) { function isInterleave_dfs (line 106) | bool isInterleave_dfs(string s1, string s2, string s3) { function main (line 130) | int main(int argc, char**argv) FILE: algorithms/cpp/intersectionOfTwoArrays/intersectionOfTwoArrays.cpp class Solution (line 17) | class Solution { method intersection (line 21) | vector intersection(vector& nums1, vector& nums2) { method intersection (line 57) | vector intersection(vector& nums1, vector& nums2) { class Solution2 (line 36) | class Solution2 { method intersection (line 38) | vector intersection(vector& nums1, vector& nums2) { class Solution (line 55) | class Solution { method intersection (line 21) | vector intersection(vector& nums1, vector& nums2) { method intersection (line 57) | vector intersection(vector& nums1, vector& nums2) { FILE: algorithms/cpp/intersectionOfTwoArrays/intersectionOfTwoArraysII.cpp class Solution (line 39) | class Solution { // O(NlogN + MlogM) method intersect (line 41) | vector intersect(vector& nums1, vector& nums2) { method intersect (line 73) | vector intersect(vector& nums1, vector& nums2) { class Solution (line 71) | class Solution { method intersect (line 41) | vector intersect(vector& nums1, vector& nums2) { method intersect (line 73) | vector intersect(vector& nums1, vector& nums2) { FILE: algorithms/cpp/intersectionOfTwoLinkedLists/intersectionOfTwoLinkedLists.cpp class Solution (line 37) | class Solution { method ListNode (line 39) | ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { method getListLength (line 66) | inline int getListLength(ListNode *head){ FILE: algorithms/cpp/intervalListIntersectons/IntervalListIntersections.cpp class Solution (line 49) | class Solution { method compareInterval (line 52) | bool compareInterval(Interval& lhs, Interval& rhs) { method overlapped (line 56) | bool overlapped(Interval& lhs, Interval& rhs) { method Interval (line 63) | Interval mergeTwoInterval(Interval& lhs, Interval& rhs) { method intervalIntersection (line 70) | vector intervalIntersection(vector& A, vector> &grid, int x, int y) { method islandPerimeter (line 45) | int islandPerimeter(vector>& grid) { FILE: algorithms/cpp/isomorphicStrings/IsomorphicStrings.cpp class Solution (line 29) | class Solution { method isIsomorphic (line 31) | bool isIsomorphic(string s, string t) { FILE: algorithms/cpp/jewelsAndStones/JewelsAndStones.cpp class Solution (line 36) | class Solution { method numJewelsInStones (line 38) | int numJewelsInStones(string J, string S) { FILE: algorithms/cpp/jumpGame/jumpGame.II.cpp function jump (line 26) | int jump(int A[], int n) { function printArray (line 54) | void printArray(int a[], int n){ function main (line 62) | int main() FILE: algorithms/cpp/jumpGame/jumpGame.cpp class Solution (line 21) | class Solution { method canJump (line 23) | bool canJump(int A[], int n) { FILE: algorithms/cpp/kthLargestElementInAnArray/KthLargestElementInAnArray.cpp class Solution (line 23) | class Solution { method findKthLargest_buildin (line 26) | int findKthLargest_buildin(vector& nums, int k) { method partition (line 33) | int partition(vector& nums, int left, int right) { method findKthLargest_qsort (line 47) | int findKthLargest_qsort(vector& nums, int k) { method findKthLargest (line 63) | int findKthLargest(vector& nums, int k) { FILE: algorithms/cpp/kthSmallestElementInaBST/KthSmallestElementInABst.cpp class Solution (line 33) | class Solution { method kthSmallestHelper_recursive (line 36) | int kthSmallestHelper_recursive(TreeNode* root, int& k) { method kthSmallestHelper_nonRecursive (line 50) | int kthSmallestHelper_nonRecursive(TreeNode* root, int k){ method kthSmallest (line 70) | int kthSmallest(TreeNode* root, int k) { FILE: algorithms/cpp/largestColorValueInADirectedGraph/LargestColorValueInADirectedGraph.cpp class Node (line 46) | class Node { method Node (line 48) | Node(char c) { method AddMyColor (line 54) | void AddMyColor() { colors[color]++; } method Processed (line 55) | void Processed() { processed = true; } method isProcessed (line 56) | bool isProcessed() { return processed; } method AddIncomming (line 57) | void AddIncomming(int n=1) { incomming += n;} method Incomming (line 58) | int Incomming() {return incomming;} method AddChildNode (line 59) | void AddChildNode(int n) { children.push_back(n); } method ChildrenCount (line 61) | int ChildrenCount() { return children.size(); } method MaxColorValue (line 63) | int MaxColorValue() { method MergeChildColors (line 70) | void MergeChildColors(Node& child){ class Solution (line 86) | class Solution { method print (line 88) | void print(vector& v) { method largestPathValue (line 100) | int largestPathValue(string colors, vector>& edges) { method topologicalSort (line 140) | void topologicalSort(int i, vector& topSort, vector& visite... method travel (line 153) | bool travel(int i, vector& visited ) { FILE: algorithms/cpp/largestMergeOfTwoStrings/LargestMergeOfTwoStrings.cpp class Solution (line 53) | class Solution { method string_cmp (line 55) | bool string_cmp(string& s1, int p1, string& s2, int p2) { method string (line 63) | string largestMerge(string word1, string word2) { FILE: algorithms/cpp/largestNumber/largestNumber.cpp class Solution (line 17) | class Solution { method comp (line 21) | static bool comp (string& s1, string& s2) { return s1+s2 > s2+s1; } method string (line 23) | string largestNumber(vector &num) { FILE: algorithms/cpp/largestNumberAfterMutatingSubstring/LargestNumberAfterMutatingSubstring.cpp class Solution (line 53) | class Solution { method string (line 55) | string maximumNumber(string num, vector& change) { FILE: algorithms/cpp/largestPerimeterTriangle/largestPerimeterTriangle.cpp class Solution (line 1) | class Solution { method largestPerimeter (line 3) | int largestPerimeter(vector& A) { FILE: algorithms/cpp/largestRectangleInHistogram/largestRectangleInHistogram.cpp function largestRectangleArea_01 (line 58) | int largestRectangleArea_01(vector& heights) { function largestRectangleArea (line 158) | int largestRectangleArea(vector &height) { function printArray (line 187) | void printArray(vector &v) function test (line 195) | void test(int a[], int n) function main (line 202) | int main() FILE: algorithms/cpp/largestSubmatrixWithRearrangements/LargestSubmatrixWithRearrangements.cpp class Solution (line 48) | class Solution { method largestSubmatrix (line 50) | int largestSubmatrix(vector>& matrix) { FILE: algorithms/cpp/largestSubstringBetweenTwoEqualCharacters/LargestSubstringBetweenTwoEqualCharacters.cpp class Solution (line 42) | class Solution { method maxLengthBetweenEqualCharacters (line 44) | int maxLengthBetweenEqualCharacters(string s) { FILE: algorithms/cpp/latestTimeByReplacingHiddenDigits/LatestTimeByReplacingHiddenDigits.cpp class Solution (line 37) | class Solution { method string (line 39) | string maximumTime(string time) { FILE: algorithms/cpp/lengthOfLastWord/lengthOfLastWord.cpp function lengthOfLastWord (line 24) | int lengthOfLastWord(const char *s) { function main (line 47) | int main(int argc, char** argv) FILE: algorithms/cpp/letterCombinationsOfAPhoneNumber/letterCombinationsOfAPhoneNumber.cpp function letterCombinations (line 26) | vector letterCombinations(string digits) { function printVector (line 73) | void printVector(vector& ss){ function main (line 82) | int main(int argc, char**argv) FILE: algorithms/cpp/lexicographicalNumbers/LexicographicalNumbers.cpp class Solution (line 14) | class Solution { method lexicalOrder01 (line 18) | vector lexicalOrder01(int n) { method myComp (line 27) | static bool myComp(int i,int j) { method lexicalOrder02 (line 37) | vector lexicalOrder02(int n) { method lexicalOrder_helper (line 47) | void lexicalOrder_helper(int num, int& n, vector& result) { method lexicalOrder03 (line 60) | vector lexicalOrder03(int n) { method lexicalOrder (line 101) | vector lexicalOrder(int n) { FILE: algorithms/cpp/lexicographicallySmallestStringAfterApplyingOperations/LexicographicallySmallestStringAfterApplyingOperations.cpp class Solution (line 72) | class Solution { method rotate_str (line 75) | void rotate_str(string& s, int n) { method add_str (line 78) | void add_str(string& s, int n) { method string (line 84) | string findLexSmallestString(string s, int a, int b) { method dfs (line 90) | void dfs(string& s, int a, int b, string& result) { FILE: algorithms/cpp/linkedListCycle/linkedListCycle.II.cpp class Solution (line 23) | class Solution { method hasCycle (line 28) | bool hasCycle(ListNode *head) { method ListNode (line 55) | ListNode *detectCycle(ListNode *head) { FILE: algorithms/cpp/linkedListCycle/linkedListCycle.cpp class Solution (line 24) | class Solution { method hasCycle (line 26) | bool hasCycle(ListNode *head) { method hasCycle01 (line 35) | bool hasCycle01(ListNode *head) { method hasCycle02 (line 47) | bool hasCycle02(ListNode *head) { method hasCycle03 (line 62) | bool hasCycle03(ListNode *head) { method hasCycle04 (line 74) | bool hasCycle04(ListNode *head) { FILE: algorithms/cpp/linkedListRandomNode/LinkedListRandomNode.cpp class Solution (line 35) | class Solution { method Solution (line 39) | Solution(ListNode* head) { method getRandom (line 47) | int getRandom() { FILE: algorithms/cpp/longerContiguousSegmentsOfOnesThanZeros/LongerContiguousSegmentsOfOnesThanZeros.cpp class Solution (line 49) | class Solution { method checkZeroOnes (line 51) | bool checkZeroOnes(string s) { FILE: algorithms/cpp/longestAbsoluteFilePath/LongestAbsoluteFilePath.cpp class Solution (line 55) | class Solution { method lengthLongestPath (line 74) | int lengthLongestPath(string input) { FILE: algorithms/cpp/longestCommonPrefix/longestCommonPrefix.cpp function string (line 18) | string longestCommonPrefix(vector &strs) { function main (line 39) | int main() FILE: algorithms/cpp/longestConsecutiveSequence/longestConsecutiveSequence.cpp class Solution (line 34) | class Solution { method longestConsecutive (line 36) | int longestConsecutive(vector &num) { FILE: algorithms/cpp/longestIncreasingPathInAMatrix/LongestIncreasingPathInAMatrix.cpp class Solution (line 42) | class Solution { method longestIncreasingPath (line 44) | int longestIncreasingPath(vector>& matrix) { method helper (line 57) | int helper(vector>& matrix, vector>& path, con... FILE: algorithms/cpp/longestIncreasingSubsequence/longestIncreasingSubsequence.cpp class Solution (line 28) | class Solution { method lengthOfLIS (line 30) | int lengthOfLIS(vector& nums) { method lengthOfLIS (line 67) | int lengthOfLIS(vector& nums) { method binary_search (line 102) | int binary_search(int number) method lengthOfLIS (line 130) | int lengthOfLIS(vector& nums) { class Solution (line 49) | class Solution { method lengthOfLIS (line 30) | int lengthOfLIS(vector& nums) { method lengthOfLIS (line 67) | int lengthOfLIS(vector& nums) { method binary_search (line 102) | int binary_search(int number) method lengthOfLIS (line 130) | int lengthOfLIS(vector& nums) { FILE: algorithms/cpp/longestNiceSubstring/LongestNiceSubstring.cpp class Solution (line 47) | class Solution { method getCharIndex (line 48) | inline int getCharIndex(char c) { method getCaseIndex (line 51) | inline int getCaseIndex(char c) { method string (line 55) | string longestNiceSubstring(string s) { FILE: algorithms/cpp/longestPalindrome/LongestPalindrome.cpp class Solution (line 27) | class Solution { method longestPalindrome (line 29) | int longestPalindrome(string s) { FILE: algorithms/cpp/longestPalindromicSubsequence/LongestPalindromicSubsequence.cpp class Solution (line 68) | class Solution { method longestPalindromeSubseq (line 70) | int longestPalindromeSubseq(string s) { FILE: algorithms/cpp/longestPalindromicSubstring/longestPalindromicSubstring.cpp function string (line 19) | string findPalindrome(string s, int left, int right) function string (line 35) | string longestPalindrome_recursive_way(string s) { function findPalindrome (line 59) | void findPalindrome(string s, int left, int right, int& start, int& len) function string (line 76) | string longestPalindrome_recursive_way2(string s) { function string (line 95) | string longestPalindrome_dp_way(string s) { function string (line 132) | string longestPalindrome_dp_opt_way(string s) { function string (line 176) | string longestPalindrome(string s) { function main (line 183) | int main(int argc, char**argv) FILE: algorithms/cpp/longestSubstringOfAllVowelsInOrder/LongestSubstringOfAllVowelsInOrder.cpp class Solution (line 45) | class Solution { type Vowels (line 47) | enum Vowels{ method Vowels (line 56) | Vowels isVowels(char c) { method longestBeautifulSubstring (line 67) | int longestBeautifulSubstring(string word) { FILE: algorithms/cpp/longestSubstringWithAtLeastKRepeatingCharacters/LongestSubstringWithAtLeastKRepeatingCharacters.cpp class Solution (line 42) | class Solution { method longestSubstring (line 44) | int longestSubstring(string s, int k) { method max (line 91) | inline int max(int x, int y) { return x>y? x:y; } method split (line 93) | inline void split(const string &s, char delim, vector &elems) { method split (line 104) | inline vector split(const string &s, char delim) { FILE: algorithms/cpp/longestSubstringWithAtMostTwoDistinctCharacters/longestSubstringWithAtMostTwoDistinctCharacters.cpp function lengthOfLongestSubstringTwoDistinct (line 33) | int lengthOfLongestSubstringTwoDistinct(string s) { function main (line 57) | int main(int argc, char** argv) FILE: algorithms/cpp/longestSubstringWithoutRepeatingCharacters/longestSubstringWithoutRepeatingCharacters.cpp function lengthOfLongestSubstring1 (line 28) | int lengthOfLongestSubstring1(string s) { function lengthOfLongestSubstring (line 44) | int lengthOfLongestSubstring(string s) { function main (line 63) | int main(int argc, char** argv) FILE: algorithms/cpp/longestTurbulentSubarray/LongestTurbulentSubarray.cpp class Solution (line 39) | class Solution { method maxTurbulenceSize_01 (line 42) | int maxTurbulenceSize_01(vector& A) { method maxTurbulenceSize_02 (line 113) | int maxTurbulenceSize_02(vector& A) { method maxTurbulenceSize (line 134) | int maxTurbulenceSize(vector& A) { FILE: algorithms/cpp/longestValidParentheses/longestValidParentheses.cpp function longestValidParentheses (line 23) | int longestValidParentheses(string s) { function main (line 51) | int main(int argc, char** argv) FILE: algorithms/cpp/lowestCommonAncestorOfABinarySearchTree/LowestCommonAncestorOfABinarySearchTree.cpp class Solution (line 39) | class Solution { method TreeNode (line 41) | TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* ... FILE: algorithms/cpp/lowestCommonAncestorOfABinaryTree/LowestCommonAncestorOfABinaryTree.cpp class Solution (line 40) | class Solution { method findPath (line 42) | bool findPath(TreeNode* root, TreeNode* p, vector& path) { method TreeNode (line 58) | TreeNode* lowestCommonAncestor01(TreeNode* root, TreeNode* p, TreeNode... method TreeNode (line 77) | TreeNode* lowestCommonAncestor02(TreeNode* root, TreeNode* p, TreeNode... method TreeNode (line 95) | TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* ... FILE: algorithms/cpp/majorityElement/majorityElement.II.cpp class Solution (line 14) | class Solution { method majorityElement01 (line 18) | vector majorityElement01(vector& nums) { method majorityElement02 (line 33) | vector majorityElement02(vector& nums) { method majorityElement (line 67) | vector majorityElement(vector& nums) { FILE: algorithms/cpp/majorityElement/majorityElement.cpp function majorityElement (line 26) | int majorityElement(vector &num) { function split (line 53) | vector split(const string &s, char delim) { function main (line 60) | int main(int argc, char** argv) FILE: algorithms/cpp/makeTheXorOfAllSegmentsEqualToZero/MakeTheXorOfAllSegmentsEqualToZero.cpp class Solution (line 66) | class Solution { method minChanges (line 68) | int minChanges(vector& nums, int k) { FILE: algorithms/cpp/mapOfHighestPeak/MapOfHighestPeak.cpp class Cell (line 49) | class Cell{ class Solution (line 56) | class Solution { method setHeight (line 58) | void setHeight(vector>& height, method highestPeak (line 70) | vector> highestPeak(vector>& isWater) { FILE: algorithms/cpp/matrixCellsInDistanceOrder/MatrixCellsInDistanceOrder.cpp class Solution (line 47) | class Solution { method put (line 49) | void put(int R, int C, int r, int c, vector>& res) { method allCellsDistOrder (line 54) | vector> allCellsDistOrder(int R, int C, int r0, int c0) { FILE: algorithms/cpp/maxAreaOfIsland/MaxAreaOfIsland.cpp class Solution (line 36) | class Solution { method maxAreaOfIsland (line 38) | int maxAreaOfIsland(vector>& grid) { method maxAreaOfIsland_DFS (line 52) | void maxAreaOfIsland_DFS( vector>& grid, int i, int j, int... FILE: algorithms/cpp/maxPointsOnALine/maxPointsOnALine.cpp type Point (line 18) | struct Point { method Point (line 21) | Point() : x(0), y(0) {} method Point (line 22) | Point(int a, int b) : x(a), y(b) {} function maxPoints (line 26) | int maxPoints(vector &points) { function generatePoints (line 79) | void generatePoints(vector &points, int n) { function printPoints (line 89) | void printPoints(vector &points) { function main (line 97) | int main(int argc, char** argv) FILE: algorithms/cpp/maximalRectangle/maximalRectangle.cpp function largestRectangleArea (line 30) | int largestRectangleArea(vector &height) { function maximalRectangle (line 54) | int maximalRectangle(vector > &matrix) { function printArray (line 78) | void printArray(vector &v) function test (line 87) | void test(int a[], int n) function main (line 94) | int main(int argc, char** argv) FILE: algorithms/cpp/maximalSquare/MaximalSquare.cpp class Solution (line 67) | class Solution { method min (line 69) | inline int min(int x, int y) { method min (line 72) | inline int min(int x, int y, int z) { method maximalSquare (line 75) | int maximalSquare(vector>& matrix) { FILE: algorithms/cpp/maximizeNumberOfNiceDivisors/MaximizeNumberOfNiceDivisors.cpp class Solution (line 73) | class Solution { method maxNiceDivisors (line 75) | int maxNiceDivisors(int primeFactors) { method maxNiceDivisors_01 (line 81) | int maxNiceDivisors_01(int primeFactors) { method maxNiceDivisors_02 (line 91) | int maxNiceDivisors_02(int primeFactors) { method pow3 (line 109) | int pow3(int x) { method maxNiceDivisors_03 (line 124) | int maxNiceDivisors_03(int primeFactors) { FILE: algorithms/cpp/maximizePalindromeLengthFromSubsequences/MaximizePalindromeLengthFromSubsequences.cpp class Solution (line 72) | class Solution { method longestPalindrome (line 75) | int longestPalindrome(string word1, string word2) { FILE: algorithms/cpp/maximizeScoreAfterNOperations/MaximizeScoreAfterNOperations.cpp class Solution (line 48) | class Solution { method gcd (line 52) | int gcd(int a, int b) { method maxScore (line 61) | int maxScore(vector& nums) { method maxScore (line 76) | int maxScore(vector>& pair_gcd, int mask, int n, int step) { FILE: algorithms/cpp/maximumAbsoluteSumOfAnySubarray/MaximumAbsoluteSumOfAnySubarray.cpp class Solution (line 35) | class Solution { method maxAbsoluteSum (line 37) | int maxAbsoluteSum(vector& nums) { method maxAbsoluteSum01 (line 44) | int maxAbsoluteSum01(vector& nums) { method maxSumArray (line 49) | int maxSumArray(vector& nums) { method minSumArray (line 60) | int minSumArray(vector& nums) { method maxAbsoluteSum02 (line 73) | int maxAbsoluteSum02(vector& nums) { FILE: algorithms/cpp/maximumAscendingSubarraySum/MaximumAscendingSubarraySum.cpp class Solution (line 44) | class Solution { method maxAscendingSum (line 46) | int maxAscendingSum(vector& nums) { FILE: algorithms/cpp/maximumAveragePassRatio/MaximumAveragePassRatio.cpp class Solution (line 44) | class Solution { method print_queue (line 47) | void print_queue(T q) { // NB: pass by value so the print uses a copy method ratio (line 58) | double ratio(double pass, double total) { method profit (line 62) | double profit(double pass, double total) { method maxAverageRatio (line 67) | double maxAverageRatio(vector>& classes, int extraStudents) { FILE: algorithms/cpp/maximumAverageSubarray/MaximumAverageSubarray.I.cpp class Solution (line 28) | class Solution { method findMaxAverage (line 30) | double findMaxAverage(vector& nums, int k) { FILE: algorithms/cpp/maximumBuildingHeight/MaximumBuildingHeight.cpp class Solution (line 130) | class Solution { method print (line 132) | void print(vector>& vv){ method getMaxHeight (line 142) | int getMaxHeight(vector& left, vector& right) { method maxBuilding (line 162) | int maxBuilding(int n, vector>& restrictions) { FILE: algorithms/cpp/maximumDepthOfBinaryTree/maximumDepthOfBinaryTree.cpp class Solution (line 23) | class Solution { method maxDepth (line 25) | int maxDepth(TreeNode *root) { class Solution2 (line 44) | class Solution2 { method maxDepth (line 46) | int maxDepth(TreeNode *root) { FILE: algorithms/cpp/maximumDistanceBetweenAPairOfValues/MaximumDistanceBetweenAPairOfValues.cpp class Solution (line 51) | class Solution { method maxDistance (line 53) | int maxDistance(vector& nums1, vector& nums2) { method binary_search (line 59) | int binary_search(vector& nums, int start, int target) { method maxDistance1 (line 69) | int maxDistance1(vector& nums1, vector& nums2) { method maxDistance2 (line 79) | int maxDistance2(vector& nums1, vector& nums2) { FILE: algorithms/cpp/maximumElementAfterDecreasingAndRearranging/MaximumElementAfterDecreasingAndRearranging.cpp class Solution (line 55) | class Solution { method maximumElementAfterDecrementingAndRearranging (line 57) | int maximumElementAfterDecrementingAndRearranging(vector& arr) { FILE: algorithms/cpp/maximumErasureValue/MaximumErasureValue.cpp class Solution (line 33) | class Solution { method maximumUniqueSubarray (line 35) | int maximumUniqueSubarray(vector& nums) { FILE: algorithms/cpp/maximumGap/maximumGap.cpp function maximumGap (line 23) | int maximumGap(vector &num) { function main (line 67) | int main() FILE: algorithms/cpp/maximumIceCreamBars/MaximumIceCreamBars.cpp class Solution (line 44) | class Solution { method maxIceCream (line 46) | int maxIceCream(vector& costs, int coins) { FILE: algorithms/cpp/maximumNumberOfBallsInABox/MaximumNumberOfBallsInABox.cpp class Solution (line 50) | class Solution { method sum (line 52) | int sum(int n) { method countBalls (line 60) | int countBalls(int lowLimit, int highLimit) { FILE: algorithms/cpp/maximumNumberOfConsecutiveValuesYouCanMake/MaximumNumberOfConsecutiveValuesYouCanMake.cpp class Solution (line 52) | class Solution { method getMaximumConsecutive (line 54) | int getMaximumConsecutive(vector& coins) { FILE: algorithms/cpp/maximumNumberOfEventsThatCanBeAttended/MaximumNumberOfEventsThatCanBeAttended.II.cpp class Solution (line 47) | class Solution { method comp_start (line 49) | static const bool comp_start(vector& x, vector& y) { method comp_end (line 53) | static const bool comp_end(vector& x, vector& y) { method print (line 57) | void print(vector>& events){ method maxValue (line 70) | int maxValue(vector>& events, int k) { method findNextEvent (line 91) | int findNextEvent(vector>& events, int low, int day) { method maxValueDFS (line 105) | int maxValueDFS(vector>& events, int current, int k) { method maxValueDFS (line 118) | int maxValueDFS(vector>& events, int current, int k, vecto... method findPrevEvent (line 142) | int findPrevEvent(vector>& events, int high, int day) { method maxValueDP (line 155) | int maxValueDP(vector>& events, int k) { FILE: algorithms/cpp/maximumNumberOfEventsThatCanBeAttended/MaximumNumberOfEventsThatCanBeAttended.cpp class Solution (line 53) | class Solution { method comp_start (line 55) | static const bool comp_start(vector& x, vector& y) { method comp_end (line 59) | static const bool comp_end(vector& x, vector& y) { method find (line 66) | int find(int x, vector& f) { method print (line 73) | void print(vector>& events){ method maxEvents (line 81) | int maxEvents(vector>& events) { method maxEvents_priority_queue (line 86) | int maxEvents_priority_queue(vector>& events) { method maxEvents_union_find (line 122) | int maxEvents_union_find(vector>& events) { FILE: algorithms/cpp/maximumNumberOfGroupsGettingFreshDonuts/MaximumNumberOfGroupsGettingFreshDonuts.cpp class Solution (line 38) | class Solution { method maxHappyGroups (line 40) | int maxHappyGroups(int batchSize, vector& groups) { method dfs (line 71) | int dfs(vector& reminder, int batchSize, int sum, map... FILE: algorithms/cpp/maximumNumberOfWordsYouCanType/MaximumNumberOfWordsYouCanType.cpp class Solution (line 41) | class Solution { method canBeTypedWords (line 43) | int canBeTypedWords(string text, string brokenLetters) { FILE: algorithms/cpp/maximumPopulationYear/MaximumPopulationYear.cpp class Solution (line 36) | class Solution { method maximumPopulation (line 39) | int maximumPopulation(vector>& logs) { FILE: algorithms/cpp/maximumProductOfTwoElementsInAnArray/MaximumProductOfTwoElementsInAnArray.cpp class Solution (line 34) | class Solution { method maxProduct (line 36) | int maxProduct(vector& nums) { FILE: algorithms/cpp/maximumProductOfWordLengths/MaximumProductOfWordLengths.cpp class Solution (line 34) | class Solution { method maxProduct (line 46) | int maxProduct(vector& words) { FILE: algorithms/cpp/maximumProductSubarray/maximumProductSubarray.cpp function max (line 30) | int max(int x, int y) { function min (line 33) | int min(int x, int y){ function max (line 36) | int max(int x, int y, int z) { function min (line 39) | int min(int x, int y, int z) { function maxProduct (line 50) | int maxProduct(int A[], int n) { function main (line 73) | int main() FILE: algorithms/cpp/maximumScoreFromPerformingMultiplicationOperations/MaximumScoreFromPerformingMultiplicationOperations.cpp class Solution (line 51) | class Solution { method maximumScore (line 56) | int maximumScore(vector& nums, vector& multipliers) { method maximumScoreDFS (line 63) | int maximumScoreDFS(vector& nums, int left, int right, FILE: algorithms/cpp/maximumScoreFromRemovingStones/MaximumScoreFromRemovingStones.cpp class Solution (line 55) | class Solution { method can_move (line 57) | bool can_move(int a, int b, int c) { method swap (line 65) | void swap(int& x, int& y){ method sort (line 71) | void sort(int& a, int& b, int& c) { method maximumScore (line 79) | int maximumScore(int a, int b, int c) { method maximumScore_loop (line 83) | int maximumScore_loop(int a, int b, int c) { method maximumScore_math (line 95) | int maximumScore_math(int a, int b, int c) { FILE: algorithms/cpp/maximumScoreFromRemovingSubstrings/MaximumScoreFromRemovingSubstrings.cpp class Solution (line 45) | class Solution { method maximumGain (line 47) | int maximumGain(string s, int x, int y) { FILE: algorithms/cpp/maximumScoreOfAGoodSubarray/MaximumScoreOfAGoodSubarray.cpp class Solution (line 33) | class Solution { method maximumScore (line 35) | int maximumScore(vector& nums, int k) { FILE: algorithms/cpp/maximumSubArray/maximumSubArray.cpp function max (line 30) | int max(int x, int y){ function maxSubArray (line 34) | int maxSubArray(int A[], int n) { function maxSubArray1 (line 41) | int maxSubArray1(int A[], int n) { function maxSubArray2 (line 53) | int maxSubArray2(int A[], int n) { function main (line 66) | int main() FILE: algorithms/cpp/maximumSubarrayMinProduct/MaximumSubarrayMinProduct.cpp class Solution (line 48) | class Solution { method maxSumMinProduct (line 50) | int maxSumMinProduct(vector& nums) { FILE: algorithms/cpp/maximumUnitsOnATruck/MaximumUnitsOnATruck.cpp class Solution (line 42) | class Solution { method print (line 44) | void print(vector>& boxes) { method maximumUnits (line 53) | int maximumUnits(vector>& boxTypes, int truckSize) { FILE: algorithms/cpp/maximumValueAfterInsertion/MaximumValueAfterInsertion.cpp class Solution (line 40) | class Solution { method string (line 42) | string maxValue(string n, int x) { FILE: algorithms/cpp/maximumValueAtAGivenIndexInABoundedArray/MaximumValueAtAGivenIndexInABoundedArray.cpp class Solution (line 83) | class Solution { method maxValue (line 85) | int maxValue(int n, int index, int maxSum) { FILE: algorithms/cpp/maximumXorForEachQuery/MaximumXorForEachQuery.cpp class Solution (line 50) | class Solution { method getMaximumXor (line 52) | vector getMaximumXor(vector& nums, int maximumBit) { method getMaximumXor (line 67) | vector getMaximumXor(vector& nums, int maximumBit) { FILE: algorithms/cpp/medianOfTwoSortedArrays/medianOfTwoSortedArrays.cpp function binarySearch (line 16) | int binarySearch(int A[], int low, int high, int key){ function findMedianSortedArrayHelper (line 31) | double findMedianSortedArrayHelper(int A[], int m, int B[], int n, int l... function findMedianSortedArrays (line 94) | double findMedianSortedArrays(int A[], int m, int B[], int n) { function main (line 114) | int main() FILE: algorithms/cpp/mergeIntervals/mergeIntervals.cpp type Interval (line 21) | struct Interval { method Interval (line 24) | Interval() : start(0), end(0) {} method Interval (line 25) | Interval(int s, int e) : start(s), end(e) {} function compare (line 29) | bool compare(const Interval& lhs, const Interval& rhs){ function merge (line 33) | vector merge(vector &intervals) { function main (line 55) | int main(int argc, char**argv) FILE: algorithms/cpp/mergeKSortedLists/mergeKSortedLists.cpp type ListNode (line 20) | struct ListNode { method ListNode (line 23) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 30) | ListNode *mergeKLists(vector &lists) { method ListNode (line 23) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 53) | ListNode *mergeTwoLists(ListNode* head1, ListNode* head2){ method ListNode (line 23) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 68) | ListNode *mergeTwoLists01(ListNode* head1, ListNode* head2){ method ListNode (line 23) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 100) | ListNode *mergeTwoLists02(ListNode* head1, ListNode* head2) { method ListNode (line 23) | ListNode(int x) : val(x), next(NULL) {} function TakeOutNode (line 125) | void TakeOutNode(ListNode*& head, ListNode*& tail, ListNode*& p){ function printList (line 137) | void printList(ListNode* h) function ListNode (line 146) | ListNode* createList(int a[], int n) method ListNode (line 23) | ListNode(int x) : val(x), next(NULL) {} function main (line 161) | int main(int argc, char**argv) FILE: algorithms/cpp/mergeStringsAlternately/MergeStringsAlternately.cpp class Solution (line 46) | class Solution { method string (line 48) | string mergeAlternately(string word1, string word2) { FILE: algorithms/cpp/mergeTwoSortedArray/mergeTwoSortedArray.cpp function merge (line 18) | void merge(int A[], int m, int B[], int n) { function printArray (line 42) | void printArray(int A[], int n) { function main (line 50) | int main() FILE: algorithms/cpp/mergeTwoSortedList/mergeTwoSortedList.cpp class Solution (line 20) | class Solution { method Solution (line 22) | Solution(){ method ListNode (line 25) | ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) { method ListNode (line 37) | ListNode *mergeTwoLists01(ListNode* head1, ListNode* head2){ method ListNode (line 64) | ListNode *mergeTwoLists02(ListNode *l1, ListNode *l2) { method ListNode (line 92) | ListNode* mergeTheRest(ListNode* l, ListNode*head, ListNode* tail){ method ListNode (line 109) | ListNode *mergeTwoLists03(ListNode *l1, ListNode *l2) { FILE: algorithms/cpp/minCostClimbingStairs/MinCostClimbingStairs.cpp class Solution (line 32) | class Solution { method minCostClimbingStairs (line 34) | int minCostClimbingStairs(vector& cost) { method minCostClimbingStairs01 (line 38) | int minCostClimbingStairs01(vector& cost) { method minCostClimbingStairs02 (line 48) | int minCostClimbingStairs02(vector& cost) { FILE: algorithms/cpp/minStack/minStack.cpp class Stack (line 26) | class Stack { method Stack (line 32) | Stack():_capacity(1),_top(-1){ method push (line 40) | void push(T x){ method T (line 52) | T pop() { method T (line 56) | T& top(bool pop=false) { method empty (line 67) | bool empty(){ method size (line 70) | int size() { method clear (line 73) | void clear(){ class MinStack (line 99) | class MinStack { type minData (line 103) | struct minData{ method minData (line 106) | minData():min(0), cnt(0) {} method minData (line 107) | minData(int m, int c):min(m),cnt(c){} method push (line 115) | void push(int x) { method pop (line 134) | void pop() { method top (line 150) | int top() { method getMin (line 154) | int getMin() { method clear (line 157) | void clear() { function main (line 164) | int main() FILE: algorithms/cpp/miniParser/MiniParser.cpp class Solution (line 69) | class Solution { method NestedInteger (line 71) | NestedInteger deserialize(string s) { method NestedInteger (line 79) | NestedInteger helper(string& s, int& pos) { method NestedInteger (line 97) | NestedInteger atoni(string& s, int& pos) { method isnum (line 113) | bool isnum(char& c) { FILE: algorithms/cpp/minimizeMaximumPairSumInArray/MinimizeMaximumPairSumInArray.cpp class Solution (line 42) | class Solution { method minPairSum (line 44) | int minPairSum(vector& nums) { FILE: algorithms/cpp/minimumASCIIDeleteSumForTwoStrings/MinimumAsciiDeleteSumForTwoStrings.cpp class Solution (line 32) | class Solution { method minimumDeleteSum (line 34) | int minimumDeleteSum(string s1, string s2) { FILE: algorithms/cpp/minimumAbsoluteSumDifference/MinimumAbsoluteSumDifference.cpp class Solution (line 54) | class Solution { method minAbsoluteSumDiff (line 56) | int minAbsoluteSumDiff(vector& nums1, vector& nums2) { FILE: algorithms/cpp/minimumAdjacentSwapsToReachTheKthSmallestNumber/MinimumAdjacentSwapsToReachTheKthSmallestNumber.cpp class Solution (line 57) | class Solution { method nextPermutation (line 61) | void nextPermutation(string& num) { method reverse (line 76) | void reverse(string& num, int start) { method getMinSwaps (line 87) | int getMinSwaps(string num, int k) { FILE: algorithms/cpp/minimumChangesToMakeAlternatingBinaryString/MinimumChangesToMakeAlternatingBinaryString.cpp class Solution (line 39) | class Solution { method minOperations (line 41) | int minOperations(string s) { FILE: algorithms/cpp/minimumCostForTickets/MinimumCostForTickets.cpp class Solution (line 53) | class Solution { method min (line 55) | int min(int x, int y){ method min (line 58) | int min(int x, int y, int z) { method mincostTickets (line 62) | int mincostTickets(vector& days, vector& costs) { FILE: algorithms/cpp/minimumDegreeOfAConnectedTrioInAGraph/MinimumDegreeOfAConnectedTrioInAGraph.cpp class Solution (line 45) | class Solution { method has_edge (line 50) | bool has_edge(int x, int y) { method node_edges (line 54) | int node_edges(int x){ method degree (line 58) | int degree(int x, int y, int z) { method minTrioDegree (line 66) | int minTrioDegree(int n, vector>& edges) { FILE: algorithms/cpp/minimumDepthOfBinaryTree/minimumDepthOfBinaryTree.cpp class Solution (line 23) | class Solution { method minDepth (line 25) | int minDepth(TreeNode *root) { FILE: algorithms/cpp/minimumDistanceToTheTargetElement/MinimumDistanceToTheTargetElement.cpp class Solution (line 41) | class Solution { method getMinDistance (line 43) | int getMinDistance(vector& nums, int target, int start) { FILE: algorithms/cpp/minimumElementsToAddToFormAGivenSum/MinimumElementsToAddToFormAGivenSum.cpp class Solution (line 34) | class Solution { method sum (line 36) | long sum(vector& nums) { method minElements (line 43) | int minElements(vector& nums, int limit, int goal) { FILE: algorithms/cpp/minimumFallingPathSum/MinimumFallingPathSum.cpp class Solution (line 31) | class Solution { method min (line 33) | int min(int x, int y) { method min (line 36) | int min( int x, int y, int z) { method minFallingPathSum (line 40) | int minFallingPathSum(vector>& A) { FILE: algorithms/cpp/minimumHeightTrees/MinimumHeightTrees.cpp class Solution (line 64) | class Solution { method findMinHeightTrees (line 66) | vector findMinHeightTrees(int n, vector>& edges) { FILE: algorithms/cpp/minimumInsertionsToBalanceAParenthesesString/MinimumInsertionsToBalanceAParenthesesString.cpp class Solution (line 60) | class Solution { method minInsertions (line 62) | int minInsertions(string s) { FILE: algorithms/cpp/minimumIntervalToIncludeEachQuery/MinimumIntervalToIncludeEachQuery.cpp class Solution (line 47) | class Solution { method minInterval (line 49) | vector minInterval(vector>& intervals, vector& q... FILE: algorithms/cpp/minimumLengthOfStringAfterDeletingSimilarEnds/MinimumLengthOfStringAfterDeletingSimilarEnds.cpp class Solution (line 49) | class Solution { method minimumLength (line 51) | int minimumLength(string s) { FILE: algorithms/cpp/minimumLimitOfBallsInABag/MinimumLimitOfBallsInABag.cpp class Solution (line 53) | class Solution { method minimumSize (line 55) | int minimumSize(vector& nums, int maxOperations) { FILE: algorithms/cpp/minimumNumberOfOperationsToMoveAllBallsToEachBox/MinimumNumberOfOperationsToMoveAllBallsToEachBox.cpp class Solution (line 40) | class Solution { method minOperations (line 43) | vector minOperations(string boxes) { method minOperations01 (line 50) | void minOperations01(string& boxes, vector& result ) { method minOperations02 (line 64) | void minOperations02(string& boxes, vector& result ) { FILE: algorithms/cpp/minimumNumberOfOperationsToReinitializeAPermutation/MinimumNumberOfOperationsToReinitializeAPermutation.cpp class Solution (line 48) | class Solution { method check (line 50) | bool check(vector& a) { method reinitializePermutation (line 57) | int reinitializePermutation(int n) { FILE: algorithms/cpp/minimumNumberOfPeopleToTeach/MinimumNumberOfPeopleToTeach.cpp class Solution (line 47) | class Solution { method hasLang (line 50) | bool hasLang(vector& langlist, int lang){ method canComm (line 57) | bool canComm(int u, int v, int n, vector>& langs) { method minimumTeachings (line 64) | int minimumTeachings(int n, vector>& languages, vector& nums) { FILE: algorithms/cpp/minimumPathSum/minimumPathSum.cpp function minPathSum (line 30) | int minPathSum(vector>& grid) { function main (line 42) | int main() FILE: algorithms/cpp/minimumSidewayJumps/MinimumSidewayJumps.cpp class Solution (line 56) | class Solution { method min (line 58) | int min (int x, int y) { method min (line 61) | int min(int x, int y, int z) { method print (line 64) | void print(vector>& matrix) { method minSideJumps (line 80) | int minSideJumps(vector& obstacles) { FILE: algorithms/cpp/minimumSizeSubarraySum/MinimumSizeSubarraySum.cpp class Solution (line 24) | class Solution { method minSubArrayLen (line 26) | int minSubArrayLen(int s, vector& nums) { FILE: algorithms/cpp/minimumSpeedToArriveOnTime/MinimumSpeedToArriveOnTime.cpp class Solution (line 62) | class Solution { method verify (line 64) | bool verify(vector& dist, double hour, int speed) { method minSpeedOnTime (line 74) | int minSpeedOnTime(vector& dist, double hour) { FILE: algorithms/cpp/minimumWindowSubstring/minimumWindowSubstring.cpp function string (line 34) | string minWindow(string s, string t) { function main (line 110) | int main(int argc, char**argv) FILE: algorithms/cpp/mirrorReflection/MirrorReflection.cpp class Solution (line 58) | class Solution { method greatestCommonDivisor (line 61) | int greatestCommonDivisor (int a, int b) { method leastCommonMultiple (line 66) | int leastCommonMultiple(int a, int b) { method mirrorReflection (line 70) | int mirrorReflection(int p, int q) { FILE: algorithms/cpp/missingNumber/MissingNumber.cpp class Solution (line 22) | class Solution { method missingNumber01 (line 29) | int missingNumber01(vector& nums) { method missingNumber02 (line 41) | int missingNumber02(vector& nums) { method missingNumber (line 49) | int missingNumber(vector& nums) { FILE: algorithms/cpp/missingRanges/missingRanges.cpp function string (line 25) | string& makeRange(int lo, int hi){ function findMissingRanges (line 39) | vector findMissingRanges(int A[], int n, int lower, int upper) { function printVector (line 67) | void printVector(vector v){ function string2Array (line 77) | vector string2Array(string s){ function main (line 94) | int main(int argc, char**argv) FILE: algorithms/cpp/mostCommonWord/MostCommonWord.cpp class Solution (line 50) | class Solution { method isLetter (line 52) | bool isLetter(char c) { method string (line 56) | string mostCommonWord(string paragraph, vector& banned) { FILE: algorithms/cpp/moveZeroes/moveZeroes.cpp class Solution (line 24) | class Solution { method moveZeroes (line 40) | void moveZeroes(vector& nums) { method moveZeroes (line 70) | void moveZeroes(vector& nums) { FILE: algorithms/cpp/multiplyStrings/multiplyStrings.cpp function string (line 17) | string multiply(string& num, char ch){ function string (line 33) | string strPlus(string& num1, string& num2) { function string (line 54) | string multiply(string num1, string num2) { class Solution (line 78) | class Solution { method string (line 81) | string strPlus(string& num1, string& num2) { method string (line 108) | string multiply(string num1, string num2) { function main (line 137) | int main(int argc, char**argv) FILE: algorithms/cpp/nQueens/nQueuens.II.cpp function totalNQueens (line 25) | int totalNQueens(int n) { function solveNQueensRecursive (line 35) | void solveNQueensRecursive(int n, int currentRow, vector& solution,... function isValid (line 50) | bool isValid(int attemptedColumn, int attemptedRow, vector &queenIn... function main (line 63) | int main(int argc, char** argv) FILE: algorithms/cpp/nQueens/nQueuens.cpp function solveNQueens (line 44) | vector< vector > solveNQueens(int n) { function solveNQueensRecursive (line 56) | void solveNQueensRecursive(int n, int currentRow, vector& solution,... function isValid (line 84) | bool isValid(int attemptedColumn, int attemptedRow, vector &queenIn... function printMatrix (line 99) | void printMatrix(vector< vector >& matrix ){ function main (line 109) | int main(int argc, char** argv) FILE: algorithms/cpp/nRepeatedElementInSize2NArray/N-Repeated-Element-in-Size-2N-Array.cpp class Solution (line 33) | class Solution { method repeatedNTimes (line 35) | int repeatedNTimes(vector& A) { FILE: algorithms/cpp/nextPermutation/nextPermutation.cpp function nextPermutation (line 73) | void nextPermutation(vector &num) { function printVector (line 103) | void printVector(vector &num) { function isBeginVector (line 109) | bool isBeginVector(vector &num) { function main (line 118) | int main(int argc, char** argv) FILE: algorithms/cpp/nimGame/nimGame.cpp class Solution (line 67) | class Solution { method canWinNim (line 69) | bool canWinNim(int n) { FILE: algorithms/cpp/nthDigit/NthDigit.cpp class Solution (line 38) | class Solution { method findNthDigit (line 40) | int findNthDigit(int n) { FILE: algorithms/cpp/numberOf1Bits/numberOf1Bits.cpp class Solution (line 17) | class Solution { method hammingWeight (line 19) | int hammingWeight(uint32_t n) { FILE: algorithms/cpp/numberOfDifferentIntegersInAString/NumberOfDifferentIntegersInAString.cpp class Solution (line 43) | class Solution { method isNumber (line 45) | bool isNumber(char ch) { method numDifferentIntegers (line 50) | int numDifferentIntegers(string word) { FILE: algorithms/cpp/numberOfDifferentSubsequencesGcds/NumberOfDifferentSubsequencesGcds.cpp class Solution (line 39) | class Solution { method gcd (line 43) | int gcd(int a, int b) { method countDifferentSubsequenceGCDs (line 53) | int countDifferentSubsequenceGCDs(vector& nums) { FILE: algorithms/cpp/numberOfDigitOne/NumberOfDigitOne.cpp class Solution (line 51) | class Solution { method countDigitOne (line 54) | int countDigitOne(int n) { FILE: algorithms/cpp/numberOfGoodWaysToSplitAString/NumberOfGoodWaysToSplitAString.cpp class Solution (line 47) | class Solution { method numSplits (line 49) | int numSplits(string s) { FILE: algorithms/cpp/numberOfIslands/NumberOfIslands.cpp function mark (line 33) | void mark(vector >& grid, int r, int c){ function numIslands (line 48) | int numIslands(vector >& grid) { function initGrid (line 61) | void initGrid( string g[], int len, vector >& grid ) function main (line 68) | int main(void) FILE: algorithms/cpp/numberOfOrdersInTheBacklog/NumberOfOrdersInTheBacklog.cpp class Order (line 76) | class Order { type COMP (line 82) | enum COMP { GREATER, LESS } class OrderComp (line 85) | class OrderComp { class Solution (line 96) | class Solution { method processOrder (line 99) | void processOrder(T1& q1, T2& q2, COMP op, int price, int amount, stri... method countQ (line 128) | void countQ(T& q, int& amount){ method getNumberOfBacklogOrders (line 135) | int getNumberOfBacklogOrders(vector>& orders) { FILE: algorithms/cpp/numberOfRecentCalls/NumberOfRecentCalls.cpp class RecentCounter (line 30) | class RecentCounter { method RecentCounter (line 32) | RecentCounter() { method ping (line 36) | int ping(int t) { method binary_search (line 42) | int binary_search(int x) { FILE: algorithms/cpp/numberOfRectanglesThatCanFormTheLargestSquare/NumberOfRectanglesThatCanFormTheLargestSquare.cpp class Solution (line 38) | class Solution { method countGoodRectangles (line 40) | int countGoodRectangles(vector>& rectangles) { method countGoodRectangles1 (line 45) | int countGoodRectangles1(vector>& rectangles) { method countGoodRectangles2 (line 59) | int countGoodRectangles2(vector>& rectangles) { FILE: algorithms/cpp/numberOfRestrictedPathsFromFirstToLastNode/NumberOfRestrictedPathsFromFirstToLastNode.cpp class Solution (line 51) | class Solution { method printVector (line 52) | void printVector(vector& v) { method countRestrictedPaths (line 60) | int countRestrictedPaths(int n, vector>& edges) { FILE: algorithms/cpp/numberOfStudentsUnableToEatLunch/NumberOfStudentsUnableToEatLunch.cpp class Solution (line 60) | class Solution { method countStudents (line 62) | int countStudents(vector& students, vector& sandwiches) { FILE: algorithms/cpp/numberOfSubArraysWithOddSum/NumberOfSubArraysWithOddSum.cpp class Solution (line 48) | class Solution { method numOfSubarrays (line 50) | int numOfSubarrays(vector& arr) { FILE: algorithms/cpp/numberOfSubstringsWithOnly1s/NumberOfSubstringsWithOnly1s.cpp class Solution (line 45) | class Solution { method numSub (line 53) | int numSub(string s) { FILE: algorithms/cpp/oddEvenLinkedList/OddEvenLinkedList.cpp class Solution (line 34) | class Solution { method ListNode (line 36) | ListNode* oddEvenList(ListNode* head) { FILE: algorithms/cpp/oneEditDistance/oneEditDistance.cpp function isOneEditDistance (line 30) | bool isOneEditDistance(string s, string t) { function main (line 77) | int main(int argc, char** argv) FILE: algorithms/cpp/palindromeLinkedList/PalindromeLinkedList.cpp class Solution (line 22) | class Solution { method ListNode (line 24) | ListNode* findMiddle(ListNode* head) { method ListNode (line 33) | ListNode* reverseLink(ListNode* head) { method isPalindrome (line 45) | bool isPalindrome(ListNode* head) { FILE: algorithms/cpp/palindromeNumber/palindromeNumber.cpp class Solution (line 26) | class Solution { method isPalindrome (line 29) | bool isPalindrome(int x) { method isPalindrome1 (line 34) | bool isPalindrome1(int x) { method isPalindrome2 (line 56) | bool isPalindrome2(int x) { method reverse (line 61) | int reverse(int x) { function main (line 79) | int main() FILE: algorithms/cpp/palindromePairs/PalindromePairs.cpp class Solution (line 26) | class Solution { method isPalindrome (line 28) | bool isPalindrome(string& str) { method palindromePairs (line 35) | vector> palindromePairs(vector& words) { FILE: algorithms/cpp/palindromePartitioning/palindromePartitioning.II.cpp function minCut (line 28) | int minCut(string s) { function minCut_DP (line 85) | int minCut_DP(string& s) { function minCutHelper (line 129) | int minCutHelper(string &s, int steps, int& minSteps ) { function minCutHelper (line 178) | void minCutHelper(string &s, int start, int steps, int& min ) { function isPalindrome (line 197) | bool isPalindrome(string &s, int start, int end) { function main (line 214) | int main(int argc, char** argv) FILE: algorithms/cpp/palindromePartitioning/palindromePartitioning.cpp function isPalindrome (line 29) | bool isPalindrome(string &s, int start, int end) { function partitionHelper (line 69) | void partitionHelper(string &s, int start, vector &output, vecto... function partition (line 87) | vector< vector > partition(string s) { function printMatrix (line 98) | void printMatrix(vector< vector > &matrix) function main (line 111) | int main(int argc, char** argv) FILE: algorithms/cpp/palindromicSubstrings/PalindromicSubstrings.cpp class Solution (line 30) | class Solution { method countSubstrings (line 32) | int countSubstrings(string s) { FILE: algorithms/cpp/partitionEqualSubsetSum/PartitionEqualSubsetSum.cpp class Solution (line 38) | class Solution { method canPartitionRecrusion (line 41) | bool canPartitionRecrusion(vector& nums, int half, int index) { method canPartition (line 52) | bool canPartition(vector& nums) { FILE: algorithms/cpp/partitionList/partitionList.cpp type ListNode (line 21) | struct ListNode { method ListNode (line 24) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 27) | ListNode *partition(ListNode *head, int x) { method ListNode (line 24) | ListNode(int x) : val(x), next(NULL) {} function printList (line 53) | void printList(ListNode* h) function ListNode (line 62) | ListNode* createList(int a[], int n) method ListNode (line 24) | ListNode(int x) : val(x), next(NULL) {} function main (line 76) | int main() FILE: algorithms/cpp/pascalTriangle/pascalTriangle.II.cpp function getRow (line 23) | vector getRow(int rowIndex) { function printVector (line 36) | void printVector( vector pt) function main (line 45) | int main(int argc, char** argv) FILE: algorithms/cpp/pascalTriangle/pascalTriangle.cpp function generate (line 28) | vector > generate(int numRows) function printTriangle (line 47) | void printTriangle(vector< vector > pt) function main (line 70) | int main(int argc, char** argv) FILE: algorithms/cpp/patchingArray/PatchingArray.cpp class Solution (line 35) | class Solution { method minPatches (line 37) | int minPatches(vector& nums, int n) { method minPatches_01 (line 66) | int minPatches_01(vector& nums, int n) { method minPatches_02 (line 100) | int minPatches_02(vector& nums, int n) { FILE: algorithms/cpp/pathSum/pathSum.II.cpp class Solution (line 39) | class Solution { method pathSum (line 41) | vector > pathSum(TreeNode *root, int sum) { method generatePathSum (line 48) | void generatePathSum(TreeNode *root, int sum, int s, vector v, ve... FILE: algorithms/cpp/pathSum/pathSum.cpp class Solution (line 36) | class Solution { method Solution (line 38) | Solution(){ method hasPathSum (line 41) | bool hasPathSum(TreeNode *root, int sum) { method hasPathSum3 (line 47) | bool hasPathSum3(TreeNode* root, int sum, int s) { method hasPathSum1 (line 54) | bool hasPathSum1(TreeNode *root, int sum) { method hasPathSum2 (line 79) | bool hasPathSum2(TreeNode *root, int sum) { FILE: algorithms/cpp/peakIndexInAMountainArray/PeakIndexInAMountainArray.cpp class Solution (line 42) | class Solution { method peakIndexInMountainArray (line 44) | int peakIndexInMountainArray(vector& A) { FILE: algorithms/cpp/peekingIterator/PeekingIterator.cpp class Iterator (line 37) | class Iterator { type Data (line 38) | struct Data class PeekingIterator (line 51) | class PeekingIterator : public Iterator { method takeNext (line 56) | void takeNext() { method PeekingIterator (line 63) | PeekingIterator(const vector& nums) : Iterator(nums) { method peek (line 71) | int peek() { method next (line 77) | int next() { method hasNext (line 84) | bool hasNext() const { FILE: algorithms/cpp/perfectRectangle/PerfectRectangle.cpp class Solution (line 61) | class Solution { method isRectangleCover (line 63) | bool isRectangleCover(vector>& rectangles) { FILE: algorithms/cpp/perfectSquares/PerfectSquares.cpp class Solution (line 19) | class Solution { method numSquares (line 22) | int numSquares(int n) { method numSquares_dp (line 62) | int numSquares_dp(int n) { method numSquares_dp_opt (line 81) | int numSquares_dp_opt(int n) { FILE: algorithms/cpp/permutationSequence/permutationSequence.cpp function string (line 46) | string getPermutation(int n, int k) { function string (line 83) | string getPermutation_0(int n, int k) { function string (line 116) | string getPermutation_1(int n, int k) { function nextPermutation (line 137) | void nextPermutation(vector& num) { function main (line 158) | int main(int argc, char**argv) FILE: algorithms/cpp/permutations/permutations.II.cpp function permute (line 27) | vector > permute(vector &num) { function printVector (line 60) | void printVector( vector& pt) function main (line 70) | int main(int argc, char** argv) FILE: algorithms/cpp/permutations/permutations.cpp function permute (line 62) | vector > permute(vector &num) { function main (line 89) | int main(int argc, char** argv) FILE: algorithms/cpp/plusOne/plusOne.cpp function plusOne (line 17) | vector plusOne(vector &digits) { function printVector (line 34) | void printVector(vector& v) function main (line 44) | int main() FILE: algorithms/cpp/populatingNextRightPointersInEachNode/populatingNextRightPointersInEachNode.II.cpp type TreeLinkNode (line 41) | struct TreeLinkNode { method TreeLinkNode (line 44) | TreeLinkNode(int x) : val(x), left(NULL), right(NULL), next(NULL) {} method TreeLinkNode (line 45) | TreeLinkNode() : val(0), left(NULL), right(NULL), next(NULL) {} function connect (line 47) | void connect(TreeLinkNode *root) { function connect1 (line 77) | void connect1(TreeLinkNode *root) { function connect3 (line 126) | void connect3(TreeLinkNode *root) { function connect4 (line 157) | void connect4(TreeLinkNode *root) { function printTree (line 191) | void printTree(TreeLinkNode *root){ function main (line 207) | int main() FILE: algorithms/cpp/populatingNextRightPointersInEachNode/populatingNextRightPointersInEachNode.cpp type TreeLinkNode (line 53) | struct TreeLinkNode { method TreeLinkNode (line 56) | TreeLinkNode(int x) : val(x), left(NULL), right(NULL), next(NULL) {} method TreeLinkNode (line 57) | TreeLinkNode() : val(0), left(NULL), right(NULL), next(NULL) {} function connect (line 61) | void connect(TreeLinkNode *root) { function connect1 (line 77) | void connect1(TreeLinkNode *root) { function connect2 (line 107) | void connect2(TreeLinkNode *root) { function connect3 (line 134) | void connect3(TreeLinkNode *root) { function connect4 (line 165) | void connect4(TreeLinkNode *root) { function printTree (line 199) | void printTree(TreeLinkNode *root){ function main (line 214) | int main() FILE: algorithms/cpp/pow/pow.cpp function pow (line 39) | double pow(double x, int n) { function main (line 60) | int main(int argc, char** argv){ FILE: algorithms/cpp/powerOfFour/PowerOfFour.cpp class Solution (line 21) | class Solution { method isPowerOfFour (line 23) | bool isPowerOfFour(int num) { FILE: algorithms/cpp/powerOfThree/PowerOfThree.cpp class Solution (line 17) | class Solution { method isPowerOfThree (line 21) | bool isPowerOfThree(int n) { method isPowerOfThree03 (line 29) | bool isPowerOfThree03(int n) { method isPowerOfThree02 (line 33) | bool isPowerOfThree02(int n) { method init (line 37) | void init(unordered_map& power ){ method isPowerOfThree01 (line 47) | bool isPowerOfThree01(int n) { method isPowerOfThree_loop (line 53) | bool isPowerOfThree_loop(int n) { method isPowerOfThree_recursive (line 61) | bool isPowerOfThree_recursive(int n) { FILE: algorithms/cpp/powerOfTwo/PowerOfTwo.cpp class Solution (line 17) | class Solution { method isPowerOfTwo01 (line 21) | bool isPowerOfTwo01(int n) { method isPowerOfTwo02 (line 34) | bool isPowerOfTwo02(int n) { method isPowerOfTwo (line 38) | bool isPowerOfTwo(int n) { FILE: algorithms/cpp/processTasksUsingServers/ProcessTasksUsingServers.cpp class Solution (line 62) | class Solution { method print (line 65) | void print(T q) { method assignTasks (line 76) | vector assignTasks(vector& servers, vector& tasks) { FILE: algorithms/cpp/productOfArrayExceptSelf/ProductOfArrayExceptSelf.cpp class Solution (line 20) | class Solution { method productExceptSelf (line 22) | vector productExceptSelf(vector& nums) { FILE: algorithms/cpp/queriesOnNumberOfPointsInsideACircle/QueriesOnNumberOfPointsInsideACircle.cpp class Solution (line 46) | class Solution { method inCircle (line 49) | bool inCircle( vector& point, vector& circle ) { method countPoints (line 61) | vector countPoints(vector>& points, vector> reconstructQueue(vector>& people) { FILE: algorithms/cpp/randomPickIndex/RandomPickIndex.cpp class Solution (line 28) | class Solution { method Solution (line 32) | Solution(vector nums) { method pick (line 37) | int pick(int target) { FILE: algorithms/cpp/randomPointInNonOverlappingRectangles/randomPointInNonOverlappingRectangles.cpp class Solution (line 43) | class Solution { method Solution (line 49) | Solution(vector>& rects) { method pick (line 57) | vector pick() { FILE: algorithms/cpp/rangeSumQuery-Immutable/rangeSumQuery-Immutable.cpp class NumArray (line 22) | class NumArray { method NumArray (line 38) | NumArray(vector &nums): size(nums.size()), sums(size+1, 0) { method sumRange (line 43) | int sumRange(int i, int j) { FILE: algorithms/cpp/rangeSumQuery-Immutable/rangeSumQuery-Mutable/RangeSumQueryMutable.cpp class NumArray (line 34) | class NumArray { method NumArray (line 40) | NumArray(vector &nums) { method update (line 49) | void update(int i, int val) { method sumRange (line 57) | int sumRange(int i, int j) { method sumRange (line 61) | int sumRange(int i) { FILE: algorithms/cpp/rangeSumQuery2D-Immutable/RangeSumQuery2dImmutable.cpp class NumMatrix (line 78) | class NumMatrix { method NumMatrix (line 83) | NumMatrix(vector> &matrix) { method sumRegion (line 94) | int sumRegion(int row1, int col1, int row2, int col2) { FILE: algorithms/cpp/ransomNote/RansomNote.cpp class Solution (line 24) | class Solution { method canConstruct (line 26) | bool canConstruct(string ransomNote, string magazine) { FILE: algorithms/cpp/readNCharactersGivenRead4/readNCharactersGivenRead4.II.cpp function read4 (line 31) | int read4(char *buf) { class RingBuffer (line 42) | class RingBuffer { method RingBuffer (line 45) | RingBuffer(int cap=4): _capacity(cap) { method read (line 55) | int read(char* buf, int n){ method write (line 69) | int write(char* buf, int n) { class Solution (line 94) | class Solution { method read (line 101) | int read(char *buf, int n) { method read1 (line 120) | int read1(char *buf, int n) { function main (line 148) | int main() FILE: algorithms/cpp/readNCharactersGivenRead4/readNCharactersGivenRead4.cpp class Solution (line 24) | class Solution { method read (line 31) | int read(char *buf, int n) { method read1 (line 40) | int read1(char *buf, int n) { method read2 (line 54) | int read2(char *buf, int n) { FILE: algorithms/cpp/reconstructItinerary/ReconstructItinerary.cpp class Solution (line 56) | class Solution { method travel (line 59) | void travel(string& start, unordered_map>& ma... method findItinerary (line 68) | vector findItinerary(vector> tickets) { FILE: algorithms/cpp/recoverATreeFromPreorderTraversal/recoverATreeFromPreorderTraversal.cpp class Solution (line 49) | class Solution { method TreeNode (line 52) | TreeNode* recoverFromPreorder(string S) { FILE: algorithms/cpp/recoverBinarySearchTree/recoverBinarySearchTree.cpp class Solution (line 62) | class Solution { method recoverTreeHelper (line 64) | void recoverTreeHelper(TreeNode *root) { method recoverTree (line 81) | void recoverTree(TreeNode *root) { FILE: algorithms/cpp/rectangleArea/RectangleArea.cpp type leetcode (line 40) | namespace leetcode class Point (line 42) | class Point { method Point (line 44) | Point(int _x, int _y):x(_x),y(_y) {} class Rectangle (line 48) | class Rectangle { method Rectangle (line 50) | Rectangle(int a, int b, int c, int d):topLeft(a,d), bottomRight(c,b)... method Area (line 51) | int Area(){ method InclusiveArea (line 55) | int InclusiveArea (Rectangle &r){ method OverlappedArea (line 70) | int OverlappedArea(Rectangle &r) { function computeArea (line 82) | int computeArea(int A, int B, int C, int D, int E, int F, int G, int H) { function main (line 93) | int main() FILE: algorithms/cpp/reformatPhoneNumber/ReformatPhoneNumber.cpp class Solution (line 70) | class Solution { method string (line 72) | string reformatNumber(string number) { FILE: algorithms/cpp/regularExpressionMatching/regularExpressionMatching.cpp function isMatch (line 36) | bool isMatch(const char *s, const char *p) { function main (line 60) | int main(int argc, char** argv) FILE: algorithms/cpp/removeDuplicateLetters/RemoveDuplicateLetters.cpp class Solution (line 24) | class Solution { method string (line 26) | string removeDuplicateLetters(string s) { FILE: algorithms/cpp/removeDuplicatesFromSortedArray/removeDuplicatesFromSortedArray.II.cpp function removeDuplicates (line 21) | int removeDuplicates(int A[], int n) { function printfArray (line 40) | void printfArray(int A[], int n) { function testSuite (line 49) | void testSuite(int a[], int n){ function main (line 57) | int main() FILE: algorithms/cpp/removeDuplicatesFromSortedArray/removeDuplicatesFromSortedArray.cpp class Solution (line 20) | class Solution { method removeDuplicates (line 22) | int removeDuplicates(int A[], int n) { FILE: algorithms/cpp/removeDuplicatesFromSortedList/removeDuplicatesFromSortedList.II.cpp type ListNode (line 19) | struct ListNode { method ListNode (line 22) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 25) | ListNode *deleteDuplicates(ListNode *head) { method ListNode (line 22) | ListNode(int x) : val(x), next(NULL) {} function printList (line 53) | void printList(ListNode* h) function ListNode (line 62) | ListNode* createList(int a[], int n) method ListNode (line 22) | ListNode(int x) : val(x), next(NULL) {} function main (line 77) | int main() FILE: algorithms/cpp/removeDuplicatesFromSortedList/removeDuplicatesFromSortedList.cpp type ListNode (line 18) | struct ListNode { method ListNode (line 21) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 24) | ListNode *deleteDuplicates(ListNode *head) { method ListNode (line 21) | ListNode(int x) : val(x), next(NULL) {} function printList (line 36) | void printList(ListNode* h) function ListNode (line 45) | ListNode* createList(int a[], int n) method ListNode (line 21) | ListNode(int x) : val(x), next(NULL) {} function main (line 60) | int main() FILE: algorithms/cpp/removeElement/removeElement.cpp class Solution (line 14) | class Solution { method removeElement (line 16) | int removeElement(vector& nums, int val) { method removeElement (line 26) | int removeElement(int A[], int n, int elem) { FILE: algorithms/cpp/removeInvalidParentheses/RemoveInvalidParentheses.cpp function removeInvalidParenthesesHelper (line 30) | void removeInvalidParenthesesHelper(string& s, int index, int pair, function removeInvalidParentheses (line 74) | vector removeInvalidParentheses(string s) { function printVector (line 96) | void printVector(vector result) { function main (line 103) | int main(int argc, char** argv) { FILE: algorithms/cpp/removeKDigits/RemoveKDigits.cpp class Solution (line 37) | class Solution { method string (line 39) | string removeKdigits_pick(string& num, int k) { method string (line 64) | string removeKdigits_remove(string& num, int k) { method string (line 99) | string removeKdigits(string num, int k) { FILE: algorithms/cpp/removeLinkedListElements/RemoveLinkedListElements.cpp class Solution (line 25) | class Solution { method ListNode (line 27) | ListNode* removeElements(ListNode* head, int val) { FILE: algorithms/cpp/removeNthNodeFromEndOfList/removeNthNodeFromEndOfList.cpp class Solution (line 30) | class Solution { method ListNode (line 32) | ListNode *removeNthFromEnd(ListNode *head, int n) { FILE: algorithms/cpp/reorderList/reorderList.cpp class ListNode (line 23) | class ListNode { method ListNode (line 27) | ListNode():val(0), next(NULL) {} method ListNode (line 28) | ListNode(int x) : val(x), next(NULL) {} class Solution (line 31) | class Solution { method reorderList (line 33) | void reorderList(ListNode *head) { method ListNode (line 40) | ListNode* findMidPos(ListNode *head){ method ListNode (line 58) | ListNode* reverseList(ListNode *head){ method ListNode (line 70) | ListNode* Merge(ListNode *h1, ListNode* h2) { function printList (line 89) | void printList(ListNode *h){ function main (line 97) | int main(int argc, char** argv) FILE: algorithms/cpp/repeatedDNASequences/repeatedDNASequences.cpp function ACGT2Int (line 34) | int ACGT2Int(char ch){ function DNASeqs2Int (line 43) | int DNASeqs2Int(string &s, int begin){ function findRepeatedDnaSequences_01 (line 51) | vector findRepeatedDnaSequences_01(string s) { function findRepeatedDnaSequences_02 (line 68) | vector findRepeatedDnaSequences_02(string s) { function findRepeatedDnaSequences (line 86) | vector findRepeatedDnaSequences(string s) { function printVector (line 94) | void printVector( vector v ) { function main (line 102) | int main(int argc, char** argv) FILE: algorithms/cpp/replaceAllDigitsWithCharacters/ReplaceAllDigitsWithCharacters.cpp class Solution (line 46) | class Solution { method string (line 48) | string replaceDigits(string s) { FILE: algorithms/cpp/restoreIPAddresses/restoreIPAddresses.cpp function restoreIpAddresses (line 25) | vector restoreIpAddresses(string s) { function restoreIpAddressesHelper (line 32) | void restoreIpAddressesHelper(string& s, int start, int partNum, string ... function main (line 61) | int main(int argc, char**argv) FILE: algorithms/cpp/restoreTheArrayFromAdjacentPairs/RestoreTheArrayFromAdjacentPairs.cpp class Solution (line 48) | class Solution { method restoreArray (line 50) | vector restoreArray(vector>& adjacentPairs) { FILE: algorithms/cpp/reverseBits/reverseBits.cpp class Solution (line 23) | class Solution { method reverseBits (line 25) | uint32_t reverseBits(uint32_t n) { FILE: algorithms/cpp/reverseInteger/reverseInteger.cpp function reverse (line 36) | int reverse(int x) { function main (line 54) | int main(int argc, char**argv) FILE: algorithms/cpp/reverseLinkedList/reverseLinkedList.II.cpp type ListNode (line 25) | struct ListNode { method ListNode (line 28) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 32) | ListNode *reverseBetween(ListNode *head, int m, int n) { method ListNode (line 28) | ListNode(int x) : val(x), next(NULL) {} function printList (line 72) | void printList(ListNode* h) function ListNode (line 81) | ListNode* createList(int *a, int n) method ListNode (line 28) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 95) | ListNode* createList(int len) { method ListNode (line 28) | ListNode(int x) : val(x), next(NULL) {} function main (line 105) | int main(int argc, char** argv) FILE: algorithms/cpp/reverseLinkedList/reverseLinkedList.cpp class Solution (line 26) | class Solution { method ListNode (line 28) | ListNode* reverseList_iteratively(ListNode* head) { method ListNode (line 38) | ListNode* reverseList_recursively(ListNode* head) { method ListNode (line 46) | ListNode* reverseList(ListNode* head) { FILE: algorithms/cpp/reverseNodesInKGroup/reverseNodesInKGroup.cpp type ListNode (line 30) | struct ListNode { method ListNode (line 33) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 38) | ListNode *reverseKGroup(ListNode *head, int k) { method ListNode (line 33) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 55) | ListNode *reverseList(ListNode *&head, int k){ method ListNode (line 33) | ListNode(int x) : val(x), next(NULL) {} function printList (line 73) | void printList(ListNode* h) function ListNode (line 82) | ListNode* createList(int a[], int n) method ListNode (line 33) | ListNode(int x) : val(x), next(NULL) {} function main (line 97) | int main(int argc, char** argv) FILE: algorithms/cpp/reverseString/ReverseString.cpp class Solution (line 13) | class Solution { method string (line 15) | string reverseString(string s) { FILE: algorithms/cpp/reverseVowelsOfAString/reverseVowelsOfAString.cpp class Solution (line 19) | class Solution { method string (line 21) | string reverseVowels(string s) { method Solution (line 63) | Solution(){ method isVowels (line 77) | bool isVowels(char ch) { method string (line 80) | string reverseVowels(string s) { class Solution (line 59) | class Solution { method string (line 21) | string reverseVowels(string s) { method Solution (line 63) | Solution(){ method isVowels (line 77) | bool isVowels(char ch) { method string (line 80) | string reverseVowels(string s) { FILE: algorithms/cpp/reverseWordsInAString/reverseWordsInAString.II.cpp function swap (line 26) | void swap(char &a, char &b) { function reverse (line 31) | void reverse(string &s, int begin, int end) { function reverseWords (line 36) | void reverseWords(string &s) { function main (line 53) | int main(int argc, char** argv) FILE: algorithms/cpp/reverseWordsInAString/reverseWordsInAString.cpp function reverseWords (line 36) | void reverseWords(string &s) { function reverseWords2 (line 80) | void reverseWords2(string &s) { function reverse (line 109) | void reverse(char *b, char *e) { function reverseWords (line 117) | void reverseWords(char *s) { function test (line 140) | void test() { function main (line 154) | main() FILE: algorithms/cpp/romanToInteger/romanToInteger.cpp function romanCharToInt (line 17) | int romanCharToInt(char ch){ function romanToInt (line 44) | int romanToInt(string s) { function main (line 60) | int main(int argc, char**argv) FILE: algorithms/cpp/rotateArray/rotateArray.cpp function reverseArray (line 28) | void reverseArray(int nums[],int start, int end){ function rotate1 (line 43) | void rotate1(int nums[], int n, int k) { function rotate2 (line 60) | void rotate2(int nums[], int n, int k) { function rotate (line 85) | void rotate(int nums[], int n, int k) { function printArray (line 94) | void printArray(int nums[], int n) { function initArray (line 102) | void initArray(int nums[], int n) { function main (line 109) | int main(int argc, char**argv) { FILE: algorithms/cpp/rotateFunction/RotateFunction.cpp class Solution (line 55) | class Solution { method maxRotateFunction (line 57) | int maxRotateFunction(vector& A) { FILE: algorithms/cpp/rotateImage/rotateImage.cpp function rotate (line 20) | void rotate(vector > &matrix) { function printMatrix (line 41) | void printMatrix(vector > &matrix) function main (line 53) | int main(int argc, char** argv) FILE: algorithms/cpp/rotateList/rotateList.cpp class Solution (line 23) | class Solution { method ListNode (line 25) | ListNode *rotateRight(ListNode *head, int k) { FILE: algorithms/cpp/rotatingTheBox/RotatingTheBox.cpp class Solution (line 60) | class Solution { method rotate (line 62) | void rotate(vector>& src, vector>& dest) { method gravity (line 70) | void gravity(vector>& box) { method rotateTheBox (line 87) | vector> rotateTheBox(vector>& box) { FILE: algorithms/cpp/sameTree/sameTree.cpp class Solution (line 23) | class Solution { method Solution (line 25) | Solution(){ method isSameTree (line 28) | bool isSameTree(TreeNode *p, TreeNode *q) { method isSameTree1 (line 35) | bool isSameTree1(TreeNode *p, TreeNode *q) { method isSameTree2 (line 43) | bool isSameTree2(TreeNode *p, TreeNode *q) { FILE: algorithms/cpp/satisfiabilityOfEqualityEquations/SatisfiabilityOfEqualityEquations.cpp class Solution (line 53) | class Solution { method init (line 56) | void init() { method Solution (line 62) | Solution() { method find (line 69) | char find(char ch) { method join (line 77) | void join(char x, char y) { method equationsPossible (line 85) | bool equationsPossible(vector& equations) { FILE: algorithms/cpp/scrambleString/scrambleString.cpp function isScramble_recursion (line 66) | bool isScramble_recursion(string s1, string s2) { function isScramble_dp (line 120) | bool isScramble_dp(string s1, string s2) { function isScramble (line 158) | bool isScramble(string s1, string s2) { function main (line 170) | int main(int argc, char** argv) FILE: algorithms/cpp/search2DMatrix/search2DMatrix.II.cpp class Solution (line 34) | class Solution { method binary_search (line 37) | bool binary_search(vector &v, int target) { method searchMatrix01 (line 55) | bool searchMatrix01(vector>& matrix, int target) { method searchMatrix02 (line 68) | bool searchMatrix02(vector>& matrix, int target) { method searchMatrix021 (line 84) | bool searchMatrix021(vector>& matrix, int target) { method searchMatrix022 (line 102) | bool searchMatrix022(vector>& matrix, int target) { method searchMatrix (line 142) | bool searchMatrix(vector>& matrix, int target) { FILE: algorithms/cpp/search2DMatrix/search2DMatrix.cpp class Solution (line 27) | class Solution { method searchMatrix (line 29) | bool searchMatrix(vector>& matrix, int target) { method searchMatrix01 (line 35) | bool searchMatrix01(vector>& matrix, int target) { method searchMatrix02 (line 57) | bool searchMatrix02(vector > &matrix, int target) { method vertical_binary_search (line 69) | int vertical_binary_search(vector< vector > v, int key){ method binary_search (line 89) | int binary_search(vector v, int key) { FILE: algorithms/cpp/searchForRange/searchForRange.cpp function searchRange (line 35) | vector searchRange(int A[], int n, int target) { function binary_search (line 61) | int binary_search(int A[], int low, int high, int key){ function printVector (line 78) | void printVector( vector& pt) function main (line 88) | int main() FILE: algorithms/cpp/searchInRotatedSortedArray/searchInRotatedSortedArray.II.cpp class Solution (line 26) | class Solution { method search (line 28) | bool search(int A[], int n, int key) { FILE: algorithms/cpp/searchInRotatedSortedArray/searchInRotatedSortedArray.cpp function search (line 28) | int search(int A[], int n, int target) { function search1 (line 42) | int search1(int A[], int n, int key) { function search2 (line 82) | int search2(int A[], int n, int target) { function rotate_search (line 96) | int rotate_search(int A[], int low, int high, int key ) { function binary_search (line 123) | int binary_search(int A[], int n, int key) { function binary_search (line 140) | int binary_search(int A[], int low, int high, int key) { function rotate_array (line 157) | void rotate_array(int a[], int n, int pos){ function printArray (line 185) | void printArray(int A[], int n) { function main (line 193) | int main(int argc, char** argv) FILE: algorithms/cpp/searchInsertPosition/searchInsertPosition.cpp function binary_search (line 24) | int binary_search(int A[], int n, int key) { function searchInsert (line 40) | int searchInsert(int A[], int n, int target) { function main (line 45) | int main() FILE: algorithms/cpp/seatReservationManager/SeatReservationManager.cpp class SeatManager (line 51) | class SeatManager { method SeatManager (line 55) | SeatManager(int n) { method reserve (line 61) | int reserve() { method unreserve (line 68) | void unreserve(int seatNumber) { FILE: algorithms/cpp/secondLargestDigitInAString/SecondLargestDigitInAString.cpp class Solution (line 30) | class Solution { method secondHighest (line 32) | int secondHighest(string s) { FILE: algorithms/cpp/sentenceScreenFitting/main.cpp function main (line 20) | int main(int argc, const char * argv[]) { FILE: algorithms/cpp/sentenceScreenFitting/sentenceScreenFitting.cpp function SentenceScreenFitting (line 87) | int SentenceScreenFitting(char stc[][M], int row, int col, size_t l) FILE: algorithms/cpp/sentenceScreenFitting/sentenceScreenFitting.h function class (line 23) | class Solution { FILE: algorithms/cpp/sentenceSimilarity/SentenceSimilarity.III.cpp class Solution (line 51) | class Solution { method isWord (line 53) | bool isWord(char ch) { method isSpace (line 56) | bool isSpace(char ch) { method split (line 59) | void split(string& s, vector& words) { method print (line 70) | void print(vector& v) { method areSentencesSimilar (line 78) | bool areSentencesSimilar(string sentence1, string sentence2) { FILE: algorithms/cpp/serializeAndDeserializeBinaryTree/SerializeAndDeserializeBinaryTree.cpp type TreeNode (line 47) | struct TreeNode { method TreeNode (line 51) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} class Codec (line 55) | class Codec { method string (line 59) | string serialize(TreeNode* root) { method TreeNode (line 65) | TreeNode* deserialize(string data) { method string (line 78) | string serialize01(TreeNode* root) { method TreeNode (line 89) | TreeNode* deserialize01(string data) { method serializeHelper (line 100) | void serializeHelper(TreeNode* root, vector& v) { method TreeNode (line 111) | TreeNode* deserializeHelper(vector &v, int& index) { method split (line 124) | void split(const string &s, char delim, vector &elems) { method string (line 143) | string serialize02(TreeNode* root) { method TreeNode (line 150) | TreeNode* deserialize02(string data) { method serialize (line 156) | void serialize(TreeNode* root, ostringstream& out) { method TreeNode (line 166) | TreeNode* deserialize(istringstream& in) { function main (line 183) | int main(int argc, char** argv) FILE: algorithms/cpp/setMatrixZeroes/setMatrixZeroes.cpp class Solution (line 21) | class Solution { method Solution (line 23) | Solution(){ method setZeroes (line 26) | void setZeroes(vector > &matrix) { method setZeroes1 (line 33) | void setZeroes1(vector > &matrix) { method setZeroes2 (line 63) | void setZeroes2(vector > &matrix) { FILE: algorithms/cpp/shortEncodingOfWords/ShortEncodingOfWords.cpp class Solution (line 29) | class Solution { method comp (line 31) | static bool comp(string a,string b){ method minimumLengthEncoding (line 34) | int minimumLengthEncoding(vector& words) { FILE: algorithms/cpp/shortestPalindrome/ShortestPalindrome.cpp function isPalindrome (line 26) | bool isPalindrome(string& s, int begin, int end) { function string (line 36) | string shortestPalindrome_bf(string& s) { function string (line 52) | string shortestPalindrome_dp(string& s) { function string (line 131) | string shortestPalindrome_kmp(string& s) { function string (line 170) | string shortestPalindrome(string s) { function main (line 177) | int main(int argc, char**argv) FILE: algorithms/cpp/shuffleAnArray/ShuffleAnArray.cpp class Solution (line 26) | class Solution { method Solution (line 28) | Solution(vector nums) : _nums(nums), _solution(nums) { method reset (line 33) | vector reset() { method shuffle (line 38) | vector shuffle() { FILE: algorithms/cpp/shuffleString/ShuffleString.cpp class Solution (line 51) | class Solution { method string (line 53) | string restoreString(string s, vector& indices) { FILE: algorithms/cpp/shuffleTheArray/ShuffleTheArray.cpp class Solution (line 34) | class Solution { method shuffle (line 36) | vector shuffle(vector& nums, int n) { FILE: algorithms/cpp/signOfTheProductOfAnArray/SignOfTheProductOfAnArray.cpp class Solution (line 41) | class Solution { method arraySign (line 43) | int arraySign(vector& nums) { FILE: algorithms/cpp/simplifyPath/simplifyPath.cpp function split (line 41) | vector split(const string &s, char delim) { function string (line 48) | string simplifyPath(string path) { function main (line 78) | int main(int argc, char** argv) FILE: algorithms/cpp/singleNumber/singleNumber.II.cpp class Solution (line 15) | class Solution { method Solution (line 17) | Solution(){ method singleNumber (line 22) | int singleNumber(int A[], int n) { method singleNumber_1 (line 41) | int singleNumber_1(int A[], int n) { method singleNumber_2 (line 72) | int singleNumber_2(int A[], int n) { FILE: algorithms/cpp/singleNumber/singleNumber.III.cpp class Solution (line 67) | class Solution { method singleNumber (line 69) | vector singleNumber(vector& nums) { FILE: algorithms/cpp/singleNumber/singleNumber.cpp function singleNumber (line 19) | int singleNumber(int A[], int n) { function main (line 27) | int main() FILE: algorithms/cpp/singleThreadedCpu/SingleThreadedCpu.cpp class Solution (line 60) | class Solution { method print (line 63) | void print(T q) { method getOrder (line 72) | vector getOrder(vector>& tasks) { FILE: algorithms/cpp/slidingWindowMaximum/SlidingWindowMaximum.cpp function maxSlidingWindow02 (line 45) | vector maxSlidingWindow02(vector& nums, int k) { function maxSlidingWindow01 (line 67) | vector maxSlidingWindow01(vector& nums, int k) { function maxSlidingWindow (line 92) | vector maxSlidingWindow(vector& nums, int k) { function printVector (line 97) | void printVector( vector& v ) { function main (line 105) | int main(int argc, char** argv) FILE: algorithms/cpp/smallestStringStartingFromLeaf/SmallestStringStartingFromLeaf.cpp class Solution (line 45) | class Solution { method string (line 47) | string smallestFromLeaf(TreeNode* root) { method smallestFromLeafHelper (line 53) | void smallestFromLeafHelper(TreeNode* root, string str, string& result) { FILE: algorithms/cpp/sortArrayByParity/SortArrayByParity.II.cpp class Solution (line 28) | class Solution { method isEven (line 30) | bool isEven(int &x) { method sortArrayByParityII (line 33) | vector sortArrayByParityII(vector& A) { FILE: algorithms/cpp/sortArrayByParity/SortArrayByParity.cpp class Solution (line 25) | class Solution { method isEven (line 27) | bool isEven(int& x) { method sortArrayByParity (line 30) | vector sortArrayByParity(vector& A) { FILE: algorithms/cpp/sortColors/sortColors.cpp function swap (line 28) | void swap(int*a, int*b) function sortColors (line 35) | void sortColors(int a[], int n) { function printArray (line 51) | void printArray(int a[], int n) { function main (line 58) | int main(int argc, char** argv) FILE: algorithms/cpp/sortList/sortList.cpp type ListNode (line 16) | struct ListNode { method ListNode (line 19) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 24) | ListNode *sortList(ListNode *head) { method ListNode (line 19) | ListNode(int x) : val(x), next(NULL) {} function ListNode (line 41) | ListNode *mergeTwoLists(ListNode* head1, ListNode* head2){ method ListNode (line 19) | ListNode(int x) : val(x), next(NULL) {} function printList (line 63) | void printList(ListNode* h) function ListNode (line 72) | ListNode* createList(int a[], int n) method ListNode (line 19) | ListNode(int x) : val(x), next(NULL) {} function main (line 87) | int main(int argc, char** argv) FILE: algorithms/cpp/sortingTheSentence/SortingTheSentence.cpp class Solution (line 42) | class Solution { method string (line 44) | string sortSentence(string s) { FILE: algorithms/cpp/spiralMatrix/spiralMatrix.II.cpp function generateMatrix (line 31) | vector > generateMatrix(int n) { function generateMatrix (line 35) | vector > generateMatrix(int n, int m) { function printArray (line 69) | void printArray(vector v) function printMatrix (line 78) | void printMatrix(vector< vector > &vv) function main (line 87) | int main(int argc, char** argv) FILE: algorithms/cpp/spiralMatrix/spiralMatrix.cpp function spiralOrder (line 29) | vector spiralOrder(vector > &matrix) { function printArray (line 59) | void printArray(vector v) function printMatrix (line 68) | void printMatrix(vector< vector > &vv) function createMatrix (line 76) | vector< vector > createMatrix(int n, int m) function main (line 90) | int main(int argc, char** argv) FILE: algorithms/cpp/splitArrayLargestSum/SplitArrayLargestSum.cpp class Solution (line 29) | class Solution { method splitArray (line 36) | int splitArray(vector& nums, int m) { method hasSmallerSum (line 57) | bool hasSmallerSum(vector& nums, int m, int sum) { FILE: algorithms/cpp/splittingAStringIntoDescendingConsecutiveValues/SplittingAStringIntoDescendingConsecutiveValues.cpp class Solution (line 56) | class Solution { method getNum (line 60) | bool getNum(string& s, long target) { method firstNum (line 72) | long firstNum(string& s, int len) { method splitString (line 81) | bool splitString(string s) { FILE: algorithms/cpp/sqrt/sqrt.cpp function sqrt (line 18) | int sqrt(int x) { function sqrt_nt (line 41) | int sqrt_nt(int x) { function main (line 54) | int main(int argc, char**argv) FILE: algorithms/cpp/squaresOfASortedArray/SquaresOfASortedArray.cpp class Solution (line 28) | class Solution { method sortedSquares (line 30) | vector sortedSquares(vector& A) { FILE: algorithms/cpp/strStr/strStr.cpp function main (line 99) | int main(int argc, char** argv) FILE: algorithms/cpp/stringToIntegerAtoi/stringToIntegerAtoi.cpp function atoi (line 44) | int atoi(const char *str) { function main (line 78) | int main() FILE: algorithms/cpp/stringWithoutAAAOrBBB/StringWithoutAAAOrBBB.cpp class Solution (line 31) | class Solution { method string (line 33) | string strWithout3a3b(int A, int B) { FILE: algorithms/cpp/subsets/subsets.II.cpp function subsets (line 42) | vector > subsets(vector &S) { function combine (line 53) | vector > combine(vector &v, int k) { function getCombination (line 60) | void getCombination(vector &v, int n, int k, vector& solution,... function printResult (line 78) | void printResult(vector >& result) function printArray (line 89) | void printArray(vector& v){ function main (line 97) | int main(int argc, char** argv) FILE: algorithms/cpp/subsets/subsets.cpp function subsets (line 44) | vector > subsets(vector &S) { function combine (line 54) | vector > combine(vector& v, int k) { function combine1 (line 63) | vector > combine1(vector &v, int k) { function getCombination (line 70) | void getCombination(vector &v, int n, int k, vector& solution,... function combine2 (line 85) | vector > combine2(vector &v, int k) { function printResult (line 134) | void printResult(vector >& result) function printArray (line 145) | void printArray(vector& v){ function main (line 153) | int main(int argc, char** argv) FILE: algorithms/cpp/substringWithConcatenationOfAllWords/substringWithConcatenationOfAllWords.cpp function findSubstring (line 27) | vector findSubstring(string S, vector &L) { function main (line 93) | int main(int argc, char**argv) FILE: algorithms/cpp/substringsOfSizeThreeWithDistinctCharacters/SubstringsOfSizeThreeWithDistinctCharacters.cpp class Solution (line 36) | class Solution { method countGoodSubstrings (line 38) | int countGoodSubstrings(string s) { FILE: algorithms/cpp/sudokuSolver/sudokuSolver.cpp function initSudokuMask (line 33) | bool initSudokuMask(vector< vector > &board){ function recursiveSudoKu (line 60) | bool recursiveSudoKu(vector< vector > &board, int row, int col){ function solveSudoku (line 95) | void solveSudoku(vector > &board) { function main (line 103) | int main(int argc, char**argv) { FILE: algorithms/cpp/sumOfBeautyOfAllSubstrings/SumOfBeautyOfAllSubstrings.cpp class Solution (line 32) | class Solution { method beauty (line 34) | int beauty(string& s, int start, int end) { method beautySum (line 48) | int beautySum(string s) { method beautySum01 (line 53) | int beautySum01(string& s) { method beautySum02 (line 64) | int beautySum02(string& s) { FILE: algorithms/cpp/sumOfDigitsInBaseK/SumOfDigitsInBaseK.cpp class Solution (line 31) | class Solution { method sumBase (line 33) | int sumBase(int n, int k) { FILE: algorithms/cpp/sumOfDigitsOfStringAfterConvert/SumOfDigitsOfStringAfterConvert.cpp class Solution (line 53) | class Solution { method sumChar (line 55) | int sumChar(char c) { method sumInt (line 59) | int sumInt(int x) { method getLucky (line 67) | int getLucky(string s, int k) { FILE: algorithms/cpp/sumOfEvenNumbersAfterQueries/SumOfEvenNumbersAfterQueries.cpp class Solution (line 38) | class Solution { method sumEvenAfterQueries (line 40) | vector sumEvenAfterQueries(vector& A, vector>& q... FILE: algorithms/cpp/sumOfFlooredPairs/SumOfFlooredPairs.cpp class Solution (line 35) | class Solution { method sumOfFlooredPairs (line 37) | int sumOfFlooredPairs(vector& nums) { FILE: algorithms/cpp/sumOfLeftLeaves/SumOfLeftLeaves.cpp class Solution (line 30) | class Solution { method sumOfLeftLeaves_recursion_v1 (line 34) | void sumOfLeftLeaves_recursion_v1(TreeNode* root, int& result) { method sumOfLeftLeaves_recursion_v2 (line 47) | int sumOfLeftLeaves_recursion_v2(TreeNode* root) { method sumOfLeftLeaves (line 60) | int sumOfLeftLeaves(TreeNode* root) { FILE: algorithms/cpp/sumOfTwoIntegers/SumOfTwoIntegers.cpp class Solution (line 18) | class Solution { method getSum (line 20) | int getSum(int x, int y) { FILE: algorithms/cpp/sumOfUniqueElements/SumOfUniqueElements.cpp class Solution (line 36) | class Solution { method sumOfUnique (line 38) | int sumOfUnique(vector& nums) { method sumOfUnique_general (line 43) | int sumOfUnique_general(vector& nums) { method sumOfUnique_special (line 62) | int sumOfUnique_special(vector& nums) { FILE: algorithms/cpp/sumRootToLeafNumber/sumRootToLeafNumber.cpp class Solution (line 35) | class Solution { method sumNumbers (line 37) | int sumNumbers(TreeNode *root) { FILE: algorithms/cpp/summaryRanges/SummaryRanges.cpp class Solution (line 16) | class Solution { method string (line 18) | string makeRange(int start, int end) { method summaryRanges (line 28) | vector summaryRanges(vector& nums) { FILE: algorithms/cpp/superUglyNumber/SuperUglyNumber.cpp class Solution (line 45) | class Solution { method nthSuperUglyNumber (line 48) | int nthSuperUglyNumber(int n, vector& primes) { FILE: algorithms/cpp/surroundedRegions/surroundedRegions.cpp function markOpen (line 38) | void markOpen(vector< vector > &board, int row, int col, int r, in... function solve_recursively (line 47) | void solve_recursively(vector< vector > &board) { type position (line 87) | struct position{ method set (line 89) | void set(int r, int c) { row = r; col = c; } method position (line 90) | position(int r, int c): row(r), col(c) {} function solve_non_recursively (line 93) | void solve_non_recursively(vector< vector > &board) { class UnionFind (line 173) | class UnionFind { method UnionFind (line 178) | UnionFind(int n) { method count (line 193) | int count() { return count_; } method find (line 195) | int find(int p) { method connected (line 203) | bool connected(int p, int q) { method connect (line 207) | void connect(int p, int q) { class Solution (line 221) | class Solution { method solve (line 223) | void solve(vector >& board) { function solve (line 254) | void solve(vector< vector > &board) { function construct (line 263) | void construct(vector< vector > &board, int row, int col) { function print (line 277) | void print(vector< vector > &board) { function main (line 287) | int main(int argc, char** argv ) FILE: algorithms/cpp/swapNodesInPairs/swapNodesInPairs.cpp class Solution (line 26) | class Solution { method Solution (line 28) | Solution(){ method ListNode (line 36) | ListNode *swapPairs(ListNode *head) { method ListNode (line 43) | ListNode *swapPairs1(ListNode *head) { method ListNode (line 52) | ListNode *swapPairs2(ListNode *head) { method ListNode (line 75) | ListNode* swapPairs3(ListNode* head) { FILE: algorithms/cpp/symmetricTree/symmetricTree.cpp class Solution (line 59) | class Solution { method Solution (line 61) | Solution(){ method isSymmetric (line 65) | bool isSymmetric(TreeNode *root) { method isSymmetric (line 71) | bool isSymmetric(TreeNode *p, TreeNode *q){ method isSymmetric1 (line 78) | bool isSymmetric1(TreeNode *p, TreeNode *q){ method isSymmetric2 (line 87) | bool isSymmetric2(TreeNode *p, TreeNode *q){ FILE: algorithms/cpp/targetSum/targetSum.cpp class Solution (line 25) | class Solution { method findTargetSumWays (line 27) | int findTargetSumWays(vector& nums, int S) { FILE: algorithms/cpp/textJustification/textJustification.cpp function fullJustify (line 50) | vector fullJustify(vector &words, int L) { function printVector (line 110) | void printVector(vector &words, bool newline=false) { function test (line 118) | void test(const char* A[], int len, int L) { function main (line 131) | int main(int argc, char** argv) FILE: algorithms/cpp/theSkylineProblem/TheSkylineProblem.cpp class Solution (line 92) | class Solution { method getSkyline (line 95) | vector> getSkyline(vector>& buildings) { FILE: algorithms/cpp/thirdMaximumNumber/ThirdMaximumNumber.cpp class Solution (line 38) | class Solution { method nMax (line 40) | int nMax(vector& nums, int n) { method thirdMax (line 48) | int thirdMax(vector& nums) { FILE: algorithms/cpp/thousandSeparator/ThousandSeparator.cpp class Solution (line 34) | class Solution { method string (line 36) | string thousandSeparator(int n) { FILE: algorithms/cpp/threeConsecutiveOdds/ThreeConsecutiveOdds.cpp class Solution (line 28) | class Solution { method threeConsecutiveOdds (line 31) | bool threeConsecutiveOdds(vector& arr) { FILE: algorithms/cpp/timeBasedKeyValueStore/TimeBasedKeyValueStore.cpp class TimeMap (line 51) | class TimeMap { method TimeMap (line 57) | TimeMap() { method set (line 61) | void set(string key, string value, int timestamp) { method string (line 66) | string get(string key, int timestamp) { FILE: algorithms/cpp/timeNeededToInformAllEmployees/TimeNeededToInformAllEmployees.cpp class Solution (line 37) | class Solution { method dfs (line 40) | long long int dfs(vector>& adj, vector& informTime, i... method numOfMinutes (line 49) | int numOfMinutes(int n, int headID, vector& manager, vector&... FILE: algorithms/cpp/topKFrequentElements/topKFrequentElements.cpp class Solution (line 19) | class Solution { type element (line 21) | struct element//structure consisting of every distinct number in the v... method topKFrequent (line 34) | vector topKFrequent(vector& nums, int k) { FILE: algorithms/cpp/totalHammingDistance/totalHammingDistance.cpp class Solution (line 39) | class Solution { method totalHammingDistance (line 41) | int totalHammingDistance(vector& nums) { FILE: algorithms/cpp/trappingRainWater/trappingRainWater.cpp function trap (line 41) | int trap(int a[], int n) { function main (line 76) | int main() FILE: algorithms/cpp/treeOfCoprimes/TreeOfCoprimes.cpp class Solution (line 54) | class Solution { method gcd (line 58) | int gcd(int a, int b) { method print (line 65) | void print(vector& v, int len, vector& nums){ method getCoprimes (line 74) | vector getCoprimes(vector& nums, vector>& edges) { method getCoprimesDFS (line 95) | void getCoprimesDFS(int parent, int root, FILE: algorithms/cpp/triangle/triangle.cpp class Solution (line 31) | class Solution { method minimumTotal (line 34) | int minimumTotal(vector > &triangle) { method min (line 79) | inline int min(int x, int y, int z){ function main (line 86) | int main() FILE: algorithms/cpp/triplesWithBitwiseANDEqualToZero/TriplesWithBitwiseAndEqualToZero.cpp class Solution (line 39) | class Solution { method countTriplets (line 41) | int countTriplets(vector& A) { FILE: algorithms/cpp/truncateSentence/TruncateSentence.cpp class Solution (line 47) | class Solution { method isAlpha (line 49) | bool isAlpha(const char& ch) { method string (line 53) | string truncateSentence(string s, int k) { FILE: algorithms/cpp/tupleWithSameProduct/TupleWithSameProduct.cpp class Solution (line 45) | class Solution { method tupleSameProduct (line 47) | int tupleSameProduct(vector& nums) { FILE: algorithms/cpp/twoArraysEqualByReversingSubArrays/MakeTwoArraysEqualByReversingSubArrays.cpp class Solution (line 53) | class Solution { method canBeEqual (line 56) | bool canBeEqual(vector& target, vector& arr) { FILE: algorithms/cpp/twoCityScheduling/TwoCityScheduling.cpp class Solution (line 33) | class Solution { method diff (line 35) | static int diff(vector& x) { method cmpfunc (line 38) | static bool cmpfunc(vector& lhs, vector& rhs) { method twoCitySchedCost (line 46) | int twoCitySchedCost(vector>& costs) { FILE: algorithms/cpp/twoSum/twoSum.II.cpp class Solution (line 23) | class Solution { method twoSum (line 25) | vector twoSum(vector &numbers, int target) { FILE: algorithms/cpp/twoSum/twoSum.III.cpp class TwoSum (line 20) | class TwoSum { method add (line 26) | void add(int number) { method find (line 31) | bool find(int value) { FILE: algorithms/cpp/twoSum/twoSum.cpp class Solution (line 21) | class Solution { method twoSum (line 52) | vector twoSum(vector &numbers, int target) { method twoSum (line 71) | vector twoSum(vector& nums, int target) { FILE: algorithms/cpp/uglyNumber/UglyNumber.II.cpp class Solution (line 30) | class Solution { method min (line 33) | int min(int a, int b) { method min (line 37) | int min(int a, int b, int c) { method nthUglyNumber01 (line 69) | int nthUglyNumber01(int n) { method nthUglyNumber02 (line 86) | int nthUglyNumber02(int n) { method nthUglyNumber (line 103) | int nthUglyNumber(int n) { FILE: algorithms/cpp/uglyNumber/UglyNumber.cpp class Solution (line 19) | class Solution { method isUgly (line 22) | bool isUgly(int num) { FILE: algorithms/cpp/uniqueBinarySearchTrees/uniqueBinarySearchTrees.II.cpp type TreeNode (line 44) | struct TreeNode { method TreeNode (line 48) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function generateTrees (line 53) | vector generateTrees(int n) { function generateTrees (line 60) | vector generateTrees(int low, int high){ function printTree (line 86) | void printTree(TreeNode *root){ function main (line 98) | int main(int argc, char** argv) FILE: algorithms/cpp/uniqueBinarySearchTrees/uniqueBinarySearchTrees.cpp function numTrees (line 26) | int numTrees(int n) { function numTrees1 (line 30) | int numTrees1(int n) { function numTrees2 (line 48) | int numTrees2(int n) { function main (line 63) | int main(int argc, char** argv) FILE: algorithms/cpp/uniqueEmailAddresses/UniqueEmailAddresses.cpp class Solution (line 45) | class Solution { method numUniqueEmails (line 47) | int numUniqueEmails(vector& emails) { FILE: algorithms/cpp/uniqueMorseCodeWords/UniqueMorseCodeWords.cpp class Solution (line 49) | class Solution { method uniqueMorseRepresentations (line 51) | int uniqueMorseRepresentations(vector& words) { FILE: algorithms/cpp/uniqueNumberOfOccurrences/Unique-Number-of-Occurrences.cpp class Solution (line 30) | class Solution { method uniqueOccurrences (line 32) | bool uniqueOccurrences(vector& arr) { FILE: algorithms/cpp/uniquePaths/UniquePaths.III.cpp class Solution (line 48) | class Solution { method uniquePathsIII (line 50) | int uniquePathsIII(vector>& grid) { method findStartPoint (line 59) | bool findStartPoint(vector> &grid, int& x, int& y) { method check (line 70) | bool check(vector> &grid ) { method uniquePathsHelper (line 80) | void uniquePathsHelper(vector> &grid, int x, int y, int& p... FILE: algorithms/cpp/uniquePaths/uniquePaths.II.cpp function uniquePathsWithObstacles (line 33) | int uniquePathsWithObstacles(vector>& obstacleGrid) { function uniquePathsWithObstacles (line 58) | int uniquePathsWithObstacles(vector>& obstacleGrid) { FILE: algorithms/cpp/uniquePaths/uniquePaths.cpp function printMatrix (line 40) | void printMatrix(int*a, int m, int n) function uniquePaths (line 61) | int uniquePaths(int m, int n) { function uniquePaths (line 85) | int uniquePaths(int m, int n) { function main (line 97) | int main(int argc, char** argv) FILE: algorithms/cpp/validNumber/validNumber.cpp function isdigit (line 26) | bool isdigit(const char c){ function isspace (line 29) | bool isspace(const char c) { function isNumber (line 33) | bool isNumber(const char *s) { function main (line 87) | int main(int argc, char** argv) FILE: algorithms/cpp/validPalindrome/validPalindrome.cpp class Solution (line 21) | class Solution { method isPalindrome (line 23) | bool isPalindrome(string s) { method string (line 33) | string removeNoise(string& s){ FILE: algorithms/cpp/validParentheses/validParentheses.cpp function isValid (line 21) | bool isValid(string s) { function main (line 41) | int main(int argc, char**argv) FILE: algorithms/cpp/validPerfectSquare/ValidPerfectSquare.cpp class Solution (line 31) | class Solution { method isPerfectSquare1 (line 34) | bool isPerfectSquare1(int num) { method isPerfectSquare2 (line 52) | bool isPerfectSquare2(int num) { method isPerfectSquare (line 61) | bool isPerfectSquare(int num) { FILE: algorithms/cpp/validSudoku/validSudoku.cpp class Solution (line 20) | class Solution { method isValidSudoku (line 22) | bool isValidSudoku(vector > &board) { FILE: algorithms/cpp/validateBinarySearchTree/validateBinarySearchTree.cpp type TreeNode (line 42) | struct TreeNode { method TreeNode (line 46) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function isValidBST (line 49) | bool isValidBST(TreeNode *root) { function TreeNode (line 78) | TreeNode* createTree(int a[], int n) method TreeNode (line 46) | TreeNode(int x) : val(x), left(NULL), right(NULL) {} function main (line 104) | int main() FILE: algorithms/cpp/verifyPreorderSerializationOfABinaryTree/VerifyPreorderSerializationOfABinaryTree.cpp class Solution (line 46) | class Solution { method isValidSerialization (line 65) | bool isValidSerialization(string preorder) { method split (line 78) | void split(const string &s, char delim, vector &elems) { FILE: algorithms/cpp/verticalOrderTraversalOfABinaryTree/VerticalOrderTraversalOfABinaryTree.cpp class Item (line 86) | class Item { method Item (line 88) | Item(int _x, int _y, int _val):x(_x), y(_y),val(_val) {} class ItemCmp (line 93) | class ItemCmp { function getValue (line 100) | int getValue(const Item& i) { class Solution (line 104) | class Solution { method verticalTraversal (line 106) | vector> verticalTraversal(TreeNode* root) { method verticalTraversalHelper (line 120) | void verticalTraversalHelper(TreeNode* root, int x, int y, FILE: algorithms/cpp/videoStitching/VideoStitching.cpp class Solution (line 58) | class Solution { method videoStitching (line 60) | int videoStitching(vector>& clips, int T) { method print (line 105) | void print(vector>& clips) { method print (line 112) | void print(vector& v) { FILE: algorithms/cpp/waysToSplitArrayIntoThreeSubarrays/WaysToSplitArrayIntoThreeSubarrays.cpp class Solution (line 46) | class Solution { method waysToSplit (line 48) | int waysToSplit(vector& nums) { method binary_search (line 60) | int binary_search(vector& presum, int left, int i, bool searchLef... method waysToSplit_BS (line 85) | int waysToSplit_BS(vector& presum) { method waysToSplit_TLE (line 102) | int waysToSplit_TLE(vector& presum) { FILE: algorithms/cpp/wiggleSort/WiggleSort.II.cpp class Solution (line 24) | class Solution { method wiggleSort01 (line 48) | void wiggleSort01(vector& nums) { method wiggleSort02 (line 67) | void wiggleSort02(vector& nums) { method wiggleSort (line 89) | void wiggleSort(vector& nums) { FILE: algorithms/cpp/wiggleSubsequence/wiggleSubsequence.cpp class Solution (line 56) | class Solution { method wiggleMaxLength (line 58) | int wiggleMaxLength(vector& nums) { FILE: algorithms/cpp/wildcardMatching/wildcardMatching.cpp function isMatch (line 34) | bool isMatch(const char *s, const char *p) { function main (line 67) | int main(int argc, char** argv) FILE: algorithms/cpp/wordBreak/wordBreak.II.cpp function wordBreak (line 61) | vector wordBreak(string s, set &dict, map &dict, string str, vector& ... function wordBreak_dp (line 143) | vector wordBreak_dp(string s, set &dict) { function wordBreak (line 167) | vector wordBreak(string s, set &dict) { function printVector (line 197) | void printVector(vector& v) function main (line 204) | int main() FILE: algorithms/cpp/wordBreak/wordBreak.cpp function wordBreak (line 24) | bool wordBreak(string s, set &dict) { function main (line 51) | int main() FILE: algorithms/cpp/wordLadder/wordLadder.II.cpp function generatePath (line 127) | void generatePath( string start, string end, function findLadders (line 147) | vector< vector > function printLadders (line 170) | void printLadders(vector< vector > &ladders){ function main (line 180) | int main(int argc, char** argv) FILE: algorithms/cpp/wordLadder/wordLadder.cpp class Solution (line 76) | class Solution { method ladderLength (line 78) | int ladderLength(string start, string end, unordered_set &dict) { FILE: algorithms/cpp/wordPattern/WordPattern.cpp class Solution (line 27) | class Solution { method split (line 31) | vector split(string str, char delimiter) { method wordPattern (line 45) | bool wordPattern(string pattern, string str) { FILE: algorithms/cpp/wordSearch/wordSearch.II.cpp class TrieNode (line 41) | class TrieNode { method TrieNode (line 43) | TrieNode(string s):isWord(false), word(s) { method TrieNode (line 46) | TrieNode* & operator [] (char ch) { method TrieNode (line 49) | TrieNode* & operator [] (int idx) { class TrieTree (line 60) | class TrieTree { method TrieTree (line 62) | TrieTree():root(new TrieNode("")) { } method TrieNode (line 64) | TrieNode* getRoot() { method addWord (line 67) | void addWord(string& s){ method freeTree (line 80) | void freeTree(TrieNode* node){ class Solution (line 92) | class Solution { method findWords (line 94) | void findWords(vector>& board, TrieNode* root, int row, i... method findWords (line 125) | vector findWords(vector>& board, vector& ... FILE: algorithms/cpp/wordSearch/wordSearch.cpp function exist (line 34) | bool exist(vector > &board, string& word, int idx, int row,... function exist (line 60) | bool exist(vector > &board, string word) { function buildBoard (line 77) | vector< vector > buildBoard(char b[][5], int r, int c) { function main (line 88) | int main(int argc, char** argv) FILE: algorithms/cpp/zigZagConversion/zigZagConversion.cpp function string (line 30) | string convert(string s, int nRows) { function main (line 52) | int main(int argc, char**argv){ FILE: algorithms/golang/twoSum/twoSum.go function twoSum (line 3) | func twoSum(nums []int, target int) []int { FILE: algorithms/java/src/LargestNumberAfterMutatingSubstring/largestNumberAfterMutatingSubstring.java class Solution (line 49) | class Solution { method maximumNumber (line 50) | public String maximumNumber(String num, int[] change) { FILE: algorithms/java/src/MaxSubArray/MaxSubarray.java class Solution (line 15) | class Solution { method maxSubArray (line 16) | public int maxSubArray(int[] nums) { FILE: algorithms/java/src/RotateImage/rotateImage.java class Solution (line 27) | class Solution { method rotate (line 28) | public void rotate(int[][] matrix) { FILE: algorithms/java/src/balancedBinaryTree/TreeNode.java class TreeNode (line 6) | public class TreeNode { method TreeNode (line 9) | public TreeNode(int val) { FILE: algorithms/java/src/balancedBinaryTree/balancedBinaryTree.java class balancedBinaryTree (line 22) | public class balancedBinaryTree { method isBalanced (line 27) | public boolean isBalanced(TreeNode root) { class Result (line 33) | private class Result { method Result (line 36) | Result(boolean isBalanced, int height) { method helper (line 41) | private Result helper(TreeNode root, int depth) { FILE: algorithms/java/src/balancedBinaryTree/balancedBinaryTreeTest.java class balancedBinaryTreeTest (line 11) | public class balancedBinaryTreeTest { method testIsBalanced (line 13) | @Test FILE: algorithms/java/src/binarySearchTreeIterator/TreeNode.java class TreeNode (line 6) | public class TreeNode { method TreeNode (line 9) | public TreeNode(int val) { FILE: algorithms/java/src/binarySearchTreeIterator/binarySearchTreeIterator.java class binarySearchTreeIterator (line 39) | public class binarySearchTreeIterator { method binarySearchTreeIterator (line 43) | public binarySearchTreeIterator(TreeNode root) { method hasNext (line 50) | public boolean hasNext() { method next (line 56) | public TreeNode next() { FILE: algorithms/java/src/binarySearchTreeIterator/binarySearchTreeIteratorTest.java class binarySearchTreeIteratorTest (line 12) | public class binarySearchTreeIteratorTest { method testIterator (line 13) | @Test FILE: algorithms/java/src/binaryTreeBFSTraversal/TreeNode.java class TreeNode (line 6) | public class TreeNode { method TreeNode (line 10) | TreeNode(int x) { val = x; } FILE: algorithms/java/src/binaryTreeBFSTraversal/binaryTreeBFSTraversal.java class binaryTreeBFSTraversal (line 11) | public class binaryTreeBFSTraversal { method bfsTraversal (line 12) | public List bfsTraversal(TreeNode root) { FILE: algorithms/java/src/binaryTreeBFSTraversal/binaryTreeBFSTraversalTest.java class binaryTreeBFSTraversalTest (line 13) | public class binaryTreeBFSTraversalTest { method testPreorderTraversal (line 24) | @Test FILE: algorithms/java/src/binaryTreeLevelOrderTraversal/TreeNode.java class TreeNode (line 6) | public class TreeNode { method TreeNode (line 10) | TreeNode(int x) { val = x; } FILE: algorithms/java/src/binaryTreeLevelOrderTraversal/binaryTreeLevelOrderTraversal.java class binaryTreeLevelOrderTraversal (line 57) | public class binaryTreeLevelOrderTraversal { method levelOrder (line 62) | public List> levelOrder(TreeNode root) { FILE: algorithms/java/src/binaryTreeLevelOrderTraversal/binaryTreeLevelOrderTraversalTest.java class binaryTreeLevelOrderTraversalTest (line 14) | public class binaryTreeLevelOrderTraversalTest { method testLevelOrder (line 16) | @Test FILE: algorithms/java/src/binaryTreeMaximumPathSum/TreeNode.java class TreeNode (line 6) | public class TreeNode { method TreeNode (line 10) | TreeNode(int x) { val = x; } FILE: algorithms/java/src/binaryTreeMaximumPathSum/binaryTreeMaximumPathSum.java class binaryTreeMaximumPathSum (line 43) | public class binaryTreeMaximumPathSum { method maxPathSum (line 48) | public int maxPathSum(TreeNode root) { class Result (line 53) | private class Result { method Result (line 56) | Result(int sumToRoot, int sumToLeaf) { method helper (line 63) | private Result helper(TreeNode root) { FILE: algorithms/java/src/binaryTreeMaximumPathSum/binaryTreeMaximumPathSumTest.java class binaryTreeMaximumPathSumTest (line 12) | public class binaryTreeMaximumPathSumTest { method testMaxPathSum (line 14) | @Test FILE: algorithms/java/src/binaryTreePreorderTraversal/TreeNode.java class TreeNode (line 6) | public class TreeNode { method TreeNode (line 10) | TreeNode(int x) { val = x; } FILE: algorithms/java/src/binaryTreePreorderTraversal/binaryTreePreorderTraversal.java class binaryTreePreorderTraversal (line 33) | public class binaryTreePreorderTraversal { method preorderTraversal (line 36) | public List preorderTraversal(TreeNode root) { method traversal (line 43) | private void traversal(List results, TreeNode root) { FILE: algorithms/java/src/binaryTreePreorderTraversal/binaryTreePreorderTraversalTest.java class binaryTreePreorderTraversalTest (line 13) | public class binaryTreePreorderTraversalTest { method testPreorderTraversal (line 24) | @Test FILE: algorithms/java/src/containerwithmostwater.java class Solution (line 10) | class Solution { method maxArea (line 11) | public int maxArea(int[] height) { FILE: algorithms/java/src/countAndSay/CountAndSay.java class CountAndSay (line 34) | public class CountAndSay { method nextString (line 36) | public String nextString(String str) { method countAndSay (line 53) | public String countAndSay(int n) { FILE: algorithms/java/src/countAndSay/TestCountAndSay.java class TestCountAndSay (line 8) | public class TestCountAndSay { method test (line 9) | @Test FILE: algorithms/java/src/dynamicProgramming/climbStairs/climbStairs.java class climbStairs (line 17) | public class climbStairs { method climbStairs (line 22) | public int climbStairs(int n) { FILE: algorithms/java/src/dynamicProgramming/climbStairs/climbStairsTest.java class climbStairsTest (line 10) | public class climbStairsTest { method testClimbStairs (line 12) | @Test FILE: algorithms/java/src/dynamicProgramming/minimumPathSum/minimumPathSum.java class minimumPathSum (line 17) | public class minimumPathSum { method minPathSum (line 22) | public int minPathSum(int[][] grid) { FILE: algorithms/java/src/dynamicProgramming/minimumPathSum/minimumPathSumTest.java class minimumPathSumTest (line 10) | public class minimumPathSumTest { method testMinPathSum (line 12) | @Test FILE: algorithms/java/src/dynamicProgramming/triangle/triangle.java class triangle (line 35) | public class triangle { method minimumTotal1 (line 40) | public int minimumTotal1(List> triangle) { method minimumTotal2 (line 69) | public int minimumTotal2(int[][] triangle) { FILE: algorithms/java/src/dynamicProgramming/triangle/triangleTest.java class triangleTest (line 10) | public class triangleTest { method testMinimumTotal (line 12) | @Test FILE: algorithms/java/src/dynamicProgramming/uniquePaths/uniquePaths.java class uniquePaths (line 38) | public class uniquePaths { method uniquePaths (line 43) | public int uniquePaths(int m, int n) { FILE: algorithms/java/src/dynamicProgramming/uniquePaths/uniquePathsII.java class uniquePathsII (line 31) | public class uniquePathsII { method uniquePathsWithObstacles (line 36) | public int uniquePathsWithObstacles(int[][] obstacleGrid) { FILE: algorithms/java/src/dynamicProgramming/uniquePaths/uniquePathsIITest.java class uniquePathsIITest (line 10) | public class uniquePathsIITest { method testUniquePathsWithObstacles (line 12) | @Test FILE: algorithms/java/src/dynamicProgramming/uniquePaths/uniquePathsTest.java class uniquePathsTest (line 10) | public class uniquePathsTest { method testUniquePaths (line 12) | @Test FILE: algorithms/java/src/findMinimumInRotatedSortedArray/findMinimumInRotatedSortedArray.java class findMinimumInRotatedSortedArray (line 20) | public class findMinimumInRotatedSortedArray { method findMin (line 21) | public int findMin(int[] num) { FILE: algorithms/java/src/findMinimumInRotatedSortedArray/findMinimumInRotatedSortedArrayTest.java class findMinimumInRotatedSortedArrayTest (line 10) | public class findMinimumInRotatedSortedArrayTest { method testFindMin (line 12) | @Test FILE: algorithms/java/src/findPeakElement/findPeakElement.java class findPeakElement (line 27) | public class findPeakElement { method findPeakElement (line 28) | public int findPeakElement(int[] nums) { FILE: algorithms/java/src/findPeakElement/findPeakElementTest.java class findPeakElementTest (line 10) | public class findPeakElementTest { method testFindPeak (line 12) | @Test FILE: algorithms/java/src/firstBadVersion/VersionControl.java class VersionControl (line 6) | public class VersionControl { method isBadVersion (line 8) | boolean isBadVersion(int version) { FILE: algorithms/java/src/firstBadVersion/firstBadVersion.java class firstBadVersion (line 21) | public class firstBadVersion extends VersionControl { method firstBadVersion (line 22) | public int firstBadVersion(int n) { FILE: algorithms/java/src/firstBadVersion/firstBadVersionTest.java class firstBadVersionTest (line 10) | public class firstBadVersionTest { method testFirstBadVersion (line 12) | @Test FILE: algorithms/java/src/inorderSuccessorInBST/TreeNode.java class TreeNode (line 6) | public class TreeNode { method TreeNode (line 10) | TreeNode(int x) { val = x; } FILE: algorithms/java/src/inorderSuccessorInBST/inorderSuccessorInBST.java class inorderSuccessorInBST (line 36) | public class inorderSuccessorInBST { method inorderSuccessor (line 37) | public TreeNode inorderSuccessor(TreeNode root, TreeNode p) { FILE: algorithms/java/src/inorderSuccessorInBST/inorderSuccessorInBSTTest.java class inorderSuccessorInBSTTest (line 12) | public class inorderSuccessorInBSTTest { method testInorderSuccessor (line 14) | @Test FILE: algorithms/java/src/lengthOfLastWord/LengthOfLastWord.java class LengthOfLastWord (line 21) | public class LengthOfLastWord { method lengthOfLastWord (line 23) | public int lengthOfLastWord(String s) { FILE: algorithms/java/src/lengthOfLastWord/TestLengthOfLastWord.java class TestLengthOfLastWord (line 9) | public class TestLengthOfLastWord { method test (line 10) | @Test FILE: algorithms/java/src/lowestCommonAncestorOfABinaryTree/TreeNode.java class TreeNode (line 3) | public class TreeNode { method TreeNode (line 7) | TreeNode(int x) { val = x; } FILE: algorithms/java/src/lowestCommonAncestorOfABinaryTree/lowestCommonAncestorOfABinaryTree.java class lowestCommonAncestorOfABinaryTree (line 47) | public class lowestCommonAncestorOfABinaryTree { method lowestCommonAncestor (line 53) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode A, TreeNo... FILE: algorithms/java/src/lowestCommonAncestorOfABinaryTree/lowestCommonAncestorOfABinaryTreeTest.java class lowestCommonAncestorOfABinaryTreeTest (line 12) | public class lowestCommonAncestorOfABinaryTreeTest { method testLowestCommonAncestor (line 14) | @Test FILE: algorithms/java/src/lruCache/LRUCache.java class LRUCache (line 15) | public class LRUCache { method LRUCache (line 20) | public LRUCache(int capacity) { method get (line 25) | public int get(int key) { method set (line 35) | public void set(int key, int value) { FILE: algorithms/java/src/lruCache/LRUCacheTest.java class LRUCacheTest (line 6) | public class LRUCacheTest { method LRUCacheTest (line 10) | public LRUCacheTest() { method testCacheStartsEmpty (line 14) | @Test method testSetBelowCapacity (line 19) | @Test method testCapacityReachedOldestRemoved (line 29) | @Test method testGetRenewsEntry (line 39) | @Test FILE: algorithms/java/src/maximumDepthOfBinaryTree/TreeNode.java class TreeNode (line 3) | public class TreeNode { method TreeNode (line 7) | TreeNode(int x) { val = x; } FILE: algorithms/java/src/maximumDepthOfBinaryTree/maximumDepthOfBinaryTree.java class maximumDepthOfBinaryTree (line 27) | public class maximumDepthOfBinaryTree { method maxDepth (line 28) | public int maxDepth(TreeNode root) { method theDepth (line 35) | private int theDepth(TreeNode root) { FILE: algorithms/java/src/maximumDepthOfBinaryTree/maximumDepthOfBinaryTreeTest.java class maximumDepthOfBinaryTreeTest (line 12) | public class maximumDepthOfBinaryTreeTest { method testMaxDepth (line 14) | @Test FILE: algorithms/java/src/minStack/MinStack.java class MinStack (line 27) | public class MinStack { method MinStack (line 35) | public MinStack() { method push (line 39) | public void push(int x) { method pop (line 48) | public void pop() { method top (line 53) | public int top() { method getMin (line 57) | public int getMin() { FILE: algorithms/java/src/minStack/TestMinStack.java class TestMinStack (line 9) | public class TestMinStack { method test (line 10) | @Test FILE: algorithms/java/src/myQueue/MyQueue.java class MyQueue (line 63) | public class MyQueue { method MyQueue (line 67) | public MyQueue() { method push (line 73) | public void push(int x) { method pop (line 78) | public int pop() { method peek (line 89) | public int peek() { method empty (line 98) | public boolean empty() { FILE: algorithms/java/src/myQueue/TestMyQueue.java class TestMyQueue (line 8) | public class TestMyQueue { method test (line 9) | @Test FILE: algorithms/java/src/myStack/MyStack.java class MyStack (line 31) | public class MyStack { method MyStack (line 36) | public MyStack() { method push (line 43) | public void push(int x) { method pop (line 52) | public int pop() { method top (line 71) | public int top() { method empty (line 91) | public boolean empty() { FILE: algorithms/java/src/myStack/TestMyStack.java class TestMyStack (line 8) | public class TestMyStack { method test (line 9) | @Test FILE: algorithms/java/src/palindromeNumber/PalindromeNumber.java class PalindromeNumber (line 23) | public class PalindromeNumber { method isPalindrome (line 32) | public boolean isPalindrome(int x) { FILE: algorithms/java/src/palindromeNumber/TestPalindromeNumber.java class TestPalindromeNumber (line 9) | public class TestPalindromeNumber { method test (line 10) | @Test FILE: algorithms/java/src/powXn/PowXn.java class PowXn (line 22) | public class PowXn { method recursion (line 38) | public double recursion(double x, long n) { method myPow01 (line 51) | public double myPow01(double x, int n) { method myPow02 (line 65) | public double myPow02(double x, int n) { method bitFunction (line 86) | public double bitFunction(double x, long n) { FILE: algorithms/java/src/powXn/TestPowXn.java class TestPowXn (line 9) | public class TestPowXn { method test (line 10) | @Test FILE: algorithms/java/src/removeDuplicatesFromSortedArray/RemoveDuplicatesFromSortedArray.java class RemoveDuplicatesFromSortedArray (line 23) | public class RemoveDuplicatesFromSortedArray { method removeDuplicates (line 24) | public int removeDuplicates(int[] nums) { FILE: algorithms/java/src/removeDuplicatesFromSortedArray/TestRemoveDuplicates.java class TestRemoveDuplicates (line 9) | public class TestRemoveDuplicates { method test (line 10) | @Test method assertSorted (line 22) | private void assertSorted(int[] array, int len) { FILE: algorithms/java/src/reverseLinkedList/ListNode.java class ListNode (line 3) | public class ListNode { method ListNode (line 6) | public ListNode(int x) { method toString (line 9) | @Override method ListNode (line 13) | public ListNode(int val, ListNode next) { method listToString (line 21) | public static String listToString(ListNode head) { method arrayToList (line 37) | public static ListNode arrayToList(int[] array) { FILE: algorithms/java/src/reverseLinkedList/ReverseLinkedList.java class ReverseLinkedList (line 15) | public class ReverseLinkedList { method reverseList (line 20) | public ListNode reverseList(ListNode head) { method reverseListRecursion (line 36) | public ListNode reverseListRecursion(ListNode head) { method recursion (line 47) | public ListNode recursion(ListNode p) { FILE: algorithms/java/src/reverseLinkedList/TestReverseLinkedList.java class TestReverseLinkedList (line 9) | public class TestReverseLinkedList { method test (line 10) | @Test FILE: algorithms/java/src/reverseLinkedListII/ListNode.java class ListNode (line 3) | public class ListNode { method ListNode (line 6) | public ListNode(int x) { method toString (line 9) | @Override method ListNode (line 13) | public ListNode(int val, ListNode next) { method listToString (line 21) | public static String listToString(ListNode head) { method arrayToList (line 37) | public static ListNode arrayToList(int[] array) { FILE: algorithms/java/src/reverseLinkedListII/ReverseLinkedListII.java class ReverseLinkedListII (line 21) | public class ReverseLinkedListII { method reverseBetween (line 22) | public ListNode reverseBetween(ListNode head, int m, int n) { FILE: algorithms/java/src/reverseLinkedListII/TestReverseLinkedListII.java class TestReverseLinkedListII (line 9) | public class TestReverseLinkedListII { method test (line 10) | @Test FILE: algorithms/java/src/reverseWordsInAString/ReverseWordsInAString.java class ReverseWordsInAString (line 19) | public class ReverseWordsInAString { method reverseWords (line 21) | public String reverseWords(String s) { FILE: algorithms/java/src/reverseWordsInAString/TestReverseWordsInAString.java class TestReverseWordsInAString (line 9) | public class TestReverseWordsInAString { method test (line 10) | @Test FILE: algorithms/java/src/rotateArray/RotateArray.java class RotateArray (line 29) | public class RotateArray { method rotate (line 31) | public void rotate(int[] nums, int k) { method rotateRange (line 44) | private void rotateRange(int start, int end, int[] array) { method swap (line 49) | private void swap(int[] array, int i, int j) { FILE: algorithms/java/src/rotateArray/TestRotateArray.java class TestRotateArray (line 12) | public class TestRotateArray { method test (line 13) | @Test FILE: algorithms/java/src/search2DMatrix/search2DMatrix.java class search2DMatrix (line 30) | public class search2DMatrix { method searchMatrix (line 34) | public boolean searchMatrix(int[][] matrix, int target) { method getValue (line 71) | private int getValue(int index) { FILE: algorithms/java/src/search2DMatrix/search2DMatrixTest.java class search2DMatrixTest (line 10) | public class search2DMatrixTest { method testSearchMatrix (line 12) | @Test FILE: algorithms/java/src/searchA2DMatrixII/SearchA2DMatrixII.java class SearchA2DMatrixII (line 34) | public class SearchA2DMatrixII { method searchMatrix (line 35) | public boolean searchMatrix(int[][] matrix, int target) { FILE: algorithms/java/src/searchA2DMatrixII/Test_240.java class Test_240 (line 8) | public class Test_240 { method test (line 9) | @Test FILE: algorithms/java/src/searchForRange/searchForRange.java class searchForRange (line 23) | public class searchForRange { method searchRange (line 24) | public int[] searchRange(int[] nums, int target) { FILE: algorithms/java/src/searchForRange/searchForRangeTest.java class searchForRangeTest (line 10) | public class searchForRangeTest { method testSearchRange (line 12) | @Test FILE: algorithms/java/src/searchInABigSortedArray/searchInABigSortedArray.java class searchInABigSortedArray (line 25) | public class searchInABigSortedArray { method searchBigSortedArray (line 26) | public int searchBigSortedArray(int[] A, int target) { FILE: algorithms/java/src/searchInABigSortedArray/searchInABigSortedArrayTest.java class searchInABigSortedArrayTest (line 11) | public class searchInABigSortedArrayTest { method testSearchBigSortedArray (line 13) | @Test FILE: algorithms/java/src/searchInRotatedSortedArray/searchInRotatedSortedArray.java class searchInRotatedSortedArray (line 20) | public class searchInRotatedSortedArray { method search (line 27) | public int search(int[] nums, int target) { FILE: algorithms/java/src/searchInRotatedSortedArray/searchInRotatedSortedArrayTest.java class searchInRotatedSortedArrayTest (line 10) | public class searchInRotatedSortedArrayTest { method testSearch (line 12) | @Test FILE: algorithms/java/src/searchInsertPosition/searchInsertPosition.java class searchInsertPosition (line 24) | public class searchInsertPosition { method searchInsert (line 25) | public int searchInsert(int[] nums, int target) { method searchInsertI (line 35) | private int searchInsertI(int[] nums, int target) { method searchInsertII (line 65) | private int searchInsertII(int[] nums, int target) { FILE: algorithms/java/src/searchInsertPosition/searchInsertPositionTest.java class searchInsertPositionTest (line 10) | public class searchInsertPositionTest { method testSearchInsert (line 12) | @Test FILE: algorithms/java/src/searchRangeInBinarySearchTree/TreeNode.java class TreeNode (line 6) | public class TreeNode { method TreeNode (line 10) | TreeNode(int x) { val = x; } FILE: algorithms/java/src/searchRangeInBinarySearchTree/searchRangeInBinarySearchTree.java class searchRangeInBinarySearchTree (line 32) | public class searchRangeInBinarySearchTree { method searchRange (line 38) | public ArrayList searchRange(TreeNode root, int k1, int k2) { FILE: algorithms/java/src/searchRangeInBinarySearchTree/searchRangeInBinarySearchTreeTest.java class searchRangeInBinarySearchTreeTest (line 13) | public class searchRangeInBinarySearchTreeTest { method testSearchRange (line 15) | @Test FILE: algorithms/java/src/strStr/StrStrKmp.java class StrStrKmp (line 25) | public class StrStrKmp { method strStr (line 30) | public int strStr(String haystack, String needle) { method getNext (line 103) | public int[] getNext(String str) { FILE: algorithms/java/src/strStr/TestStrStrKmp.java class TestStrStrKmp (line 8) | public class TestStrStrKmp { method testKmp (line 9) | @Test FILE: algorithms/java/src/strStr/strStr.java class strStr (line 20) | public class strStr { method strStr (line 21) | public int strStr(String haystack, String needle) { FILE: algorithms/java/src/strStr/strStrTest.java class strStrTest (line 10) | public class strStrTest { method testStrStr (line 12) | @org.junit.Test FILE: algorithms/java/src/subsets/subsets.java class subsets (line 39) | public class subsets { method subsets (line 45) | public List> subsets(int [] nums) { method addSubset (line 56) | private void addSubset(List> result, ArrayList ... method subsets (line 70) | public ArrayList> subsets(ArrayList s) { method addSubset (line 82) | private void addSubset( FILE: algorithms/java/src/subsets/subsetsII.java class subsetsII (line 37) | public class subsetsII { method subsetsWithDup (line 43) | public List> subsetsWithDup(int [] nums) { method addSubset (line 54) | private void addSubset(List> result, ArrayList ... method subsetsWithDup (line 72) | public ArrayList> subsetsWithDup(ArrayList... method addSubset (line 84) | private void addSubset( FILE: algorithms/java/src/subsets/subsetsIITest.java class subsetsIITest (line 13) | public class subsetsIITest { method testSubsetsIILintcode (line 15) | @Test method testSubsetsIILeetcode (line 54) | @Test FILE: algorithms/java/src/subsets/subsetsTest.java class subsetsTest (line 14) | public class subsetsTest { method testSubsets (line 16) | @Test method testSubsets1 (line 62) | @Test FILE: algorithms/java/src/validAnagram/TestValidAnagram.java class TestValidAnagram (line 9) | public class TestValidAnagram { method test (line 10) | @Test FILE: algorithms/java/src/validAnagram/ValidAnagram.java class ValidAnagram (line 22) | public class ValidAnagram { method isAnagram (line 27) | public boolean isAnagram(String s, String t) { FILE: algorithms/java/src/validPalindrome/TestValidPalindrome.java class TestValidPalindrome (line 8) | public class TestValidPalindrome { method test (line 9) | @Test FILE: algorithms/java/src/validPalindrome/ValidPalindrome.java class ValidPalindrome (line 21) | public class ValidPalindrome { method isAlphaNumber (line 22) | private boolean isAlphaNumber(char c) { method isPalindrome (line 38) | public boolean isPalindrome(String s) { FILE: algorithms/java/src/validateBinarySearchTree/TreeNode.java class TreeNode (line 3) | public class TreeNode { method TreeNode (line 6) | public TreeNode(int val) { FILE: algorithms/java/src/validateBinarySearchTree/validateBinarySearchTree.java class validateBinarySearchTree (line 40) | public class validateBinarySearchTree { method isValidBST (line 41) | public boolean isValidBST(TreeNode root) { method isBSTTraversal (line 49) | public boolean isBSTTraversal(TreeNode root) { class Result (line 76) | private class Result { method Result (line 80) | Result(int min, int max, boolean isBST) { method isBSTDivideAndConquer (line 87) | public boolean isBSTDivideAndConquer(TreeNode root) { method isBSTHelper (line 91) | public Result isBSTHelper(TreeNode root) { FILE: algorithms/java/src/validateBinarySearchTree/validateBinarySearchTreeTest.java class validateBinarySearchTreeTest (line 10) | public class validateBinarySearchTreeTest { method testIsValidBST (line 12) | @Test FILE: algorithms/python/1-bitAnd2-bitCharacters/isOneBitCharacter.py function isOneBitCharacter (line 1) | def isOneBitCharacter(self, bits): FILE: algorithms/python/AddOneRowToTree/addOneRow.py function addOneRow (line 3) | def addOneRow(self, root, v, d): FILE: algorithms/python/BinarySearchTreeIterator/BSTIterator.py class BSTIterator (line 3) | class BSTIterator(object): method __init__ (line 4) | def __init__(self, root): method hasNext (line 13) | def hasNext(self): method next (line 16) | def next(self): method __init__ (line 21) | def __init__(self, root): method hasNext (line 28) | def hasNext(self): method next (line 32) | def next(self): class BSTIterator (line 20) | class BSTIterator(object): method __init__ (line 4) | def __init__(self, root): method hasNext (line 13) | def hasNext(self): method next (line 16) | def next(self): method __init__ (line 21) | def __init__(self, root): method hasNext (line 28) | def hasNext(self): method next (line 32) | def next(self): FILE: algorithms/python/BinaryTreePostorderTraversal/postorderTraversal.py function postorderTraversal (line 4) | def postorderTraversal(self, root): function postorderTraversal (line 21) | def postorderTraversal(self, root): FILE: algorithms/python/BinaryTreeTilt/findTilt.py function findTilt (line 1) | def findTilt(self, root): FILE: algorithms/python/BinaryTreeZigzagLevelOrderTraversal/zigzagLevelOrder.py function zigzagLevelOrder (line 5) | def zigzagLevelOrder(self, root): FILE: algorithms/python/CheckCompletenessOfABinaryTree/isCompleteTree.py function isCompleteTree (line 1) | def isCompleteTree(self, root): FILE: algorithms/python/ConstructBinaryTreeFromInorderAndPostorderTraversal/buildTree.py function buildTree (line 1) | def buildTree(self, inorder, postorder): FILE: algorithms/python/ConstructBinaryTreeFromPreorderAndInorderTraversal/buildTree.py function buildTree (line 1) | def buildTree(self, preorder, inorder): FILE: algorithms/python/ContainsDuplicateII/containsNearbyDuplicate.py function containsNearbyDuplicate (line 3) | def containsNearbyDuplicate(self, nums, k): function containsNearbyDuplicate (line 15) | def containsNearbyDuplicate(self, nums, k): FILE: algorithms/python/ContainsDuplicateIII/containsNearbyAlmostDuplicate.py function containsNearbyAlmostDuplicate (line 1) | def containsNearbyAlmostDuplicate(self, nums, k, t): FILE: algorithms/python/ConvertBSTtoGreaterTree/convertBST.py class Solution (line 6) | class Solution: method convertBST (line 7) | def convertBST(self, root): FILE: algorithms/python/CopyListWithRandomPointer/copyRandomList.py function copyRandomList (line 5) | def copyRandomList(self, head): function copyRandomList (line 23) | def copyRandomList(self, head): FILE: algorithms/python/CountCompleteTreeNodes/countNodes.py function countNodes (line 1) | def countNodes(self, root): FILE: algorithms/python/DeleteNodeInABST/deleteNode.py function deleteNode (line 8) | def deleteNode(self, root, key): FILE: algorithms/python/DiameterOfBinaryTree/diameterOfBinaryTree.py function diameterOfBinaryTree (line 1) | def diameterOfBinaryTree(self, root): FILE: algorithms/python/DifferentWaysToAddParentheses/diffWaysToCompute.py function diffWaysToCompute (line 1) | def diffWaysToCompute(self, input): FILE: algorithms/python/FibonacciNumber/fib.py function fib1 (line 4) | def fib1(self, N): function fib2 (line 14) | def fib2(self, N): function fib3 (line 21) | def fib3(self, N): FILE: algorithms/python/FindDuplicateSubtrees/findDuplicateSubtrees.py function findDuplicateSubtrees (line 1) | def findDuplicateSubtrees(self, root): FILE: algorithms/python/FindTheDuplicateNumber/findDuplicate.py function findDuplicate (line 2) | def findDuplicate(self, nums): FILE: algorithms/python/FlattenBinaryTreeToLinkedList/flatten.py class Solution (line 1) | class Solution(object): method __init__ (line 2) | def __init__(self): method flatten (line 5) | def flatten(self, root): FILE: algorithms/python/FlipBinaryTreeToMatchPreorderTraversal/flipMatchVoyage.py function flipMatchVoyage (line 1) | def flipMatchVoyage(self, root, voyage): FILE: algorithms/python/FlipEquivalentBinaryTrees/flipEquiv.py function flipEquiv1 (line 6) | def flipEquiv1(self, root1, root2): function flipEquiv2 (line 26) | def flipEquiv2(self, root1, root2): FILE: algorithms/python/HappyNumber/isHappy.py function isHappy1 (line 3) | def isHappy1(self, n): function isHappy2 (line 14) | def isHappy2(self, n): FILE: algorithms/python/HouseRobber/rob.py function rob (line 1) | def rob(self, nums): FILE: algorithms/python/HouseRobberIII/rob.py function rob1 (line 6) | def rob1(self, root): function rob2 (line 23) | def rob2(self, root): FILE: algorithms/python/ImageSmoother/imageSmoother.py function imageSmoother (line 1) | def imageSmoother(self, M): FILE: algorithms/python/InsertionSortList/insertionSortList.py function insertionSortList (line 1) | def insertionSortList(self, head): FILE: algorithms/python/K-diffPairsInAnArray/findPairs.py function findPairs (line 1) | def findPairs(self, nums, k): FILE: algorithms/python/KthSmallestElementInABST/kthSmallest.py function kthSmallest1 (line 2) | def kthSmallest1(self, root, k): function kthSmallest2 (line 14) | def kthSmallest2(self, root, k): FILE: algorithms/python/LargestNumberAtLeastTwiceOfOthers/dominantIndex.py function dominantIndex (line 1) | def dominantIndex(self, nums): FILE: algorithms/python/LargestPerimeterTriangle/largestPerimeter.py function largestPerimeter (line 1) | def largestPerimeter(self, A): FILE: algorithms/python/LinkedListCycleII/detectCycle.py function detectCycle (line 1) | def detectCycle(self, head): FILE: algorithms/python/LongestConsecutiveSequence/LongestConsecutive.py function longestConsecutive (line 1) | def longestConsecutive(self, nums): FILE: algorithms/python/LongestContinuousIncreasingSubsequence/findLengthOfLCIS.py function findLengthOfLCIS (line 1) | def findLengthOfLCIS(self, nums): FILE: algorithms/python/LongestTurbulentSubarray/maxTurbulenceSize.py function maxTurbulenceSize (line 1) | def maxTurbulenceSize(self, A): FILE: algorithms/python/LongestUnivaluePath/longestUnivaluePath.py function longestUnivaluePath (line 1) | def longestUnivaluePath(self, root): FILE: algorithms/python/LowestCommonAncestorOfABinarySearchTree/lowestCommonAncestor.py function lowestCommonAncestor (line 3) | def lowestCommonAncestor(self, root, p, q): FILE: algorithms/python/LowestCommonAncestorOfABinaryTree/lowestCommonAncestor.py function lowestCommonAncestor (line 1) | def lowestCommonAncestor(self, root, p, q): FILE: algorithms/python/MaximizeDistanceToClosestPerson/maxDistToClosest.py function maxDistToClosest (line 1) | def maxDistToClosest(self, seats): FILE: algorithms/python/MaximumAverageSubarrayI/findMaxAverage.py function findMaxAverage (line 3) | def findMaxAverage(self, nums, k): function findMaxAverage (line 16) | def findMaxAverage(self, nums, k): FILE: algorithms/python/MaximumProductOfThreeNumbers/maximumProduct.py function maximumProduct (line 3) | def maximumProduct(self, nums): function maximumProduct (line 8) | def maximumProduct(self, nums): FILE: algorithms/python/MaximumWidthOfBinaryTree/widthOfBinaryTree.py function widthOfBinaryTree (line 1) | def widthOfBinaryTree(self, root): FILE: algorithms/python/MiddleOfTheLinkedList/middleOfTheLinkedList.py class Solution (line 7) | class Solution: method middleNode (line 8) | def middleNode(self, head: ListNode) -> ListNode: FILE: algorithms/python/MinCostClimbingStairs/minCostClimbingStairs.py function minCostClimbingStairs (line 1) | def minCostClimbingStairs(self, cost): FILE: algorithms/python/Non-decreasingArray/checkPossibility.py function checkPossibility (line 1) | def checkPossibility(self, nums): FILE: algorithms/python/NumberOfIslands/numIslands.py function numIslands (line 1) | def numIslands(self, grid): FILE: algorithms/python/PancakeSorting/pancakeSort.py function pancakeSort (line 8) | def pancakeSort(self, A): FILE: algorithms/python/PartitionList/partition.py function partition (line 1) | def partition(self, head, x): FILE: algorithms/python/PathSumII/pathSum.py function pathSum (line 4) | def pathSum(self, root, sum): function pathSum (line 23) | def pathSum(self, root, sum): FILE: algorithms/python/PathSumIII/pathSum.py function pathSum (line 1) | def pathSum(self, root, target): FILE: algorithms/python/PopulatingNextRightPointersInEachNode/connect.py function connect (line 1) | def connect(self, root): FILE: algorithms/python/PopulatingNextRightPointersInEachNodeII/connect.py function connect (line 1) | def connect(self, root): FILE: algorithms/python/PositionsOfLargeGroups/largeGroupPositions.py function largeGroupPositions (line 1) | def largeGroupPositions(self, S): FILE: algorithms/python/PrintBinaryTree/printTree.py function printTree (line 4) | def printTree(self, root): FILE: algorithms/python/RedundantConnection/findRedundantConnection.py function findRedundantConnection (line 8) | def findRedundantConnection(self, edges): FILE: algorithms/python/RemoveDuplicatesFromSortedListII/deleteDuplicates.py function deleteDuplicates (line 1) | def deleteDuplicates(self, head): FILE: algorithms/python/RemoveNthNodeFromEndOfList/removeNthFromEnd.py function removeNthFromEnd (line 1) | def removeNthFromEnd(self, head, n): FILE: algorithms/python/ReorderList/reorderList.py function reorderList (line 1) | def reorderList(self, head): FILE: algorithms/python/RevealCardsInIncreasingOrder/deckRevealedIncreasing.py function deckRevealedIncreasing (line 1) | def deckRevealedIncreasing(self, deck): FILE: algorithms/python/ReverseLinkedListII/reverseBetween.py function reverseBetween (line 1) | def reverseBetween(self, head, m, n): FILE: algorithms/python/SearchA2DMatrixII/searchMatrix.py function searchMatrix1 (line 3) | def searchMatrix1(self, matrix, target): function searchMatrix2 (line 21) | def searchMatrix2(self, matrix, target): FILE: algorithms/python/SecondMinimumNodeInABinaryTree/findSecondMinimumValue.py function findSecondMinimumValue (line 6) | def findSecondMinimumValue(self, root): FILE: algorithms/python/SerializeAndDeserializeBST/serialize.py class Codec (line 1) | class Codec: method serialize (line 3) | def serialize(self, root): method deserialize (line 15) | def deserialize(self, data): FILE: algorithms/python/ShortestUnsortedContinuousSubarray/findUnsortedSubarray.py function findUnsortedSubarray (line 1) | def findUnsortedSubarray(self, nums): FILE: algorithms/python/SingleNumberII/SingleNumberII.py function singleNumber (line 1) | def singleNumber(self, nums): FILE: algorithms/python/SortList/sortList.py function sortList (line 3) | def sortList(self, head): function mergeSorted (line 10) | def mergeSorted(self, a, b): function split (line 26) | def split(self, node): FILE: algorithms/python/SquaresOfSortedArray/sortedSquares.py function sortedSquares (line 1) | def sortedSquares(self, A): FILE: algorithms/python/Subsets/subsets.py function subsets (line 1) | def subsets(self, nums): FILE: algorithms/python/SubtreeOfAnotherTree/isSubtree.py function isSubtree (line 1) | def isSubtree(self, s, t): function check (line 10) | def check(self, first, second): FILE: algorithms/python/SumOfLeftLeaves/sumOfLeftLeaves.py function sumOfLeftLeaves (line 6) | def sumOfLeftLeaves(self, root): FILE: algorithms/python/SumRootToLeafNumbers/sumNumbers.py function sumNumbers (line 4) | def sumNumbers(self, root): function sumNumbers (line 22) | def sumNumbers(self, root): function helper (line 25) | def helper(self, node, s): FILE: algorithms/python/SwimInRisingWater/swim_in_rising_water.py class Solution (line 11) | class Solution: method swimInWater (line 12) | def swimInWater(self, grid: List[List[int]]) -> int: method check_bounds (line 33) | def check_bounds(self, r, c, grid) -> bool: FILE: algorithms/python/ThirdMaximumNumber/thirdMax.py function thirdMax (line 1) | def thirdMax(self, nums): FILE: algorithms/python/UniqueBinarySearchTrees/numTrees.py function numTrees (line 1) | def numTrees(self, n): FILE: algorithms/python/UniqueBinarySearchTreesII/generateTrees.py function generateTrees (line 1) | def generateTrees(self, n): FILE: algorithms/python/ValidMountainArray/validMountainArray.py function validMountainArray (line 3) | def validMountainArray(self, A): function validMountainArray (line 16) | def validMountainArray(self, A): FILE: algorithms/python/ValidateBinarySearchTree/isValidBST.py function isValidBST1 (line 3) | def isValidBST1(self, root, lower = float('-inf'), upper = float('inf')): function isValidBST2 (line 15) | def isValidBST2(self, root): FILE: algorithms/python/XOfAKindInADeckOfCards/hasGroupsSizeX.py function hasGroupsSizeX (line 3) | def hasGroupsSizeX(self, deck): function hasGroupsSizeX (line 12) | def hasGroupsSizeX(self, deck): FILE: algorithms/python/firstMissingPositive/firstMissingPositive.py class Solution (line 18) | class Solution: method firstMissingPositive (line 19) | def firstMissingPositive(self, nums: [int]) -> int: FILE: algorithms/python/jumpGame/jumpGame.py class Solution (line 21) | class Solution: method canJump (line 22) | def canJump(self, nums: List[int]) -> bool: FILE: algorithms/python/uniquePaths/uniquePathsIII.py class Solution (line 41) | class Solution: method findPathNum (line 43) | def findPathNum(self, i, j, grid: List[List[int]], curLen, pLen)->None: method uniquePathsIII (line 63) | def uniquePathsIII(self, grid: List[List[int]]) -> int: