SYMBOL INDEX (5055 symbols across 1919 files) FILE: .github/scripts/update_leetcode.cjs function updateLeetCodeCard (line 8) | async function updateLeetCodeCard() { FILE: C++/0002-add-two-numbers.cpp class Solution (line 11) | class Solution { method ListNode (line 13) | ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { FILE: C++/0003-longest-substring-without-repeating-characters.cpp class Solution (line 1) | class Solution { method lengthOfLongestSubstring (line 3) | int lengthOfLongestSubstring(string s) { FILE: C++/0009-palindrome-number.cpp class Solution (line 1) | class Solution method isPalindrome (line 4) | bool isPalindrome(int x) FILE: C++/0013-roman-to-integer.cpp class Solution (line 1) | class Solution method romanToInt (line 4) | int romanToInt(string s) FILE: C++/0014-longest-common-prefix.cpp class Solution (line 1) | class Solution method string (line 4) | string longestCommonPrefix(vector &strs) FILE: C++/0015-3sum.cpp class Solution (line 1) | class Solution { method twoSumII (line 2) | void twoSumII(vector& nums, int i, vector>& res) { method threeSum (line 18) | vector> threeSum(vector& nums) { FILE: C++/0019-remove-nth-node-from-end-of-list.cpp class Solution (line 11) | class Solution { method ListNode (line 13) | ListNode *removeNthFromEnd(ListNode *head, int n) { FILE: C++/0020-valid-parentheses.cpp class Solution (line 1) | class Solution method isValid (line 4) | bool isValid(string s) FILE: C++/0021-merge-two-sorted-lists.cpp class Solution (line 11) | class Solution { method ListNode (line 13) | ListNode* mergeTwoLists(ListNode* list1, ListNode* list2) { FILE: C++/0035-search-insert-position.cpp class Solution (line 1) | class Solution method searchInsert (line 4) | int searchInsert(vector &nums, int target) FILE: C++/0036-valid-sudoku.cpp class Solution (line 1) | class Solution { method checkRow (line 2) | bool checkRow(vector> &board, int row) { method checkCol (line 14) | bool checkCol(vector> &board, int col) { method checkBox (line 26) | bool checkBox(vector> &board, int row, int col) { method isValidSudoku (line 42) | bool isValidSudoku(vector> &board) { FILE: C++/0045-jump-game-ii.cpp class Solution (line 1) | class Solution { method jump (line 3) | int jump(vector& nums) { FILE: C++/0046-permutations.cpp class Solution (line 1) | class Solution { method permute (line 3) | vector> permute(vector& num) { method permuteDFS (line 9) | void permuteDFS(vector& num, int level, vector& visited, FILE: C++/0048-rotate-image.cpp class Solution (line 1) | class Solution { method rotate (line 3) | void rotate(vector>& matrix) { method transpose (line 8) | void transpose(vector>& matrix) { method reflect (line 19) | void reflect(vector>& matrix) { FILE: C++/0054-spiral-matrix.cpp class Solution (line 1) | class Solution { method spiralOrder (line 3) | vector spiralOrder(vector>& matrix) { FILE: C++/0055-jump-game.cpp class Solution (line 1) | class Solution { method canJump (line 3) | bool canJump(vector& nums) { FILE: C++/0056-merge-intervals.cpp class Solution (line 1) | class Solution { method merge (line 3) | vector> merge(vector>& intervals) { FILE: C++/0059-spiral-matrix-ii.cpp class Solution (line 1) | class Solution { method generateMatrix (line 3) | vector> generateMatrix(int n) { FILE: C++/0070-climbing-stairs.cpp class Solution (line 1) | class Solution { method climbStairs (line 3) | int climbStairs(int n) { FILE: C++/0074-search-a-2d-matrix.cpp class Solution (line 1) | class Solution { method searchMatrix (line 3) | bool searchMatrix(vector> &matrix, int target) { FILE: C++/0075-sort-colors.cpp class Solution (line 1) | class Solution { method swap (line 2) | void swap(int *a, int *b) { method Partition (line 7) | int Partition(vector & arr, int front, int end) { method QuickSort (line 20) | void QuickSort(vector &arr, int front, int end) { method sortColors (line 29) | void sortColors(vector &nums) { FILE: C++/0077-combinations.cpp class Solution (line 1) | class Solution { method findCombination (line 5) | void findCombination(int start, vector &row) { method combine (line 21) | vector> combine(int n, int k) { FILE: C++/0083-remove-duplicates-from-sorted-list.cpp class Solution (line 11) | class Solution { method ListNode (line 13) | ListNode* deleteDuplicates(ListNode* head) { FILE: C++/0088-merge-sorted-array.cpp class Solution (line 1) | class Solution method merge (line 4) | void merge(vector &nums1, int m, vector &nums2, int n) FILE: C++/0094-binary-tree-inorder-traversal.cpp class Solution (line 12) | class Solution { method inorderTraversal (line 13) | void inorderTraversal(TreeNode *root, vector &ans) { method inorderTraversal (line 21) | vector inorderTraversal(TreeNode *root) { FILE: C++/0098-validate-binary-search-tree.cpp class Solution (line 12) | class Solution { method isValidBST (line 14) | bool isValidBST(TreeNode *root, TreeNode *min = NULL, TreeNode *max = ... FILE: C++/0101-symmetric-tree.cpp class Solution (line 12) | class Solution { method isMirror (line 13) | bool isMirror(TreeNode *t1, TreeNode *t2) { method isSymmetric (line 21) | bool isSymmetric(TreeNode *root) { return isMirror(root, root); } FILE: C++/0102-binary-tree-level-order-traversal.cpp class Solution (line 12) | class Solution { method levelOrder (line 14) | vector> levelOrder(TreeNode *root) { FILE: C++/0104-maximum-depth-of-binary-tree.cpp class Solution (line 12) | class Solution { method maxDepth (line 14) | int maxDepth(TreeNode *root) { FILE: C++/0112-path-sum.cpp class Solution (line 12) | class Solution { method hasPathSum (line 14) | bool hasPathSum(TreeNode *root, int targetSum) { FILE: C++/0116-populating-next-right-pointers-in-each-node.cpp class Solution (line 19) | class Solution { method Node (line 21) | Node* connect(Node* root) { FILE: C++/0118-pascals-triangle.cpp class Solution (line 1) | class Solution method generate (line 4) | vector > generate(int numRows) FILE: C++/0119-pascals-triangle-ii.cpp class Solution (line 1) | class Solution { method getRow (line 3) | vector getRow(int rowIndex) { FILE: C++/0120-triangle.cpp class Solution (line 1) | class Solution { method minimumTotal (line 3) | int minimumTotal(vector>& triangle) { FILE: C++/0121-best-time-to-buy-and-sell-stock.cpp class Solution (line 1) | class Solution method maxProfit (line 4) | int maxProfit(vector &prices) FILE: C++/0136-single-number.cpp class Solution (line 1) | class Solution { method singleNumber (line 3) | int singleNumber(vector& nums) { FILE: C++/0141-linked-list-cycle.cpp class Solution (line 9) | class Solution { method hasCycle (line 11) | bool hasCycle(ListNode* head) { FILE: C++/0144-binary-tree-preorder-traversal.cpp class Solution (line 12) | class Solution { method preorderTraversal (line 13) | void preorderTraversal(TreeNode *root, vector &ans) { method preorderTraversal (line 21) | vector preorderTraversal(TreeNode *root) { FILE: C++/0145-binary-tree-postorder-traversal.cpp class Solution (line 12) | class Solution { method postorderTraversal (line 13) | void postorderTraversal(TreeNode *root, vector &ans) { method postorderTraversal (line 21) | vector postorderTraversal(TreeNode *root) { FILE: C++/0167-two-sum-ii-input-array-is-sorted.cpp class Solution (line 1) | class Solution method twoSum (line 4) | vector twoSum(vector &nums, int target) FILE: C++/0169-majority-element.cpp class Solution (line 1) | class Solution { method majorityElement (line 3) | int majorityElement(vector& nums) { FILE: C++/0189-rotate-array.cpp class Solution (line 1) | class Solution method rotate (line 4) | void rotate(vector &nums, int k) FILE: C++/0190-reverse-bits.cpp class Solution (line 1) | class Solution { method reverseBits (line 3) | uint32_t reverseBits(uint32_t n) { FILE: C++/0191-number-of-1-bits.cpp class Solution (line 1) | class Solution { method hammingWeight (line 3) | int hammingWeight(uint32_t n) { FILE: C++/0198-house-robber.cpp class Solution (line 1) | class Solution { method rob (line 3) | int rob(vector& nums) { FILE: C++/0203-remove-linked-list-elements.cpp class Solution (line 11) | class Solution { method ListNode (line 13) | ListNode* removeElements(ListNode* head, int val) { FILE: C++/0206-reverse-linked-list.cpp class Solution (line 11) | class Solution { method ListNode (line 13) | ListNode* reverseList(ListNode* head) { FILE: C++/0213-house-robber-ii.cpp class Solution (line 1) | class Solution { method rob_simple (line 2) | int rob_simple(vector& nums, int start, int end) { method rob (line 15) | int rob(vector& nums) { FILE: C++/0217-contains-duplicate.cpp class Solution (line 1) | class Solution method containsDuplicate (line 4) | bool containsDuplicate(vector &nums) FILE: C++/0231-power-of-two.cpp class Solution (line 1) | class Solution { method isPowerOfTwo (line 3) | bool isPowerOfTwo(int n) { FILE: C++/0232-implement-queue-using-stacks.cpp class MyQueue (line 1) | class MyQueue { method push (line 6) | void push(int x) { stack_q.push(x); } method pop (line 7) | int pop() { method peek (line 18) | int peek() { method empty (line 31) | bool empty() { FILE: C++/0235-lowest-common-ancestor-of-a-binary-search-tree.cpp class Solution (line 11) | class Solution { method TreeNode (line 13) | TreeNode *lowestCommonAncestor(TreeNode *root, TreeNode *p, TreeNode *... FILE: C++/0242-valid-anagram.cpp class Solution (line 1) | class Solution { method isAnagram (line 3) | bool isAnagram(string s, string t) { FILE: C++/0278-first-bad-version.cpp class Solution (line 4) | class Solution method firstBadVersion (line 7) | int firstBadVersion(int n) FILE: C++/0283-move-zeroes.cpp class Solution (line 1) | class Solution method moveZeroes (line 4) | void moveZeroes(vector &nums) FILE: C++/0344-reverse-string.cpp class Solution (line 1) | class Solution { method reverseString (line 3) | void reverseString(vector& s) { FILE: C++/0350-intersection-of-two-arrays-ii.cpp class Solution (line 1) | class Solution method intersect (line 4) | vector intersect(vector &nums1, vector &nums2) FILE: C++/0383-ransom-note.cpp class Solution (line 1) | class Solution { method canConstruct (line 3) | bool canConstruct(string ransomNote, string magazine) { FILE: C++/0387-first-unique-character-in-a-string.cpp class Solution (line 1) | class Solution { method firstUniqChar (line 3) | int firstUniqChar(string s) { FILE: C++/0509-fibonacci-number.cpp class Solution (line 1) | class Solution { method fib (line 3) | int fib(int n) { FILE: C++/0542-01-matrix.cpp class Solution (line 1) | class Solution { method updateMatrix (line 3) | vector> updateMatrix(vector>& matrix) { FILE: C++/0557-reverse-words-in-a-string-iii.cpp class Solution (line 1) | class Solution { method reverseString (line 2) | void reverseString(vector& s) { method string (line 12) | string reverseWords(string s) { FILE: C++/0566-reshape-the-matrix.cpp class Solution (line 1) | class Solution method matrixReshape (line 4) | vector > matrixReshape(vector > &nums, int r, ... FILE: C++/0567-permutation-in-string.cpp class Solution (line 1) | class Solution { method matches (line 2) | bool matches(int map1[],int map2[]){ method checkInclusion (line 11) | bool checkInclusion(string s1, string s2) { FILE: C++/0617-merge-two-binary-trees.cpp class Solution (line 12) | class Solution { method TreeNode (line 14) | TreeNode *mergeTrees(TreeNode *root1, TreeNode *root2) { FILE: C++/0653-two-sum-iv-input-is-a-bst.cpp class Solution (line 12) | class Solution { method Inorder (line 13) | void Inorder(TreeNode *current, vector &output) { method findTarget (line 23) | bool findTarget(TreeNode *root, int k) { FILE: C++/0695-max-area-of-island.cpp class Solution (line 1) | class Solution { method findPath (line 2) | int findPath(vector>& grid, int x, int y) { method maxAreaOfIsland (line 24) | int maxAreaOfIsland(vector>& grid) { FILE: C++/0700-search-in-a-binary-search-tree.cpp class Solution (line 12) | class Solution { method TreeNode (line 14) | TreeNode *searchBST(TreeNode *root, int val) { FILE: C++/0701-insert-into-a-binary-search-tree.cpp class Solution (line 12) | class Solution { method TreeNode (line 14) | TreeNode *insertIntoBST(TreeNode *root, int val) { FILE: C++/0704-binary-search.cpp class Solution (line 1) | class Solution method search (line 4) | int search(vector &nums, int target) FILE: C++/0706-design-hashmap.cpp class MyHashMap (line 1) | class MyHashMap { method hash (line 3) | int hash(int key) { return key % size; } method myFind (line 5) | list>::iterator myFind(int index, int key) { method MyHashMap (line 11) | MyHashMap() : myhashmap(size, list>()) {} method put (line 12) | void put(int key, int value) { method get (line 21) | int get(int key) { method remove (line 30) | void remove(int key) { FILE: C++/0733-flood-fill.cpp class Solution (line 1) | class Solution { method floodFill (line 3) | vector> floodFill(vector>& image, int sr, int ... FILE: C++/0746-min-cost-climbing-stairs.cpp class Solution (line 1) | class Solution { method minCostClimbingStairs (line 3) | int minCostClimbingStairs(vector& cost) { FILE: C++/0784-letter-case-permutation.cpp class Solution (line 1) | class Solution { method letterCasePermutation (line 3) | vector letterCasePermutation(string S) { FILE: C++/0876-middle-of-the-linked-list.cpp class Solution (line 11) | class Solution { method ListNode (line 13) | ListNode* middleNode(ListNode* head) { FILE: C++/0977-squares-of-a-sorted-array.cpp class Solution (line 1) | class Solution method sortedSquares (line 4) | vector sortedSquares(vector &nums) FILE: C++/0994-rotting-oranges.cpp class Solution (line 1) | class Solution { method orangesRotting (line 3) | int orangesRotting(vector>& grid) { FILE: C++/1137-n-th-tribonacci-number.cpp class Solution (line 1) | class Solution { method tribonacci (line 3) | int tribonacci(int n) { FILE: C++/1265-print-immutable-linked-list-in-reverse.cpp class Solution (line 11) | class Solution method printLinkedListInReverse (line 14) | void printLinkedListInReverse(ImmutableListNode *head) FILE: C++/1920-build-array-from-permutation.cpp class Solution (line 1) | class Solution method buildArray (line 4) | vector buildArray(vector &nums) FILE: JavaScript/0094-binary-tree-inorder-traversal.js function inorder (line 17) | function inorder(node) { FILE: JavaScript/0104-maximum-depth-of-binary-tree.js function longestPath (line 14) | function longestPath(node) { FILE: JavaScript/0144-binary-tree-preorder-traversal.js function preorder (line 15) | function preorder(node) { FILE: JavaScript/0145-binary-tree-postorder-traversal.js function postorder (line 15) | function postorder(node) { FILE: JavaScript/0226-invert-binary-tree.js function TreeNode (line 2) | function TreeNode(val, left, right) { function printBinaryTree (line 29) | function printBinaryTree(root) { FILE: JavaScript/0572-subtree-of-another-tree.js function isSameTree (line 15) | function isSameTree(root1, root2) { function dfs (line 28) | function dfs(node) { FILE: JavaScript/2621-sleep.js function sleep (line 4) | async function sleep(millis) { FILE: JavaScript/2623-memoize.js function memoize (line 4) | function memoize(fn) { FILE: JavaScript/2636-promise-pool.js function helper (line 10) | function helper() { FILE: JavaScript/2694-event-emitter.js class EventEmitter (line 1) | class EventEmitter { method constructor (line 2) | constructor() { method subscribe (line 6) | subscribe(event, cb) { method emit (line 21) | emit(event, args = []) { FILE: JavaScript/2705-compact-object.js function dfs (line 2) | function dfs(obj) { FILE: JavaScript/2726-calculator-with-method-chaining.js class Calculator (line 1) | class Calculator { method constructor (line 2) | constructor(value) { method add (line 5) | add(value) { method subtract (line 9) | subtract(value) { method multiply (line 13) | multiply(value) { method divide (line 17) | divide(value) { method power (line 22) | power(value) { method getResult (line 26) | getResult() { FILE: Python/0001-two-sum.py class Solution (line 7) | class Solution: method twoSum (line 8) | def twoSum(self, nums: List[int], target: int) -> List[int]: method twoSum (line 19) | def twoSum(self, nums: List[int], target: int) -> List[int]: method twoSum (line 34) | def twoSum(self, nums: List[int], target: int) -> List[List[int]]: class Solution (line 18) | class Solution(object): method twoSum (line 8) | def twoSum(self, nums: List[int], target: int) -> List[int]: method twoSum (line 19) | def twoSum(self, nums: List[int], target: int) -> List[int]: method twoSum (line 34) | def twoSum(self, nums: List[int], target: int) -> List[List[int]]: class Solution (line 33) | class Solution(object): method twoSum (line 8) | def twoSum(self, nums: List[int], target: int) -> List[int]: method twoSum (line 19) | def twoSum(self, nums: List[int], target: int) -> List[int]: method twoSum (line 34) | def twoSum(self, nums: List[int], target: int) -> List[List[int]]: FILE: Python/0002-add-two-numbers.py class Solution (line 7) | class Solution: method addTwoNumbers (line 8) | def addTwoNumbers(self, l1: Optional[ListNode], l2: Optional[ListNode]... FILE: Python/0003-longest-substring-without-repeating-characters.py class Solution (line 6) | class Solution: method lengthOfLongestSubstring (line 7) | def lengthOfLongestSubstring(self, s: str) -> int: FILE: Python/0004-median-of-two-sorted-arrays.py class Solution (line 6) | class Solution: method findMedianSortedArrays (line 7) | def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -... method findMedianSortedArrays (line 39) | def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -... class Solution (line 38) | class Solution: method findMedianSortedArrays (line 7) | def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -... method findMedianSortedArrays (line 39) | def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -... FILE: Python/0005-longest-palindromic-substring.py class Solution (line 4) | class Solution: method longestPalindrome (line 5) | def longestPalindrome(self, s: str) -> str: method longestPalindrome (line 36) | def longestPalindrome(self, s: str) -> str: method longestPalindrome (line 56) | def longestPalindrome(self, s: str) -> str: class Solution (line 35) | class Solution: method longestPalindrome (line 5) | def longestPalindrome(self, s: str) -> str: method longestPalindrome (line 36) | def longestPalindrome(self, s: str) -> str: method longestPalindrome (line 56) | def longestPalindrome(self, s: str) -> str: class Solution (line 55) | class Solution: method longestPalindrome (line 5) | def longestPalindrome(self, s: str) -> str: method longestPalindrome (line 36) | def longestPalindrome(self, s: str) -> str: method longestPalindrome (line 56) | def longestPalindrome(self, s: str) -> str: FILE: Python/0006-zigzag-conversion.py class Solution (line 3) | class Solution: method convert (line 4) | def convert(self, s: str, numRows: int) -> str: FILE: Python/0007-reverse-integer.py class Solution (line 3) | class Solution: method reverse (line 4) | def reverse(self, x: int) -> int: FILE: Python/0008-string-to-integer-atoi.py class Solution (line 1) | class Solution: method myAtoi (line 2) | def myAtoi(self, s: str) -> int: FILE: Python/0010-regular-expression-matching.py class Solution (line 6) | class Solution(object): method isMatch (line 7) | def isMatch(self, text: str, pattern: str) -> bool: method isMatch (line 19) | def isMatch(self, text: str, pattern: str) -> bool: method isMatch (line 38) | def isMatch(self, text: str, pattern: str) -> bool: class Solution (line 18) | class Solution(object): method isMatch (line 7) | def isMatch(self, text: str, pattern: str) -> bool: method isMatch (line 19) | def isMatch(self, text: str, pattern: str) -> bool: method isMatch (line 38) | def isMatch(self, text: str, pattern: str) -> bool: class Solution (line 37) | class Solution(object): method isMatch (line 7) | def isMatch(self, text: str, pattern: str) -> bool: method isMatch (line 19) | def isMatch(self, text: str, pattern: str) -> bool: method isMatch (line 38) | def isMatch(self, text: str, pattern: str) -> bool: FILE: Python/0011-container-with-most-water.py class Solution (line 6) | class Solution: method maxArea (line 7) | def maxArea(self, height: List[int]) -> int: FILE: Python/0012-integer-to-roman.py class Solution (line 3) | class Solution: method intToRoman (line 4) | def intToRoman(self, num: int) -> str: FILE: Python/0013-roman-to-integer.py class Solution (line 3) | class Solution: method romanToInt (line 4) | def romanToInt(self, s: str) -> int: FILE: Python/0014-longest-common-prefix.py class TrieNode (line 6) | class TrieNode: method __init__ (line 7) | def __init__(self, char=""): class Trie (line 13) | class Trie: method __init__ (line 14) | def __init__(self): method insert (line 17) | def insert(self, word): class Solution (line 26) | class Solution: method longestCommonPrefix (line 27) | def longestCommonPrefix(self, strs: List[str]) -> str: FILE: Python/0015-3sum.py class Solution (line 6) | class Solution: method twoSumII (line 7) | def twoSumII(self, i: int, nums: List[int], result: List[List[int]]): method twoSumI (line 22) | def twoSumI(self, nums: List[int], left: int, result: List[List[int]]): method threeSum (line 34) | def threeSum(self, nums: List[int]) -> List[List[int]]: method threeSum (line 47) | def threeSum(self, nums: List[int]) -> List[List[int]]: class Solution (line 46) | class Solution: method twoSumII (line 7) | def twoSumII(self, i: int, nums: List[int], result: List[List[int]]): method twoSumI (line 22) | def twoSumI(self, nums: List[int], left: int, result: List[List[int]]): method threeSum (line 34) | def threeSum(self, nums: List[int]) -> List[List[int]]: method threeSum (line 47) | def threeSum(self, nums: List[int]) -> List[List[int]]: FILE: Python/0016-3sum-closest.py class Solution (line 6) | class Solution: method threeSumClosest (line 7) | def threeSumClosest(self, nums: List[int], target: int) -> int: FILE: Python/0017-letter-combinations-of-a-phone-number.py class Solution (line 6) | class Solution: method letterCombinations (line 7) | def letterCombinations(self, digits: str) -> List[str]: FILE: Python/0018-4sum.py class Solution (line 6) | class Solution: method fourSum (line 7) | def fourSum(self, nums: List[int], target: int) -> List[List[int]]: FILE: Python/0019-remove-nth-node-from-end-of-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method removeNthFromEnd (line 13) | def removeNthFromEnd(self, head: Optional[ListNode], n: int) -> Option... FILE: Python/0020-valid-parentheses.py class Solution (line 3) | class Solution: method isValid (line 4) | def isValid(self, s: str) -> bool: method isValid (line 18) | def isValid(self, s: str) -> bool: class Solution (line 17) | class Solution: method isValid (line 4) | def isValid(self, s: str) -> bool: method isValid (line 18) | def isValid(self, s: str) -> bool: FILE: Python/0021-merge-two-sorted-lists.py class ListNode (line 2) | class ListNode(object): method __init__ (line 3) | def __init__(self, val=0, next=None): class Solution (line 8) | class Solution(object): method mergeTwoLists (line 9) | def mergeTwoLists(self, list1, list2): FILE: Python/0022-generate-parentheses.py class Solution (line 6) | class Solution: method generateParenthesis (line 7) | def generateParenthesis(self, n: int) -> List[str]: FILE: Python/0023-merge-k-sorted-lists.py class ListNode (line 5) | class ListNode: method __init__ (line 6) | def __init__(self, val=0, next=None): class Solution (line 11) | class Solution: method mergeKLists (line 12) | def mergeKLists(self, lists: List[Optional[ListNode]]) -> Optional[Lis... FILE: Python/0024-swap-nodes-in-pairs.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method swapPairs (line 13) | def swapPairs(self, head: Optional[ListNode]) -> Optional[ListNode]: FILE: Python/0025-reverse-nodes-in-k-group.py class ListNode (line 3) | class ListNode: method __init__ (line 4) | def __init__(self, val=0, next=None): class Solution (line 9) | class Solution: method reverseKGroup (line 10) | def reverseKGroup(self, head: ListNode, k: int) -> ListNode: FILE: Python/0026-remove-duplicates-from-sorted-array.py class Solution (line 5) | class Solution: method removeDuplicates (line 6) | def removeDuplicates(self, nums: List[int]) -> int: FILE: Python/0027-remove-element.py class Solution (line 4) | class Solution: method removeElement (line 5) | def removeElement(self, nums: List[int], val: int) -> int: FILE: Python/0028-find-the-index-of-the-first-occurrence-in-a-string.py class Solution (line 3) | class Solution: method strStr (line 4) | def strStr(self, haystack: str, needle: str) -> int: FILE: Python/0029-divide-two-integers.py class Solution (line 4) | class Solution: method divide (line 5) | def divide(self, dividend: int, divisor: int) -> int: FILE: Python/0030-substring-with-concatenation-of-all-words.py class Solution (line 7) | class Solution: method findSubstring (line 8) | def findSubstring(self, s: str, words: List[str]) -> List[int]: FILE: Python/0031-next-permutation.py class Solution (line 6) | class Solution: method nextPermutation (line 7) | def nextPermutation(self, nums: List[int]) -> None: FILE: Python/0032-longest-valid-parentheses.py class Solution (line 3) | class Solution: method longestValidParentheses (line 4) | def longestValidParentheses(self, s: str) -> int: FILE: Python/0033-search-in-rotated-sorted-array.py class Solution (line 6) | class Solution: method search (line 7) | def search(self, nums: List[int], target: int) -> int: FILE: Python/0034-find-first-and-last-position-of-element-in-sorted-array.py class Solution (line 7) | class Solution: method searchRange (line 8) | def searchRange(self, nums: List[int], target: int) -> List[int]: method searchRange (line 44) | def searchRange(self, nums: List[int], target: int) -> List[int]: method searchRange (line 55) | def searchRange(self, nums: List[int], target: int) -> List[int]: class Solution (line 43) | class Solution: method searchRange (line 8) | def searchRange(self, nums: List[int], target: int) -> List[int]: method searchRange (line 44) | def searchRange(self, nums: List[int], target: int) -> List[int]: method searchRange (line 55) | def searchRange(self, nums: List[int], target: int) -> List[int]: class Solution (line 54) | class Solution: method searchRange (line 8) | def searchRange(self, nums: List[int], target: int) -> List[int]: method searchRange (line 44) | def searchRange(self, nums: List[int], target: int) -> List[int]: method searchRange (line 55) | def searchRange(self, nums: List[int], target: int) -> List[int]: FILE: Python/0035-search-insert-position.py class Solution (line 6) | class Solution: method searchInsert (line 7) | def searchInsert(self, nums: List[int], target: int) -> int: FILE: Python/0036-valid-sudoku.py class Solution (line 6) | class Solution: method isValidSudoku (line 7) | def isValidSudoku(self, board: List[List[str]]) -> bool: FILE: Python/0037-sudoku-solver.py class Solution (line 7) | class Solution: method solveSudoku (line 8) | def solveSudoku(self, board: List[List[str]]) -> None: FILE: Python/0038-count-and-say.py class Solution (line 7) | class Solution: method RLE (line 8) | def RLE(self, countString: str): method countAndSay (line 26) | def countAndSay(self, n: int) -> str: FILE: Python/0039-combination-sum.py class Solution (line 6) | class Solution: method combinationSum (line 7) | def combinationSum(self, candidates: List[int], target: int) -> List[L... method combinationSum (line 28) | def combinationSum(self, nums: List[int], target: int) -> List[List[in... class Solution (line 27) | class Solution: method combinationSum (line 7) | def combinationSum(self, candidates: List[int], target: int) -> List[L... method combinationSum (line 28) | def combinationSum(self, nums: List[int], target: int) -> List[List[in... FILE: Python/0040-combination-sum-ii.py class Solution (line 6) | class Solution: method combinationSum2 (line 7) | def combinationSum2(self, candidates: List[int], target: int) -> List[... method backtrack (line 13) | def backtrack(self, candidates, target: int, totalIdx: int, path: List... FILE: Python/0041-first-missing-positive.py class Solution (line 6) | class Solution: method firstMissingPositive (line 7) | def firstMissingPositive(self, nums: List[int]) -> int: FILE: Python/0042-trapping-rain-water.py class Solution (line 6) | class Solution: method trap (line 7) | def trap(self, height: List[int]) -> int: FILE: Python/0043-multiply-strings.py class Solution (line 3) | class Solution: method multiply (line 4) | def multiply(self, num1: str, num2: str) -> str: FILE: Python/0044-wildcard-matching.py class Solution (line 3) | class Solution: method isMatch (line 4) | def isMatch(self, s: str, p: str) -> bool: method isMatch (line 36) | def isMatch(self, s: str, p: str) -> bool: method isMatch (line 66) | def isMatch(self, s: str, p: str) -> bool: class Solution (line 35) | class Solution: method isMatch (line 4) | def isMatch(self, s: str, p: str) -> bool: method isMatch (line 36) | def isMatch(self, s: str, p: str) -> bool: method isMatch (line 66) | def isMatch(self, s: str, p: str) -> bool: class Solution (line 65) | class Solution: method isMatch (line 4) | def isMatch(self, s: str, p: str) -> bool: method isMatch (line 36) | def isMatch(self, s: str, p: str) -> bool: method isMatch (line 66) | def isMatch(self, s: str, p: str) -> bool: FILE: Python/0045-jump-game-ii.py class Solution (line 5) | class Solution: method jump (line 6) | def jump(self, nums: List[int]) -> int: method jump (line 24) | def jump(self, nums: List[int]) -> int: method jump (line 47) | def jump(self, nums: List[int]) -> int: method jump (line 61) | def jump(self, nums: List[int]) -> int: method jump (line 78) | def jump(self, nums: List[int]) -> int: class Solution (line 23) | class Solution: method jump (line 6) | def jump(self, nums: List[int]) -> int: method jump (line 24) | def jump(self, nums: List[int]) -> int: method jump (line 47) | def jump(self, nums: List[int]) -> int: method jump (line 61) | def jump(self, nums: List[int]) -> int: method jump (line 78) | def jump(self, nums: List[int]) -> int: class Solution (line 46) | class Solution: method jump (line 6) | def jump(self, nums: List[int]) -> int: method jump (line 24) | def jump(self, nums: List[int]) -> int: method jump (line 47) | def jump(self, nums: List[int]) -> int: method jump (line 61) | def jump(self, nums: List[int]) -> int: method jump (line 78) | def jump(self, nums: List[int]) -> int: class Solution (line 60) | class Solution: method jump (line 6) | def jump(self, nums: List[int]) -> int: method jump (line 24) | def jump(self, nums: List[int]) -> int: method jump (line 47) | def jump(self, nums: List[int]) -> int: method jump (line 61) | def jump(self, nums: List[int]) -> int: method jump (line 78) | def jump(self, nums: List[int]) -> int: class Solution (line 77) | class Solution: method jump (line 6) | def jump(self, nums: List[int]) -> int: method jump (line 24) | def jump(self, nums: List[int]) -> int: method jump (line 47) | def jump(self, nums: List[int]) -> int: method jump (line 61) | def jump(self, nums: List[int]) -> int: method jump (line 78) | def jump(self, nums: List[int]) -> int: FILE: Python/0046-permutations.py class Solution (line 7) | class Solution: method permute (line 8) | def permute(self, nums: List[int]) -> List[List[int]]: FILE: Python/0047-permutations-ii.py class Solution (line 8) | class Solution: method permuteUnique (line 9) | def permuteUnique(self, nums: List[int]) -> List[List[int]]: method permuteUnique (line 31) | def permuteUnique(self, nums: List[int]) -> List[List[int]]: class Solution (line 30) | class Solution: method permuteUnique (line 9) | def permuteUnique(self, nums: List[int]) -> List[List[int]]: method permuteUnique (line 31) | def permuteUnique(self, nums: List[int]) -> List[List[int]]: FILE: Python/0048-rotate-image.py class Solution (line 5) | class Solution: method rotate (line 6) | def rotate(self, matrix: List[List[int]]) -> None: method rotate (line 20) | def rotate(self, matrix: List[List[int]]) -> None: method rotate (line 33) | def rotate(self, matrix: List[List[int]]) -> None: class Solution (line 19) | class Solution: method rotate (line 6) | def rotate(self, matrix: List[List[int]]) -> None: method rotate (line 20) | def rotate(self, matrix: List[List[int]]) -> None: method rotate (line 33) | def rotate(self, matrix: List[List[int]]) -> None: class Solution (line 32) | class Solution: method rotate (line 6) | def rotate(self, matrix: List[List[int]]) -> None: method rotate (line 20) | def rotate(self, matrix: List[List[int]]) -> None: method rotate (line 33) | def rotate(self, matrix: List[List[int]]) -> None: FILE: Python/0049-group-anagrams.py class Solution (line 7) | class Solution: method groupAnagrams (line 8) | def groupAnagrams(self, strs: List[str]) -> List[List[str]]: method groupAnagrams (line 18) | def groupAnagrams(self, strs: List[str]) -> List[List[str]]: class Solution (line 17) | class Solution: method groupAnagrams (line 8) | def groupAnagrams(self, strs: List[str]) -> List[List[str]]: method groupAnagrams (line 18) | def groupAnagrams(self, strs: List[str]) -> List[List[str]]: FILE: Python/0050-powx-n.py class Solution (line 6) | class Solution: method myPow (line 7) | def myPow(self, x: float, n: int) -> float: method myPow (line 25) | def myPow(self, x: float, n: int) -> float: class Solution (line 24) | class Solution: method myPow (line 7) | def myPow(self, x: float, n: int) -> float: method myPow (line 25) | def myPow(self, x: float, n: int) -> float: FILE: Python/0051-n-queens.py class Solution (line 6) | class Solution: method solveNQueens (line 7) | def solveNQueens(self, n: int) -> List[List[str]]: FILE: Python/0052-n-queens-ii.py class Solution (line 6) | class Solution: method totalNQueens (line 7) | def totalNQueens(self, n: int) -> int: FILE: Python/0053-maximum-subarray.py class Solution (line 6) | class Solution: method maxSubArray (line 7) | def maxSubArray(self, nums: List[int]) -> int: method maxSubArray (line 19) | def maxSubArray(self, nums: List[int]) -> int: class Solution (line 18) | class Solution: method maxSubArray (line 7) | def maxSubArray(self, nums: List[int]) -> int: method maxSubArray (line 19) | def maxSubArray(self, nums: List[int]) -> int: FILE: Python/0054-spiral-matrix.py class Solution (line 6) | class Solution: method spiralOrder (line 7) | def spiralOrder(self, matrix: List[List[int]]) -> List[int]: FILE: Python/0055-jump-game.py class Solution (line 6) | class Solution: method canJump (line 7) | def canJump(self, nums: List[int]) -> bool: method canJump (line 17) | def canJump(self, nums: List[int]) -> bool: class Solution (line 16) | class Solution: method canJump (line 7) | def canJump(self, nums: List[int]) -> bool: method canJump (line 17) | def canJump(self, nums: List[int]) -> bool: FILE: Python/0056-merge-intervals.py class Solution (line 6) | class Solution: method merge (line 7) | def merge(self, intervals: List[List[int]]) -> List[List[int]]: FILE: Python/0057-insert-interval.py class Solution (line 6) | class Solution: method insert (line 7) | def insert(self, intervals: List[List[int]], newInterval: List[int]) -... method insert (line 28) | def insert(self, intervals: List[List[int]], newInterval: List[int]) -... class Solution (line 27) | class Solution: method insert (line 7) | def insert(self, intervals: List[List[int]], newInterval: List[int]) -... method insert (line 28) | def insert(self, intervals: List[List[int]], newInterval: List[int]) -... FILE: Python/0058-length-of-last-word.py class Solution (line 1) | class Solution: method lengthOfLastWord (line 2) | def lengthOfLastWord(self, s: str) -> int: FILE: Python/0059-spiral-matrix-ii.py class Solution (line 6) | class Solution: method generateMatrix (line 7) | def generateMatrix(self, n: int) -> List[List[int]]: FILE: Python/0061-rotate-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method rotateRight (line 13) | def rotateRight(self, head: Optional[ListNode], k: int) -> Optional[Li... FILE: Python/0062-unique-paths.py class Solution (line 7) | class Solution: method uniquePaths (line 9) | def uniquePaths(self, m: int, n: int) -> int: method uniquePaths (line 16) | def uniquePaths(self, r: int, c: int) -> int: method uniquePaths (line 28) | def uniquePaths(self, m: int, n: int) -> int: class Solution (line 15) | class Solution: method uniquePaths (line 9) | def uniquePaths(self, m: int, n: int) -> int: method uniquePaths (line 16) | def uniquePaths(self, r: int, c: int) -> int: method uniquePaths (line 28) | def uniquePaths(self, m: int, n: int) -> int: class Solution (line 27) | class Solution: method uniquePaths (line 9) | def uniquePaths(self, m: int, n: int) -> int: method uniquePaths (line 16) | def uniquePaths(self, r: int, c: int) -> int: method uniquePaths (line 28) | def uniquePaths(self, m: int, n: int) -> int: FILE: Python/0063-unique-paths-ii.py class Solution (line 7) | class Solution: method uniquePathsWithObstacles (line 8) | def uniquePathsWithObstacles(self, obstacleGrid: List[List[int]]) -> int: method uniquePathsWithObstacles (line 24) | def uniquePathsWithObstacles(self, obstacleGrid: List[List[int]]) -> int: class Solution (line 23) | class Solution: method uniquePathsWithObstacles (line 8) | def uniquePathsWithObstacles(self, obstacleGrid: List[List[int]]) -> int: method uniquePathsWithObstacles (line 24) | def uniquePathsWithObstacles(self, obstacleGrid: List[List[int]]) -> int: FILE: Python/0064-minimum-path-sum.py class Solution (line 6) | class Solution: method minPathSum (line 7) | def minPathSum(self, grid: List[List[int]]) -> int: method minPathSum (line 22) | def minPathSum(self, grid: List[List[int]]) -> int: class Solution (line 21) | class Solution: method minPathSum (line 7) | def minPathSum(self, grid: List[List[int]]) -> int: method minPathSum (line 22) | def minPathSum(self, grid: List[List[int]]) -> int: FILE: Python/0066-plus-one.py class Solution (line 4) | class Solution: method plusOne (line 5) | def plusOne(self, digits: List[int]) -> List[int]: FILE: Python/0067-add-binary.py class Solution (line 1) | class Solution: method addBinary (line 2) | def addBinary(self, a: str, b: str) -> str: FILE: Python/0068-text-justification.py class Solution (line 6) | class Solution: method fullJustify (line 7) | def fullJustify(self, words: List[str], maxWidth: int) -> List[str]: FILE: Python/0069-sqrtx.py class Solution (line 3) | class Solution: method mySqrt (line 4) | def mySqrt(self, x: int) -> int: FILE: Python/0070-climbing-stairs.py class Solution (line 7) | class Solution: method climbStairs (line 8) | def climbStairs(self, n: int) -> int: method climb_Stairs (line 15) | def climb_Stairs(self, i: int, n: int, memo: list) -> int: method climbStairs (line 30) | def climbStairs(self, n: int): method climbStairs (line 44) | def climbStairs(self, n: int) -> int: method climbStairs (line 58) | def climbStairs(self, n: int) -> int: class Solution (line 14) | class Solution: method climbStairs (line 8) | def climbStairs(self, n: int) -> int: method climb_Stairs (line 15) | def climb_Stairs(self, i: int, n: int, memo: list) -> int: method climbStairs (line 30) | def climbStairs(self, n: int): method climbStairs (line 44) | def climbStairs(self, n: int) -> int: method climbStairs (line 58) | def climbStairs(self, n: int) -> int: class Solution (line 29) | class Solution: method climbStairs (line 8) | def climbStairs(self, n: int) -> int: method climb_Stairs (line 15) | def climb_Stairs(self, i: int, n: int, memo: list) -> int: method climbStairs (line 30) | def climbStairs(self, n: int): method climbStairs (line 44) | def climbStairs(self, n: int) -> int: method climbStairs (line 58) | def climbStairs(self, n: int) -> int: class Solution (line 43) | class Solution: method climbStairs (line 8) | def climbStairs(self, n: int) -> int: method climb_Stairs (line 15) | def climb_Stairs(self, i: int, n: int, memo: list) -> int: method climbStairs (line 30) | def climbStairs(self, n: int): method climbStairs (line 44) | def climbStairs(self, n: int) -> int: method climbStairs (line 58) | def climbStairs(self, n: int) -> int: class Solution (line 56) | class Solution: method climbStairs (line 8) | def climbStairs(self, n: int) -> int: method climb_Stairs (line 15) | def climb_Stairs(self, i: int, n: int, memo: list) -> int: method climbStairs (line 30) | def climbStairs(self, n: int): method climbStairs (line 44) | def climbStairs(self, n: int) -> int: method climbStairs (line 58) | def climbStairs(self, n: int) -> int: FILE: Python/0071-simplify-path.py class Solution (line 3) | class Solution: method simplifyPath (line 4) | def simplifyPath(self, path: str) -> str: FILE: Python/0072-edit-distance.py class Solution (line 6) | class Solution: method minDistance (line 7) | def minDistance(self, word1: str, word2: str) -> int: method minDistance (line 28) | def minDistance(self, word1: str, word2: str) -> int: class Solution (line 27) | class Solution: method minDistance (line 7) | def minDistance(self, word1: str, word2: str) -> int: method minDistance (line 28) | def minDistance(self, word1: str, word2: str) -> int: FILE: Python/0073-set-matrix-zeroes.py class Solution (line 6) | class Solution: method setZeroes (line 7) | def setZeroes(self, matrix: List[List[int]]) -> None: method setZeroes (line 23) | def setZeroes(self, matrix: List[List[int]]) -> None: class Solution (line 22) | class Solution: method setZeroes (line 7) | def setZeroes(self, matrix: List[List[int]]) -> None: method setZeroes (line 23) | def setZeroes(self, matrix: List[List[int]]) -> None: FILE: Python/0074-search-a-2d-matrix.py class Solution (line 6) | class Solution: method searchMatrix (line 7) | def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: FILE: Python/0075-sort-colors.py class Solution (line 6) | class Solution: method sortColors (line 7) | def sortColors(self, nums: List[int]) -> None: FILE: Python/0076-minimum-window-substring.py class Solution (line 6) | class Solution: method minWindow (line 7) | def minWindow(self, s: str, t: str) -> str: FILE: Python/0077-combinations.py class Solution (line 5) | class Solution: method combine (line 6) | def combine(self, n: int, k: int) -> List[List[int]]: FILE: Python/0078-subsets.py class Solution (line 7) | class Solution: method subsets (line 8) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 24) | def subsets(self, nums): method subsets (line 39) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 53) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 62) | def subsets(self, nums: List[int]) -> List[List[int]]: class Solution (line 23) | class Solution: method subsets (line 8) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 24) | def subsets(self, nums): method subsets (line 39) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 53) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 62) | def subsets(self, nums: List[int]) -> List[List[int]]: class Solution (line 38) | class Solution: method subsets (line 8) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 24) | def subsets(self, nums): method subsets (line 39) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 53) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 62) | def subsets(self, nums: List[int]) -> List[List[int]]: class Solution (line 52) | class Solution: method subsets (line 8) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 24) | def subsets(self, nums): method subsets (line 39) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 53) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 62) | def subsets(self, nums: List[int]) -> List[List[int]]: class Solution (line 61) | class Solution: method subsets (line 8) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 24) | def subsets(self, nums): method subsets (line 39) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 53) | def subsets(self, nums: List[int]) -> List[List[int]]: method subsets (line 62) | def subsets(self, nums: List[int]) -> List[List[int]]: FILE: Python/0079-word-search.py class Solution (line 6) | class Solution: method exist (line 8) | def exist(self, board: List[List[str]], word: str) -> bool: FILE: Python/0080-remove-duplicates-from-sorted-array-ii.py class Solution (line 6) | class Solution: method removeDuplicates (line 7) | def removeDuplicates(self, nums: List[int]) -> int: FILE: Python/0081-search-in-rotated-sorted-array-ii.py class Solution (line 6) | class Solution: method search (line 7) | def search(self, nums: List[int], target: int) -> bool: FILE: Python/0082-remove-duplicates-from-sorted-list-ii.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method deleteDuplicates (line 13) | def deleteDuplicates(self, head: Optional[ListNode]) -> Optional[ListN... function traverse (line 29) | def traverse(node: Optional[ListNode]): FILE: Python/0083-remove-duplicates-from-sorted-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method deleteDuplicates (line 13) | def deleteDuplicates(self, head: Optional[ListNode]) -> Optional[ListN... function traverse (line 23) | def traverse(node: Optional[ListNode]): FILE: Python/0084-largest-rectangle-in-histogram.py class Solution (line 6) | class Solution: method largestRectangleArea (line 7) | def largestRectangleArea(self, heights: List[int]) -> int: FILE: Python/0085-maximal-rectangle.py class Solution (line 7) | class Solution: method maximalRectangle (line 8) | def maximalRectangle(self, matrix: List[List[str]]) -> int: method maximalRectangle (line 26) | def maximalRectangle(self, matrix: List[List[str]]) -> int: class Solution (line 25) | class Solution: method maximalRectangle (line 8) | def maximalRectangle(self, matrix: List[List[str]]) -> int: method maximalRectangle (line 26) | def maximalRectangle(self, matrix: List[List[str]]) -> int: FILE: Python/0086-partition-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method partition (line 13) | def partition(self, head: Optional[ListNode], x: int) -> Optional[List... FILE: Python/0087-scramble-string.py class Solution (line 3) | class Solution: method isScramble (line 4) | def isScramble(self, s1: str, s2: str) -> bool: FILE: Python/0088-merge-sorted-array.py class Solution (line 6) | class Solution: method merge (line 7) | def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) ->... FILE: Python/0089-gray-code.py class Solution (line 6) | class Solution: method grayCode (line 7) | def grayCode(self, n: int) -> List[int]: method backtracking (line 13) | def backtracking(self, result: List[int], n: int, visited: dict): FILE: Python/0090-subsets-ii.py class Solution (line 7) | class Solution: method subsetsWithDup (line 8) | def subsetsWithDup(self, nums: List[int]) -> List[List[int]]: FILE: Python/0091-decode-ways.py class Solution (line 6) | class Solution: method numDecodings (line 7) | def numDecodings(self, s: str) -> int: method numDecodings (line 27) | def numDecodings(self, s: str) -> int: class Solution (line 26) | class Solution: method numDecodings (line 7) | def numDecodings(self, s: str) -> int: method numDecodings (line 27) | def numDecodings(self, s: str) -> int: FILE: Python/0092-reverse-linked-list-ii.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method reverseBetween (line 13) | def reverseBetween(self, head: Optional[ListNode], left: int, right: i... function traverse (line 39) | def traverse(node: Optional[ListNode]): FILE: Python/0093-restore-ip-addresses.py class Solution (line 6) | class Solution: method restoreIpAddresses (line 7) | def restoreIpAddresses(self, s: str) -> List[str]: FILE: Python/0095-unique-binary-search-trees-ii.py class TreeNode (line 5) | class TreeNode: method __init__ (line 6) | def __init__(self, val=0, left=None, right=None): class Solution (line 12) | class Solution: method allPossobleBST (line 13) | def allPossobleBST(self, start, end, memo): method generateTrees (line 32) | def generateTrees(self, n: int) -> List[Optional[TreeNode]]: FILE: Python/0096-unique-binary-search-trees.py class TreeNode (line 4) | class TreeNode: method __init__ (line 5) | def __init__(self, val=0, left=None, right=None): class Solution (line 18) | class Solution: method numTrees (line 19) | def numTrees(self, n: int) -> int: FILE: Python/0097-interleaving-string.py class Solution (line 6) | class Solution: method isInterleave (line 7) | def isInterleave(self, s1: str, s2: str, s3: str) -> bool: method isInterleave (line 28) | def isInterleave(self, s1: str, s2: str, s3: str) -> bool: class Solution (line 27) | class Solution: method isInterleave (line 7) | def isInterleave(self, s1: str, s2: str, s3: str) -> bool: method isInterleave (line 28) | def isInterleave(self, s1: str, s2: str, s3: str) -> bool: FILE: Python/0098-validate-binary-search-tree.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method isValidBST (line 15) | def isValidBST(self, root: Optional[TreeNode]) -> bool: method isValidBST (line 28) | def isValidBST(self, root: Optional[TreeNode]) -> bool: class Solution (line 27) | class Solution: method isValidBST (line 15) | def isValidBST(self, root: Optional[TreeNode]) -> bool: method isValidBST (line 28) | def isValidBST(self, root: Optional[TreeNode]) -> bool: FILE: Python/0099-recover-binary-search-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method recoverTree (line 14) | def recoverTree(self, root: Optional[TreeNode]) -> None: FILE: Python/0100-same-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method isSameTree (line 14) | def isSameTree(self, p: Optional[TreeNode], q: Optional[TreeNode]) -> ... FILE: Python/0101-symmetric-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method isSymmetric (line 14) | def isSymmetric(self, root: Optional[TreeNode]) -> bool: FILE: Python/0102-binary-tree-level-order-traversal.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method levelOrder (line 15) | def levelOrder(self, root: Optional[TreeNode]) -> List[List[int]]: method levelOrder (line 35) | def levelOrder(self, root: TreeNode) -> List[List[int]]: class Solution (line 34) | class Solution: method levelOrder (line 15) | def levelOrder(self, root: Optional[TreeNode]) -> List[List[int]]: method levelOrder (line 35) | def levelOrder(self, root: TreeNode) -> List[List[int]]: FILE: Python/0103-binary-tree-zigzag-level-order-traversal.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method zigzagLevelOrder (line 14) | def zigzagLevelOrder(self, root: Optional[TreeNode]) -> List[List[int]]: FILE: Python/0104-maximum-depth-of-binary-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method maxDepth (line 14) | def maxDepth(self, root: Optional[TreeNode]) -> int: method __init__ (line 27) | def __init__(self): method nextMaxDepth (line 31) | def nextMaxDepth(self): method maxDepth (line 43) | def maxDepth(self, root): method maxDepth (line 54) | def maxDepth(self, root: TreeNode) -> int: class Solution (line 26) | class Solution: method maxDepth (line 14) | def maxDepth(self, root: Optional[TreeNode]) -> int: method __init__ (line 27) | def __init__(self): method nextMaxDepth (line 31) | def nextMaxDepth(self): method maxDepth (line 43) | def maxDepth(self, root): method maxDepth (line 54) | def maxDepth(self, root: TreeNode) -> int: class Solution (line 53) | class Solution: method maxDepth (line 14) | def maxDepth(self, root: Optional[TreeNode]) -> int: method __init__ (line 27) | def __init__(self): method nextMaxDepth (line 31) | def nextMaxDepth(self): method maxDepth (line 43) | def maxDepth(self, root): method maxDepth (line 54) | def maxDepth(self, root: TreeNode) -> int: FILE: Python/0105-construct-binary-tree-from-preorder-and-inorder-traversal.py class Solution (line 7) | class Solution: method buildTree (line 8) | def buildTree(self, preorder: List[int], inorder: List[int]) -> Option... FILE: Python/0106-construct-binary-tree-from-inorder-and-postorder-traversal.py class Solution (line 7) | class Solution: method buildTree (line 8) | def buildTree(self, inorder: List[int], postorder: List[int]) -> Optio... FILE: Python/0107-binary-tree-level-order-traversal-ii.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method levelOrderBottom (line 14) | def levelOrderBottom(self, root: Optional[TreeNode]) -> List[List[int]]: FILE: Python/0108-convert-sorted-array-to-binary-search-tree.py class Solution (line 9) | class Solution: method traverse (line 10) | def traverse(self, node: Optional[TreeNode]): method sortedArrayToBST (line 17) | def sortedArrayToBST(self, nums: List[int]) -> Optional[TreeNode]: FILE: Python/0110-balanced-binary-tree.py class TreeNode (line 3) | class TreeNode(object): method __init__ (line 4) | def __init__(self, val=0, left=None, right=None): class Solution (line 10) | class Solution(object): method height (line 11) | def height(self, node: TreeNode): method isBalanced (line 16) | def isBalanced(self, node: TreeNode): method isBalancedHelper (line 26) | def isBalancedHelper(self, root: TreeNode): method isBalanced (line 39) | def isBalanced(self, root: TreeNode) -> bool: class Solution (line 25) | class Solution: method height (line 11) | def height(self, node: TreeNode): method isBalanced (line 16) | def isBalanced(self, node: TreeNode): method isBalancedHelper (line 26) | def isBalancedHelper(self, root: TreeNode): method isBalanced (line 39) | def isBalanced(self, root: TreeNode) -> bool: FILE: Python/0111-minimum-depth-of-binary-tree.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method minDepth (line 15) | def minDepth(self, root: Optional[TreeNode]) -> int: FILE: Python/0112-path-sum.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method hasPathSum (line 14) | def hasPathSum(self, root: Optional[TreeNode], targetSum: int) -> bool: FILE: Python/0113-path-sum-ii.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method helper (line 14) | def helper(self, node: TreeNode, remainingSum: int, pathNode: List[int... method pathSum (line 25) | def pathSum(self, root: Optional[TreeNode], targetSum: int) -> List[Li... FILE: Python/0114-flatten-binary-tree-to-linked-list.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method flatten (line 14) | def flatten(self, root: Optional[TreeNode]) -> None: method flatten (line 30) | def flatten(self, root: TreeNode) -> TreeNode: class Solution (line 29) | class Solution: method flatten (line 14) | def flatten(self, root: Optional[TreeNode]) -> None: method flatten (line 30) | def flatten(self, root: TreeNode) -> TreeNode: FILE: Python/0115-distinct-subsequences.py class Solution (line 5) | class Solution: method numDistinct (line 6) | def numDistinct(self, s: str, t: str) -> int: method numDistinct (line 20) | def numDistinct(self, s: str, t: str) -> int: class Solution (line 19) | class Solution: method numDistinct (line 6) | def numDistinct(self, s: str, t: str) -> int: method numDistinct (line 20) | def numDistinct(self, s: str, t: str) -> int: FILE: Python/0116-populating-next-right-pointers-in-each-node.py class Node (line 7) | class Node: method __init__ (line 8) | def __init__(self, val: int = 0, left: 'Node' = None, right: 'Node' = ... class Solution (line 15) | class Solution: method connect (line 16) | def connect(self, root: Optional[Node]) -> Optional[Node]: FILE: Python/0117-populating-next-right-pointers-in-each-node-ii.py class Node (line 6) | class Node: method __init__ (line 7) | def __init__(self, val: int = 0, left: 'Node' = None, right: 'Node' = ... class Solution (line 14) | class Solution: method processChild (line 16) | def processChild(self, childNode, prev, leftmost): method connect (line 26) | def connect(self, root: Optional["Node"]) -> Optional["Node"]: FILE: Python/0118-pascals-triangle.py class Solution (line 4) | class Solution: method generate (line 5) | def generate(self, numRows: int) -> List[List[int]]: FILE: Python/0119-pascals-triangle-ii.py class Solution (line 4) | class Solution: method getRow (line 5) | def getRow(self, rowIndex: int) -> List[int]: FILE: Python/0120-triangle.py class Solution (line 6) | class Solution: method minimumTotal (line 7) | def minimumTotal(self, triangle: List[List[int]]) -> int: FILE: Python/0121-best-time-to-buy-and-sell-stock.py class Solution (line 6) | class Solution(object): method maxProfit (line 7) | def maxProfit(self, prices: List[int]) -> int: FILE: Python/0122-best-time-to-buy-and-sell-stock-ii.py class Solution (line 6) | class Solution: method maxProfit (line 7) | def maxProfit(self, prices: List[int]) -> int: FILE: Python/0123-best-time-to-buy-and-sell-stock-iii.py class Solution (line 6) | class Solution(object): method maxProfit (line 7) | def maxProfit(self, prices: List[int]) -> int: method maxProfit (line 29) | def maxProfit(self, prices: List[int]) -> int: class Solution (line 28) | class Solution(object): method maxProfit (line 7) | def maxProfit(self, prices: List[int]) -> int: method maxProfit (line 29) | def maxProfit(self, prices: List[int]) -> int: FILE: Python/0124-binary-tree-maximum-path-sum.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method maxPathSum (line 14) | def maxPathSum(self, root: Optional[TreeNode]) -> int: FILE: Python/0125-valid-palindrome.py class Solution (line 3) | class Solution(object): method isPalindrome (line 4) | def isPalindrome(self, s: str) -> bool: method isPalindrome (line 20) | def isPalindrome(self, s: str) -> bool: class Solution (line 19) | class Solution: method isPalindrome (line 4) | def isPalindrome(self, s: str) -> bool: method isPalindrome (line 20) | def isPalindrome(self, s: str) -> bool: FILE: Python/0126-word-ladder-ii.py class Solution (line 7) | class Solution: method __init__ (line 8) | def __init__(self): method findNeighbors (line 13) | def findNeighbors(self, word: str, wordSet: Set[str]) -> List[str]: method backtrack (line 27) | def backtrack(self, source: str, destination: str): method bfs (line 41) | def bfs(self, beginWord: str, endWord: str, wordSet: Set[str]): method findLadders (line 61) | def findLadders( FILE: Python/0127-word-ladder.py class Solution (line 7) | class Solution: method ladderLength (line 8) | def ladderLength(self, beginWord: str, endWord: str, wordList: List[st... FILE: Python/0128-longest-consecutive-sequence.py class Solution (line 6) | class Solution: method longestConsecutive (line 7) | def longestConsecutive(self, nums: List[int]) -> int: method longestConsecutive (line 59) | def longestConsecutive(self, nums: List[int]) -> int: method longestConsecutive (line 72) | def longestConsecutive(self, nums: List[int]) -> int: class UnionFind (line 27) | class UnionFind: method __init__ (line 28) | def __init__(self, nums): method find (line 33) | def find(self, num): method union (line 38) | def union(self, node1, node2): class Solution (line 58) | class Solution: method longestConsecutive (line 7) | def longestConsecutive(self, nums: List[int]) -> int: method longestConsecutive (line 59) | def longestConsecutive(self, nums: List[int]) -> int: method longestConsecutive (line 72) | def longestConsecutive(self, nums: List[int]) -> int: class Solution (line 71) | class Solution: method longestConsecutive (line 7) | def longestConsecutive(self, nums: List[int]) -> int: method longestConsecutive (line 59) | def longestConsecutive(self, nums: List[int]) -> int: method longestConsecutive (line 72) | def longestConsecutive(self, nums: List[int]) -> int: FILE: Python/0129-sum-root-to-leaf-numbers.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method sumNumbers (line 14) | def sumNumbers(self, root: Optional[TreeNode]) -> List[int]: FILE: Python/0130-surrounded-regions.py class Solution (line 7) | class Solution: method solve (line 8) | def solve(self, board: List[List[str]]) -> None: method solve (line 42) | def solve(self, board: List[List[str]]) -> None: method solve (line 74) | def solve(self, board: List[List[str]]) -> None: class Solution (line 41) | class Solution: method solve (line 8) | def solve(self, board: List[List[str]]) -> None: method solve (line 42) | def solve(self, board: List[List[str]]) -> None: method solve (line 74) | def solve(self, board: List[List[str]]) -> None: class Solution (line 73) | class Solution: method solve (line 8) | def solve(self, board: List[List[str]]) -> None: method solve (line 42) | def solve(self, board: List[List[str]]) -> None: method solve (line 74) | def solve(self, board: List[List[str]]) -> None: FILE: Python/0131-palindrome-partitioning.py class Solution (line 6) | class Solution: method partition (line 7) | def partition(self, s: str) -> List[List[str]]: method partition (line 27) | def partition(self, s: str) -> List[List[str]]: class Solution (line 26) | class Solution: method partition (line 7) | def partition(self, s: str) -> List[List[str]]: method partition (line 27) | def partition(self, s: str) -> List[List[str]]: FILE: Python/0132-palindrome-partitioning-ii.py class Solution (line 3) | class Solution: method minCut (line 4) | def minCut(self, s: str) -> int: method __init__ (line 28) | def __init__(self): method minCut (line 32) | def minCut(self, s: str) -> int: method findMinimumCut (line 37) | def findMinimumCut(self, s, start, end, minimumCut): method isPalindrome (line 54) | def isPalindrome(self, s, start, end): class Solution (line 27) | class Solution: method minCut (line 4) | def minCut(self, s: str) -> int: method __init__ (line 28) | def __init__(self): method minCut (line 32) | def minCut(self, s: str) -> int: method findMinimumCut (line 37) | def findMinimumCut(self, s, start, end, minimumCut): method isPalindrome (line 54) | def isPalindrome(self, s, start, end): FILE: Python/0133-clone-graph.py class Node (line 7) | class Node: method __init__ (line 8) | def __init__(self, val=0, neighbors=None): class Solution (line 13) | class Solution: method __init__ (line 14) | def __init__(self): method cloneGraph (line 17) | def cloneGraph(self, node: 'Node') -> 'Node': method cloneGraph (line 34) | def cloneGraph(self, node: Optional['Node']) -> Optional['Node']: class Solution (line 33) | class Solution: method __init__ (line 14) | def __init__(self): method cloneGraph (line 17) | def cloneGraph(self, node: 'Node') -> 'Node': method cloneGraph (line 34) | def cloneGraph(self, node: Optional['Node']) -> Optional['Node']: FILE: Python/0134-gas-station.py class Solution (line 1) | class Solution: method canCompleteCircuit (line 2) | def canCompleteCircuit(self, gas: List[int], cost: List[int]) -> int: FILE: Python/0135-candy.py class Solution (line 4) | class Solution: method candy (line 5) | def candy(self, ratings: List[int]) -> int: FILE: Python/0136-single-number.py class Solution (line 6) | class Solution: method singleNumber (line 7) | def singleNumber(self, nums: List[int]) -> int: FILE: Python/0137-single-number-ii.py class Solution (line 6) | class Solution: method singleNumber (line 7) | def singleNumber(self, nums: List[int]) -> int: FILE: Python/0138-copy-list-with-random-pointer.py function buildLinkedList (line 6) | def buildLinkedList(arr): class Node (line 19) | class Node: method __init__ (line 20) | def __init__(self, x: int, next: 'Node' = None, random: 'Node' = None): class Solution (line 26) | class Solution(): method __init__ (line 27) | def __init__(self): method copyRandomList (line 30) | def copyRandomList(self, head: Optional[Node]): FILE: Python/0139-word-break.py class Solution (line 4) | class Solution: method wordBreak (line 5) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 42) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 69) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 95) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 114) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: class TrieNode (line 35) | class TrieNode: method __init__ (line 36) | def __init__(self): class Solution (line 41) | class Solution: method wordBreak (line 5) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 42) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 69) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 95) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 114) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: class Solution (line 68) | class Solution: method wordBreak (line 5) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 42) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 69) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 95) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 114) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: class Solution (line 94) | class Solution: method wordBreak (line 5) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 42) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 69) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 95) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 114) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: class Solution (line 113) | class Solution: method wordBreak (line 5) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 42) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 69) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 95) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: method wordBreak (line 114) | def wordBreak(self, s: str, wordDict: List[str]) -> bool: FILE: Python/0140-word-break-ii.py class Solution (line 6) | class Solution: method wordBreak (line 7) | def wordBreak(self, s: str, wordDict: List[str]) -> List[str]: method dp (line 11) | def dp(self, remainingStr: str, wordSet: set, memoization: dict) -> Li... method wordBreak (line 30) | def wordBreak(self, s: str, wordDict: List[str]) -> List[str]: class Solution (line 29) | class Solution: method wordBreak (line 7) | def wordBreak(self, s: str, wordDict: List[str]) -> List[str]: method dp (line 11) | def dp(self, remainingStr: str, wordSet: set, memoization: dict) -> Li... method wordBreak (line 30) | def wordBreak(self, s: str, wordDict: List[str]) -> List[str]: FILE: Python/0141-linked-list-cycle.py class ListNode (line 5) | class ListNode: method __init__ (line 6) | def __init__(self, x): class Solution (line 11) | class Solution: method hasCycle (line 12) | def hasCycle(self, head: Optional[ListNode]) -> bool: FILE: Python/0142-linked-list-cycle-ii.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, x): class Solution (line 12) | class Solution: method detectCycle (line 13) | def detectCycle(self, head: Optional[ListNode]) -> Optional[ListNode]: method detectCycle (line 26) | def detectCycle(self, head: Optional[ListNode]) -> Optional[ListNode]: class Solution (line 25) | class Solution: method detectCycle (line 13) | def detectCycle(self, head: Optional[ListNode]) -> Optional[ListNode]: method detectCycle (line 26) | def detectCycle(self, head: Optional[ListNode]) -> Optional[ListNode]: FILE: Python/0143-reorder-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method reorderList (line 13) | def reorderList(self, head: Optional[ListNode]) -> None: FILE: Python/0145-binary-tree-postorder-traversal.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method postorderTraversal (line 14) | def postorderTraversal(self, root: Optional[TreeNode]) -> List[int]: FILE: Python/0146-lru-cache.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, key, val): class LRUCache (line 14) | class LRUCache: method __init__ (line 16) | def __init__(self, capacity: int): method get (line 25) | def get(self, key: int) -> int: method put (line 34) | def put(self, key: int, value: int) -> None: method add (line 48) | def add(self, node): method remove (line 57) | def remove(self, node): method __init__ (line 78) | def __init__(self, capacity: int): method get (line 82) | def get(self, key: int) -> int: method put (line 88) | def put(self, key: int, value: int) -> None: class LRUCache (line 76) | class LRUCache: method __init__ (line 16) | def __init__(self, capacity: int): method get (line 25) | def get(self, key: int) -> int: method put (line 34) | def put(self, key: int, value: int) -> None: method add (line 48) | def add(self, node): method remove (line 57) | def remove(self, node): method __init__ (line 78) | def __init__(self, capacity: int): method get (line 82) | def get(self, key: int) -> int: method put (line 88) | def put(self, key: int, value: int) -> None: FILE: Python/0148-sort-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method sortList (line 13) | def sortList(self, head: Optional[ListNode]) -> Optional[ListNode]: method merge (line 21) | def merge(self, list1: Optional[ListNode], list2: Optional[ListNode]) ... method getMid (line 35) | def getMid(self, head: Optional[ListNode]) -> Optional[ListNode]: function printLinkedList (line 46) | def printLinkedList(head): FILE: Python/0149-max-points-on-a-line.py class Solution (line 8) | class Solution: method maxPoints (line 9) | def maxPoints(self, points: List[List[int]]) -> int: FILE: Python/0150-evaluate-reverse-polish-notation.py class Solution (line 6) | class Solution: method evalRPN (line 7) | def evalRPN(self, tokens: List[str]) -> int: FILE: Python/0151-reverse-words-in-a-string.py class Solution (line 3) | class Solution: method reverseWords (line 4) | def reverseWords(self, s: str) -> str: FILE: Python/0152-maximum-product-subarray.py class Solution (line 6) | class Solution: method maxProduct (line 7) | def maxProduct(self, nums: List[int]) -> int: FILE: Python/0153-find-minimum-in-rotated-sorted-array.py class Solution (line 6) | class Solution: method findMin (line 7) | def findMin(self, nums: List[int]) -> int: FILE: Python/0155-min-stack.py class MinStack (line 3) | class MinStack: method __init__ (line 5) | def __init__(self): method push (line 9) | def push(self, val: int) -> None: method pop (line 14) | def pop(self) -> None: method top (line 19) | def top(self) -> int: method getMin (line 22) | def getMin(self) -> int: FILE: Python/0159-longest-substring-with-at-most-two-distinct-characters.py class Solution (line 6) | class Solution: method lengthOfLongestSubstringTwoDistinct (line 7) | def lengthOfLongestSubstringTwoDistinct(self, s: 'str') -> 'int': FILE: Python/0160-intersection-of-two-linked-lists.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, x): class Solution (line 12) | class Solution: method getIntersectionNode (line 13) | def getIntersectionNode(self, headA: Optional[ListNode], headB: Option... FILE: Python/0162-find-peak-element.py class Solution (line 6) | class Solution: method findPeakElement (line 7) | def findPeakElement(self, nums: List[int]) -> int: FILE: Python/0165-compare-version-numbers.py class Solution (line 3) | class Solution: method compareVersion (line 4) | def compareVersion(self, version1: str, version2: str) -> int: FILE: Python/0166-fraction-to-recurring-decimal.py class Solution (line 3) | class Solution: method fractionToDecimal (line 4) | def fractionToDecimal(self, numerator: int, denominator: int) -> str: FILE: Python/0167-two-sum-ii-input-array-is-sorted.py class Solution (line 6) | class Solution: method twoSum (line 7) | def twoSum(self, numbers: List[int], target: int) -> List[int]: FILE: Python/0168-excel-sheet-column-title.py class Solution (line 1) | class Solution: method convertToTitle (line 2) | def convertToTitle(self, columnNumber: int) -> str: FILE: Python/0169-majority-element.py class Solution (line 7) | class Solution: method majorityElement (line 8) | def majorityElement(self, nums: List[int]) -> int: FILE: Python/0170-two-sum-iii-data-structure-design.py class TwoSum (line 3) | class TwoSum: method __init__ (line 5) | def __init__(self): method add (line 8) | def add(self, number: int) -> None: method find (line 14) | def find(self, value: int) -> bool: FILE: Python/0172-factorial-trailing-zeroes.py class Solution (line 3) | class Solution: method trailingZeroes (line 4) | def trailingZeroes(self, n: int) -> int: FILE: Python/0173-binary-search-tree-iterator.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class BSTIterator (line 13) | class BSTIterator: method __init__ (line 15) | def __init__(self, root: Optional[TreeNode]): method traverse (line 21) | def traverse(self, node: Optional[TreeNode]): method next (line 28) | def next(self) -> int: method hasNext (line 32) | def hasNext(self) -> bool: FILE: Python/0179-largest-number.py class Solution (line 7) | class Solution: method largestNumber (line 8) | def largestNumber(self, nums: List[int]) -> str: FILE: Python/0187-repeated-dna-sequences.py class Solution (line 6) | class Solution: method findRepeatedDnaSequences (line 7) | def findRepeatedDnaSequences(self, s: str) -> List[str]: FILE: Python/0188-best-time-to-buy-and-sell-stock-iv.py class Solution (line 6) | class Solution: method maxProfit (line 7) | def maxProfit(self, k: int, prices: List[int]) -> int: method maxProfit (line 22) | def maxProfit(self, k: int, prices: List[int]) -> int: class Solution (line 21) | class Solution: method maxProfit (line 7) | def maxProfit(self, k: int, prices: List[int]) -> int: method maxProfit (line 22) | def maxProfit(self, k: int, prices: List[int]) -> int: FILE: Python/0190-reverse-bits.py class Solution (line 3) | class Solution: method reverseBits (line 4) | def reverseBits(self, n: int) -> int: FILE: Python/0191-number-of-1-bits.py class Solution (line 3) | class Solution: method hammingWeight (line 4) | def hammingWeight(self, n: int) -> int: FILE: Python/0198-house-robber.py class Solution (line 7) | class Solution: method rob (line 8) | def rob(self, nums: List[int]) -> int: method rob (line 22) | def rob(self, nums: List[int]) -> int: class Solution (line 21) | class Solution: method rob (line 8) | def rob(self, nums: List[int]) -> int: method rob (line 22) | def rob(self, nums: List[int]) -> int: FILE: Python/0199-binary-tree-right-side-view.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method rightSideView (line 14) | def rightSideView(self, root: Optional[TreeNode]) -> List[int]: method rightSideView (line 33) | def rightSideView(self, root: Optional[TreeNode]) -> List[int]: class Solution (line 32) | class Solution: method rightSideView (line 14) | def rightSideView(self, root: Optional[TreeNode]) -> List[int]: method rightSideView (line 33) | def rightSideView(self, root: Optional[TreeNode]) -> List[int]: FILE: Python/0200-number-of-islands.py class Solution (line 7) | class Solution: method dfs (line 8) | def dfs(self, grid: List[List[str]], r: int, c: int) -> None: method numIslands (line 21) | def numIslands(self, grid: List[List[str]]) -> int: method numIslands (line 73) | def numIslands(self, grid: List[List[str]]) -> int: method numIslands (line 90) | def numIslands(self, grid: List[List[str]]) -> int: class UnionFind (line 33) | class UnionFind: method __init__ (line 34) | def __init__(self, grid): method find (line 49) | def find(self, i): method union (line 54) | def union(self, x, y): method getCount (line 68) | def getCount(self): class Solution (line 72) | class Solution: method dfs (line 8) | def dfs(self, grid: List[List[str]], r: int, c: int) -> None: method numIslands (line 21) | def numIslands(self, grid: List[List[str]]) -> int: method numIslands (line 73) | def numIslands(self, grid: List[List[str]]) -> int: method numIslands (line 90) | def numIslands(self, grid: List[List[str]]) -> int: class Solution (line 89) | class Solution: method dfs (line 8) | def dfs(self, grid: List[List[str]], r: int, c: int) -> None: method numIslands (line 21) | def numIslands(self, grid: List[List[str]]) -> int: method numIslands (line 73) | def numIslands(self, grid: List[List[str]]) -> int: method numIslands (line 90) | def numIslands(self, grid: List[List[str]]) -> int: FILE: Python/0201-bitwise-and-of-numbers-range.py class Solution (line 3) | class Solution: method rangeBitwiseAnd (line 4) | def rangeBitwiseAnd(self, left: int, right: int) -> int: FILE: Python/0202-happy-number.py class Solution (line 3) | class Solution: method isHappy (line 4) | def isHappy(self, n: int) -> bool: FILE: Python/0203-remove-linked-list-elements.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method removeElements (line 13) | def removeElements(self, head: Optional[ListNode], val: int) -> Option... FILE: Python/0205-isomorphic-strings.py class Solution (line 4) | class Solution: method isIsomorphic (line 5) | def isIsomorphic(self, s: str, t: str) -> bool: FILE: Python/0206-reverse-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method reverseList (line 13) | def reverseList(self, head: Optional[ListNode]) -> Optional[ListNode]: method reverseList (line 26) | def reverseList(self, head: ListNode) -> ListNode: class Solution (line 25) | class Solution: method reverseList (line 13) | def reverseList(self, head: Optional[ListNode]) -> Optional[ListNode]: method reverseList (line 26) | def reverseList(self, head: ListNode) -> ListNode: FILE: Python/0207-course-schedule.py class Solution (line 7) | class Solution: method canFinish (line 8) | def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -... FILE: Python/0208-implement-trie-prefix-tree.py class TrieNode (line 10) | class TrieNode: method __init__ (line 11) | def __init__(self, char: str = ""): class Trie (line 17) | class Trie: method __init__ (line 18) | def __init__(self): method insert (line 21) | def insert(self, word: str): method search (line 32) | def search(self, word: str): method startsWith (line 40) | def startsWith(self, prefix: str): FILE: Python/0209-minimum-size-subarray-sum.py class Solution (line 6) | class Solution: method minSubArrayLen (line 7) | def minSubArrayLen(self, target: int, nums: List[int]) -> int: method minSubArrayLen (line 22) | def minSubArrayLen(self, target: int, nums: List[int]) -> int: class Solution (line 21) | class Solution: method minSubArrayLen (line 7) | def minSubArrayLen(self, target: int, nums: List[int]) -> int: method minSubArrayLen (line 22) | def minSubArrayLen(self, target: int, nums: List[int]) -> int: FILE: Python/0210-course-schedule-ii.py class Solution (line 7) | class Solution: method findOrder (line 8) | def findOrder(self, numCourses: int, prerequisites: List[List[int]]) -... FILE: Python/0211-design-add-and-search-words-data-structure.py class TrieNode (line 1) | class TrieNode: method __init__ (line 2) | def __init__(self): class WordDictionary (line 6) | class WordDictionary: method __init__ (line 7) | def __init__(self): method addWord (line 12) | def addWord(self, word: str) -> None: method search (line 24) | def search(self, word: str) -> bool: FILE: Python/0212-word-search-ii.py class Solution (line 6) | class Solution: method findWords (line 7) | def findWords(self, board: List[List[str]], words: List[str]) -> List[... method findWords (line 91) | def findWords(self, board: List[List[str]], words: List[str]) -> List[... class TrieNode (line 48) | class TrieNode: method __init__ (line 49) | def __init__(self, char=""): class Trie (line 55) | class Trie: method __init__ (line 56) | def __init__(self): method insert (line 59) | def insert(self, word): method startWith (line 67) | def startWith(self, prefix): method removeChar (line 75) | def removeChar(self, word): class Solution (line 90) | class Solution: method findWords (line 7) | def findWords(self, board: List[List[str]], words: List[str]) -> List[... method findWords (line 91) | def findWords(self, board: List[List[str]], words: List[str]) -> List[... FILE: Python/0213-house-robber-ii.py class Solution (line 7) | class Solution: method rob (line 8) | def rob(self, nums: List[int]) -> int: method rob (line 27) | def rob(self, nums: List[int]) -> int: class Solution (line 26) | class Solution: method rob (line 8) | def rob(self, nums: List[int]) -> int: method rob (line 27) | def rob(self, nums: List[int]) -> int: FILE: Python/0214-shortest-palindrome.py class Solution (line 3) | class Solution: method shortestPalindrome (line 4) | def shortestPalindrome(self, s: str) -> str: method preprocessString (line 34) | def preprocessString(self, s: str) -> str: FILE: Python/0215-kth-largest-element-in-an-array.py class Solution (line 7) | class Solution: method findKthLargest (line 8) | def findKthLargest(self, nums: List[int], k: int) -> int: FILE: Python/0216-combination-sum-iii.py class Solution (line 6) | class Solution: method combinationSum3 (line 7) | def combinationSum3(self, k: int, n: int) -> List[List[int]]: FILE: Python/0217-contains-duplicate.py class Solution (line 6) | class Solution: method containsDuplicate (line 7) | def containsDuplicate(self, nums: List[int]) -> bool: FILE: Python/0218-the-skyline-problem.py class UnionFind (line 6) | class UnionFind: method __init__ (line 7) | def __init__(self, n): method find (line 10) | def find(self, num): method union (line 15) | def union(self, x, y): class Solution (line 19) | class Solution: method getSkyline (line 20) | def getSkyline(self, buildings: List[List[int]]) -> List[List[int]]: FILE: Python/0219-contains-duplicate-ii.py class Solution (line 6) | class Solution: method containsNearbyDuplicate (line 7) | def containsNearbyDuplicate(self, nums: List[int], k: int) -> bool: FILE: Python/0221-maximal-square.py class Solution (line 6) | class Solution: method maximalSquare (line 7) | def maximalSquare(self, matrix: List[List[str]]) -> int: FILE: Python/0222-count-complete-tree-nodes.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method countNodes (line 14) | def countNodes(self, root: Optional[TreeNode]) -> int: FILE: Python/0224-basic-calculator.py class Solution (line 6) | class Solution: method calculate (line 7) | def calculate(self, s: str) -> int: FILE: Python/0225-implement-stack-using-queues.py class MyStack (line 4) | class MyStack: method __init__ (line 6) | def __init__(self): method push (line 9) | def push(self, x: int) -> None: method pop (line 12) | def pop(self) -> int: method top (line 15) | def top(self) -> int: method empty (line 18) | def empty(self) -> bool: FILE: Python/0226-invert-binary-tree.py class Solution (line 1) | class Solution(object): method invertTree (line 2) | def invertTree(self, root): FILE: Python/0227-basic-calculator-ii.py class Solution (line 6) | class Solution: method calculate (line 7) | def calculate(self, s: str) -> int: FILE: Python/0228-summary-ranges.py class Solution (line 6) | class Solution: method summaryRanges (line 7) | def summaryRanges(self, nums: List[int]) -> List[str]: FILE: Python/0229-majority-element-ii.py class Solution (line 5) | class Solution: method majorityElement (line 6) | def majorityElement(self, nums: List[int]) -> List[int]: FILE: Python/0230-kth-smallest-element-in-a-bst.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method addToArr (line 14) | def addToArr(self, node: Optional[TreeNode], treeList: List[int]) -> N... method kthSmallest (line 20) | def kthSmallest(self, root: Optional[TreeNode], k: int) -> int: method kthSmallest (line 28) | def kthSmallest(self, root: Optional[TreeNode], k: int) -> int: class Solution (line 27) | class Solution: method addToArr (line 14) | def addToArr(self, node: Optional[TreeNode], treeList: List[int]) -> N... method kthSmallest (line 20) | def kthSmallest(self, root: Optional[TreeNode], k: int) -> int: method kthSmallest (line 28) | def kthSmallest(self, root: Optional[TreeNode], k: int) -> int: FILE: Python/0231-power-of-two.py class Solution (line 3) | class Solution: method isPowerOfTwo (line 4) | def isPowerOfTwo(self, n: int) -> bool: FILE: Python/0232-implement-queue-using-stacks.py class MyQueue (line 1) | class MyQueue: method __init__ (line 3) | def __init__(self): method push (line 9) | def push(self, x: int) -> None: method pop (line 19) | def pop(self) -> int: method peek (line 24) | def peek(self) -> int: method empty (line 29) | def empty(self) -> bool: FILE: Python/0234-palindrome-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): method __init__ (line 54) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method isPalindrome (line 13) | def isPalindrome(self, head: ListNode) -> bool: method endOfFirstHalf (line 31) | def endOfFirstHalf(self, head: ListNode) -> ListNode: method reverseList (line 39) | def reverseList(self, head: ListNode) -> ListNode: method isPalindrome (line 60) | def isPalindrome(self, head: Optional[ListNode]) -> bool: class ListNode (line 53) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): method __init__ (line 54) | def __init__(self, val=0, next=None): class Solution (line 59) | class Solution: method isPalindrome (line 13) | def isPalindrome(self, head: ListNode) -> bool: method endOfFirstHalf (line 31) | def endOfFirstHalf(self, head: ListNode) -> ListNode: method reverseList (line 39) | def reverseList(self, head: ListNode) -> ListNode: method isPalindrome (line 60) | def isPalindrome(self, head: Optional[ListNode]) -> bool: FILE: Python/0235-lowest-common-ancestor-of-a-binary-search-tree.py class Solution (line 8) | class Solution: method lowestCommonAncestor (line 9) | def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'Tr... FILE: Python/0236-lowest-common-ancestor-of-a-binary-tree.py class TreeNode (line 3) | class TreeNode: method __init__ (line 4) | def __init__(self, x): class Solution (line 10) | class Solution: method lowestCommonAncestor (line 11) | def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'Tr... method lowestCommonAncestor (line 26) | def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'Tr... class Solution (line 25) | class Solution: method lowestCommonAncestor (line 11) | def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'Tr... method lowestCommonAncestor (line 26) | def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'Tr... FILE: Python/0237-delete-node-in-a-linked-list.py class Solution (line 3) | class Solution: method deleteNode (line 4) | def deleteNode(self, node): FILE: Python/0238-product-of-array-except-self.py class Solution (line 6) | class Solution: method productExceptSelf (line 7) | def productExceptSelf(self, nums: List[int]) -> List[int]: FILE: Python/0239-sliding-window-maximum.py class Solution (line 7) | class Solution: method maxSlidingWindow (line 8) | def maxSlidingWindow(self, nums: List[int], k: int) -> List[int]: FILE: Python/0240-search-a-2d-matrix-ii.py class Solution (line 6) | class Solution: method binarySearch (line 7) | def binarySearch(self, matrix, target, start, vertical): method searchMatrix (line 28) | def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: FILE: Python/0241-different-ways-to-add-parentheses.py class Solution (line 6) | class Solution: method diffWaysToCompute (line 7) | def diffWaysToCompute(self, expression: str) -> List[int]: FILE: Python/0242-valid-anagram.py class Solution (line 5) | class Solution(object): method isAnagram (line 6) | def isAnagram(self, s, t): FILE: Python/0244-shortest-word-distance-ii.py class WordDistance (line 7) | class WordDistance: method __init__ (line 9) | def __init__(self, wordsDict: List[str]): method shortest (line 15) | def shortest(self, word1: str, word2: str) -> int: FILE: Python/0246-strobogrammatic-number.py class Solution (line 3) | class Solution: method isStrobogrammatic (line 4) | def isStrobogrammatic(self, num: str) -> bool: FILE: Python/0249-group-shifted-strings.py class Solution (line 7) | class Solution: method convertString (line 8) | def convertString(self, string: str): method groupStrings (line 16) | def groupStrings(self, strings: List[str]) -> List[List[str]]: FILE: Python/0250-count-univalue-subtrees.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method countUnivalSubtrees (line 14) | def countUnivalSubtrees(self, root: Optional[TreeNode]) -> int: FILE: Python/0252-meeting-rooms.py class Solution (line 6) | class Solution: method canAttendMeetings (line 7) | def canAttendMeetings(self, intervals: List[List[int]]) -> bool: FILE: Python/0253-meeting-rooms-ii.py class Solution (line 7) | class Solution: method minMeetingRooms (line 8) | def minMeetingRooms(self, intervals: List[List[int]]) -> int: FILE: Python/0254-factor-combinations.py class Solution (line 6) | class Solution: method getFactors (line 7) | def getFactors(self, n: int) -> List[List[int]]: FILE: Python/0255-verify-preorder-sequence-in-binary-search-tree.py class Solution (line 7) | class Solution: method verifyPreorder (line 8) | def verifyPreorder(self, preorder: List[int]) -> bool: FILE: Python/0256-paint-house.py class Solution (line 7) | class Solution: method minCost (line 8) | def minCost(self, costs: List[List[int]]) -> int: method minCost (line 29) | def minCost(self, costs: List[List[int]]) -> int: class Solution (line 28) | class Solution: method minCost (line 8) | def minCost(self, costs: List[List[int]]) -> int: method minCost (line 29) | def minCost(self, costs: List[List[int]]) -> int: FILE: Python/0257-binary-tree-paths.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method binaryTreePaths (line 14) | def binaryTreePaths(self, root: Optional[TreeNode]) -> List[str]: FILE: Python/0259-3sum-smaller.py class Solution (line 6) | class Solution: method threeSumSmaller (line 7) | def threeSumSmaller(self, nums: List[int], target: int) -> int: method twoSumSmaller (line 14) | def twoSumSmaller(self, nums: List[int], startIdx: int, target: int) -... FILE: Python/0260-single-number-iii.py class Solution (line 6) | class Solution: method singleNumber (line 7) | def singleNumber(self, nums: List[int]) -> List[int]: FILE: Python/0261-graph-valid-tree.py class UnionFind (line 7) | class UnionFind: method __init__ (line 8) | def __init__(self, size): method find (line 12) | def find(self, node): method union (line 17) | def union(self, node1, node2): class Solution (line 33) | class Solution: method validTree (line 34) | def validTree(self, n: int, edges: List[List[int]]) -> bool: method validTree (line 45) | def validTree(self, n: int, edges: List[List[int]]) -> bool: method validTree (line 69) | def validTree(self, n: int, edges: List[List[int]]) -> bool: class Solution (line 44) | class Solution: method validTree (line 34) | def validTree(self, n: int, edges: List[List[int]]) -> bool: method validTree (line 45) | def validTree(self, n: int, edges: List[List[int]]) -> bool: method validTree (line 69) | def validTree(self, n: int, edges: List[List[int]]) -> bool: class Solution (line 68) | class Solution: method validTree (line 34) | def validTree(self, n: int, edges: List[List[int]]) -> bool: method validTree (line 45) | def validTree(self, n: int, edges: List[List[int]]) -> bool: method validTree (line 69) | def validTree(self, n: int, edges: List[List[int]]) -> bool: FILE: Python/0263-ugly-number.py class Solution (line 3) | class Solution: method isUgly (line 4) | def isUgly(self, n: int) -> bool: FILE: Python/0264-ugly-number-ii.py class Solution (line 3) | class Solution: method nthUglyNumber (line 4) | def nthUglyNumber(self, n: int) -> int: FILE: Python/0265-paint-house-ii.py class Solution (line 6) | class Solution: method minCostII (line 7) | def minCostII(self, costs: List[List[int]]) -> int: FILE: Python/0266-palindrome-permutation.py class Solution (line 6) | class Solution: method canPermutePalindrome (line 7) | def canPermutePalindrome(self, s: str) -> bool: FILE: Python/0268-missing-number.py class Solution (line 6) | class Solution: method missingNumber (line 7) | def missingNumber(self, nums: List[int]) -> int: FILE: Python/0269-alien-dictionary.py class Solution (line 7) | class Solution: method alienOrder (line 8) | def alienOrder(self, words: List[str]) -> str: method alienOrder (line 40) | def alienOrder(self, words: List[str]) -> str: class Solution (line 39) | class Solution: method alienOrder (line 8) | def alienOrder(self, words: List[str]) -> str: method alienOrder (line 40) | def alienOrder(self, words: List[str]) -> str: FILE: Python/0270-closest-binary-search-tree-value.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method closestValue (line 14) | def closestValue(self, root: Optional[TreeNode], target: float) -> int: FILE: Python/0271-encode-and-decode-strings.py class Codec (line 6) | class Codec: method __init__ (line 7) | def __init__(self): method encode (line 10) | def encode(self, strs: List[str]) -> str: method decode (line 17) | def decode(self, s: str) -> List[str]: FILE: Python/0272-closest-binary-search-tree-value-ii.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method closestKValues (line 14) | def closestKValues(self, root: Optional[TreeNode], target: float, k: i... FILE: Python/0273-integer-to-english-words.py class Solution (line 1) | class Solution: method numberToWords (line 2) | def numberToWords(self, num: int) -> str: FILE: Python/0274-h-index.py class Solution (line 6) | class Solution: method hIndex (line 7) | def hIndex(self, citations: List[int]) -> int: FILE: Python/0276-paint-fence.py class Solution (line 6) | class Solution: method numWays (line 7) | def numWays(self, n: int, k: int) -> int: FILE: Python/0277-find-the-celebrity.py function knows (line 6) | def knows(a: int, b: int) -> bool: class Solution (line 10) | class Solution: method findCelebrity (line 11) | def findCelebrity(self, n: int) -> int: method isCelebrity (line 21) | def isCelebrity(self, i): FILE: Python/0278-first-bad-version.py function isBadVersion (line 3) | def isBadVersion(version: int) -> bool: class Solution (line 9) | class Solution: method firstBadVersion (line 10) | def firstBadVersion(self, n: int) -> int: FILE: Python/0279-perfect-squares.py class Solution (line 6) | class Solution(object): method numSquares (line 7) | def numSquares(self, n): method numSquares (line 26) | def numSquares(self, n: int) -> int: method numSquares (line 41) | def numSquares(self, n): method numSquares (line 59) | def numSquares(self, n): method isSquare (line 82) | def isSquare(self, n: int) -> bool: method numSquares (line 86) | def numSquares(self, n: int) -> int: class Solution (line 25) | class Solution: method numSquares (line 7) | def numSquares(self, n): method numSquares (line 26) | def numSquares(self, n: int) -> int: method numSquares (line 41) | def numSquares(self, n): method numSquares (line 59) | def numSquares(self, n): method isSquare (line 82) | def isSquare(self, n: int) -> bool: method numSquares (line 86) | def numSquares(self, n: int) -> int: class Solution (line 40) | class Solution: method numSquares (line 7) | def numSquares(self, n): method numSquares (line 26) | def numSquares(self, n: int) -> int: method numSquares (line 41) | def numSquares(self, n): method numSquares (line 59) | def numSquares(self, n): method isSquare (line 82) | def isSquare(self, n: int) -> bool: method numSquares (line 86) | def numSquares(self, n: int) -> int: class Solution (line 58) | class Solution: method numSquares (line 7) | def numSquares(self, n): method numSquares (line 26) | def numSquares(self, n: int) -> int: method numSquares (line 41) | def numSquares(self, n): method numSquares (line 59) | def numSquares(self, n): method isSquare (line 82) | def isSquare(self, n: int) -> bool: method numSquares (line 86) | def numSquares(self, n: int) -> int: class Solution (line 81) | class Solution: method numSquares (line 7) | def numSquares(self, n): method numSquares (line 26) | def numSquares(self, n: int) -> int: method numSquares (line 41) | def numSquares(self, n): method numSquares (line 59) | def numSquares(self, n): method isSquare (line 82) | def isSquare(self, n: int) -> bool: method numSquares (line 86) | def numSquares(self, n: int) -> int: FILE: Python/0283-move-zeroes.py class Solution (line 6) | class Solution: method moveZeroes (line 7) | def moveZeroes(self, nums: List[int]) -> None: FILE: Python/0285-inorder-successor-in-bst.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, x): class Solution (line 13) | class Solution: method inorderSuccessor (line 14) | def inorderSuccessor(self, root: TreeNode, p: TreeNode) -> Optional[Tr... FILE: Python/0286-walls-and-gates.py class Solution (line 7) | class Solution: method wallsAndGates (line 8) | def wallsAndGates(self, rooms: List[List[int]]) -> None: FILE: Python/0287-find-the-duplicate-number.py class Solution (line 6) | class Solution: method findDuplicate (line 7) | def findDuplicate(self, nums: List[int]) -> int: method findDuplicate (line 24) | def findDuplicate(self, nums: List[int]) -> int: class Solution (line 23) | class Solution: method findDuplicate (line 7) | def findDuplicate(self, nums: List[int]) -> int: method findDuplicate (line 24) | def findDuplicate(self, nums: List[int]) -> int: FILE: Python/0289-game-of-life.py class Solution (line 6) | class Solution: method gameOfLife (line 7) | def gameOfLife(self, board: List[List[int]]) -> None: FILE: Python/0290-word-pattern.py class Solution (line 3) | class Solution: method wordPattern (line 4) | def wordPattern(self, pattern: str, s: str) -> bool: FILE: Python/0291-word-pattern-ii.py class Solution (line 6) | class Solution: method wordPatternMatch (line 7) | def wordPatternMatch(self, pattern: str, s: str) -> bool: FILE: Python/0293-flip-game.py class Solution (line 6) | class Solution: method generatePossibleNextMoves (line 7) | def generatePossibleNextMoves(self, currentState: str) -> List[str]: FILE: Python/0295-find-median-from-data-stream.py class MedianFinder (line 6) | class MedianFinder: method __init__ (line 8) | def __init__(self): method addNum (line 13) | def addNum(self, num: int) -> None: method findMedian (line 19) | def findMedian(self) -> float: FILE: Python/0296-best-meeting-point.py class Solution (line 4) | class Solution: method minTotalDistance (line 5) | def minTotalDistance(self, grid: List[List[int]]) -> int: FILE: Python/0297-serialize-and-deserialize-binary-tree.py class Codec (line 9) | class Codec: method serialize (line 10) | def serialize(self, root: Optional[TreeNode]) -> str: method deserialize (line 26) | def deserialize(self, data: str) -> Optional[TreeNode]: FILE: Python/0298-binary-tree-longest-consecutive-sequence.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method longestConsecutive (line 15) | def longestConsecutive(self, root: Optional[TreeNode]) -> int: FILE: Python/0299-bulls-and-cows.py class Solution (line 6) | class Solution: method getHint (line 7) | def getHint(self, secret: str, guess: str) -> str: FILE: Python/0300-longest-increasing-subsequence.py class Solution (line 7) | class Solution: method lengthOfLIS (line 8) | def lengthOfLIS(self, nums: List[int]) -> int: method lengthOfLIS (line 21) | def lengthOfLIS(self, nums: List[int]) -> int: method lengthOfLIS (line 31) | def lengthOfLIS(self, nums: List[int]) -> int: class Solution (line 20) | class Solution: method lengthOfLIS (line 8) | def lengthOfLIS(self, nums: List[int]) -> int: method lengthOfLIS (line 21) | def lengthOfLIS(self, nums: List[int]) -> int: method lengthOfLIS (line 31) | def lengthOfLIS(self, nums: List[int]) -> int: class Solution (line 30) | class Solution: method lengthOfLIS (line 8) | def lengthOfLIS(self, nums: List[int]) -> int: method lengthOfLIS (line 21) | def lengthOfLIS(self, nums: List[int]) -> int: method lengthOfLIS (line 31) | def lengthOfLIS(self, nums: List[int]) -> int: FILE: Python/0301-remove-invalid-parentheses.py class Solution (line 6) | class Solution: method removeInvalidParentheses (line 7) | def removeInvalidParentheses(self, s: str) -> List[str]: FILE: Python/0302-smallest-rectangle-enclosing-black-pixels.py class Solution (line 6) | class Solution: method minArea (line 7) | def minArea(self, image: List[List[str]], x: int, y: int) -> int: FILE: Python/0303-range-sum-query-immutable.py class NumArray (line 6) | class NumArray: method __init__ (line 8) | def __init__(self, nums: List[int]): method sumRange (line 13) | def sumRange(self, left: int, right: int) -> int: method __init__ (line 21) | def __init__(self, nums: List[int]): method buildTree (line 26) | def buildTree(self, idx, start, end, nums): method rangeSumQuery (line 40) | def rangeSumQuery(self, idx, left, right, start, end): method sumRange (line 53) | def sumRange(self, left: int, right: int) -> int: class NumArray (line 20) | class NumArray: method __init__ (line 8) | def __init__(self, nums: List[int]): method sumRange (line 13) | def sumRange(self, left: int, right: int) -> int: method __init__ (line 21) | def __init__(self, nums: List[int]): method buildTree (line 26) | def buildTree(self, idx, start, end, nums): method rangeSumQuery (line 40) | def rangeSumQuery(self, idx, left, right, start, end): method sumRange (line 53) | def sumRange(self, left: int, right: int) -> int: FILE: Python/0304-range-sum-query-2d-immutable.py class NumMatrix (line 6) | class NumMatrix: method __init__ (line 8) | def __init__(self, matrix: List[List[int]]): method sumRegion (line 19) | def sumRegion(self, row1: int, col1: int, row2: int, col2: int) -> int: FILE: Python/0305-number-of-islands-ii.py class Solution (line 6) | class Solution: class UnionFind (line 7) | class UnionFind: method __init__ (line 8) | def __init__(self, size): method find (line 13) | def find(self, node): method union (line 18) | def union(self, node1, node2): method numIslands2 (line 31) | def numIslands2(self, m: int, n: int, positions: List[List[int]]) -> L... FILE: Python/0307-range-sum-query-mutable.py class NumArray (line 8) | class NumArray: method __init__ (line 10) | def __init__(self, nums: List[int]): method buildTree (line 15) | def buildTree(self, nums, nodeIdx, start, end): method update (line 29) | def update(self, index: int, val: int, nodeIdx = 0, start = 0, end = N... method sumRange (line 47) | def sumRange(self, left: int, right: int, nodeIdx = 0, start = 0, end ... FILE: Python/0309-best-time-to-buy-and-sell-stock-with-cooldown.py class Solution (line 7) | class Solution: method maxProfit (line 8) | def maxProfit(self, prices: List[int]) -> int: FILE: Python/0310-minimum-height-trees.py class Solution (line 6) | class Solution: method findMinHeightTrees (line 7) | def findMinHeightTrees(self, n: int, edges: List[List[int]]) -> List[i... FILE: Python/0311-sparse-matrix-multiplication.py class Solution (line 6) | class Solution: method multiply (line 7) | def multiply(self, mat1: List[List[int]], mat2: List[List[int]]) -> Li... FILE: Python/0312-burst-balloons.py class Solution (line 7) | class Solution: method maxCoins (line 8) | def maxCoins(self, nums: List[int]) -> int: method maxCoins (line 30) | def maxCoins(self, nums: List[int]) -> int: class Solution (line 29) | class Solution: method maxCoins (line 8) | def maxCoins(self, nums: List[int]) -> int: method maxCoins (line 30) | def maxCoins(self, nums: List[int]) -> int: FILE: Python/0314-binary-tree-vertical-order-traversal.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method verticalOrder (line 15) | def verticalOrder(self, root: Optional[TreeNode]) -> List[List[int]]: FILE: Python/0315-count-of-smaller-numbers-after-self.py class SegmentTree (line 6) | class SegmentTree: method __init__ (line 7) | def __init__(self, size: int): method update (line 11) | def update(self, idx: int, val: int, nodeIdx=0, start=0, end=None): method query (line 29) | def query(self, left: int, right: int, nodeIdx=0, start=0, end=None) -... class Solution (line 43) | class Solution: method countSmaller (line 44) | def countSmaller(self, nums: List[int]) -> List[int]: FILE: Python/0316-remove-duplicate-letters.py class Solution (line 3) | class Solution: method removeDuplicateLetters (line 4) | def removeDuplicateLetters(self, s: str) -> str: FILE: Python/0317-shortest-distance-from-all-buildings.py class Solution (line 7) | class Solution: method shortestDistance (line 8) | def shortestDistance(self, grid: List[List[int]]) -> int: FILE: Python/0320-generalized-abbreviation.py class Solution (line 6) | class Solution: method storeAbbreviations (line 7) | def storeAbbreviations( method generateAbbreviations (line 35) | def generateAbbreviations(self, word: str) -> List[str]: FILE: Python/0322-coin-change.py class Solution (line 7) | class Solution: method coinChange (line 8) | def coinChange(self, coins: List[int], amount: int) -> int: method coinChange (line 17) | def coinChange(self, coins: List[int], amount: int) -> int: class Solution (line 16) | class Solution: method coinChange (line 8) | def coinChange(self, coins: List[int], amount: int) -> int: method coinChange (line 17) | def coinChange(self, coins: List[int], amount: int) -> int: FILE: Python/0323-number-of-connected-components-in-an-undirected-graph.py class UnionFind (line 6) | class UnionFind(): method __init__ (line 7) | def __init__(self, n): method find (line 11) | def find(self, node): method union (line 16) | def union(self, node1, node2): class Solution (line 29) | class Solution: method countComponents (line 30) | def countComponents(self, n: int, edges: List[List[int]]) -> int: FILE: Python/0325-maximum-size-subarray-sum-equals-k.py class Solution (line 7) | class Solution: method maxSubArrayLen (line 8) | def maxSubArrayLen(self, nums: List[int], k: int) -> int: FILE: Python/0326-power-of-three.py class Solution (line 3) | class Solution: method isPowerOfThree (line 4) | def isPowerOfThree(self, n: int) -> bool: FILE: Python/0327-count-of-range-sum.py class SegmentTree (line 6) | class SegmentTree: method __init__ (line 7) | def __init__(self, size: int): method update (line 11) | def update(self, idx: int, val: int, nodeIdx=0, start=0, end=None): method query (line 29) | def query(self, left: int, right: int, nodeIdx=0, start=0, end=None) -... class Solution (line 43) | class Solution: method countRangeSum (line 44) | def countRangeSum(self, nums: List[int], lower: int, upper: int) -> int: FILE: Python/0328-odd-even-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method oddEvenList (line 13) | def oddEvenList(self, head: Optional[ListNode]) -> Optional[ListNode]: FILE: Python/0329-longest-increasing-path-in-a-matrix.py class Solution (line 6) | class Solution: method longestIncreasingPath (line 7) | def longestIncreasingPath(self, matrix: List[List[int]]) -> int: FILE: Python/0330-patching-array.py class Solution (line 6) | class Solution: method minPatches (line 7) | def minPatches(self, nums: List[int], n: int) -> int: FILE: Python/0331-verify-preorder-serialization-of-a-binary-tree.py class Solution (line 3) | class Solution: method isValidSerialization (line 4) | def isValidSerialization(self, preorder: str) -> bool: FILE: Python/0332-reconstruct-itinerary.py class Solution (line 7) | class Solution: method findItinerary (line 8) | def findItinerary(self, tickets: List[List[str]]) -> List[str]: FILE: Python/0333-largest-bst-subtree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method isValid (line 14) | def isValid(self, root: Optional[TreeNode]) -> bool: method countNode (line 24) | def countNode(self, root: Optional[TreeNode]) -> int: method largestBSTSubtree (line 29) | def largestBSTSubtree(self, root: Optional[TreeNode]) -> int: FILE: Python/0334-increasing-triplet-subsequence.py class Solution (line 6) | class Solution: method increasingTriplet (line 7) | def increasingTriplet(self, nums: List[int]) -> bool: FILE: Python/0337-house-robber-iii.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method rob (line 14) | def rob(self, root: Optional[TreeNode]) -> int: FILE: Python/0338-counting-bits.py class Solution (line 6) | class Solution: method countBits (line 7) | def countBits(self, n: int) -> List[int]: method countBits (line 15) | def countBits(self, n: int) -> List[int]: class Solution (line 14) | class Solution: method countBits (line 7) | def countBits(self, n: int) -> List[int]: method countBits (line 15) | def countBits(self, n: int) -> List[int]: FILE: Python/0339-nested-list-weight-sum.py class Solution (line 46) | class Solution: method depthSum (line 47) | def depthSum(self, nestedList: List[NestedInteger]) -> int: FILE: Python/0340-longest-substring-with-at-most-k-distinct-characters.py class Solution (line 6) | class Solution: method lengthOfLongestSubstringKDistinct (line 7) | def lengthOfLongestSubstringKDistinct(self, s: str, k: int) -> int: FILE: Python/0341-flatten-nested-list-iterator.py class NestedIterator (line 1) | class NestedIterator: method __init__ (line 2) | def __init__(self, nestedList: [NestedInteger]): method next (line 13) | def next(self) -> int: method hasNext (line 17) | def hasNext(self) -> bool: FILE: Python/0342-power-of-four.py class Solution (line 3) | class Solution: method isPowerOfFour (line 4) | def isPowerOfFour(self, n: int) -> bool: FILE: Python/0343-integer-break.py class Solution (line 4) | class Solution: method integerBreak (line 5) | def integerBreak(self, n: int) -> int: FILE: Python/0344-reverse-string.py class Solution (line 6) | class Solution: method reverseString (line 7) | def reverseString(self, s: List[str]) -> None: FILE: Python/0345-reverse-vowels-of-a-string.py class Solution (line 3) | class Solution: method reverseVowels (line 4) | def reverseVowels(self, s: str) -> str: FILE: Python/0346-moving-average-from-data-stream.py class MovingAverage (line 3) | class MovingAverage: method __init__ (line 5) | def __init__(self, size: int): method next (line 9) | def next(self, val: int) -> float: FILE: Python/0347-top-k-frequent-elements.py class Solution (line 8) | class Solution: method topKFrequent (line 9) | def topKFrequent(self, nums: List[int], k: int) -> List[int]: FILE: Python/0348-design-tic-tac-toe.py class TicTacToe (line 3) | class TicTacToe: method __init__ (line 5) | def __init__(self, n: int): method move (line 11) | def move(self, row: int, col: int, player: int) -> int: FILE: Python/0349-intersection-of-two-arrays.py class Solution (line 6) | class Solution: method intersection (line 7) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: method intersection (line 13) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: method intersection (line 19) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: method intersection (line 39) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: class Solution (line 12) | class Solution: method intersection (line 7) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: method intersection (line 13) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: method intersection (line 19) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: method intersection (line 39) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: class Solution (line 18) | class Solution: method intersection (line 7) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: method intersection (line 13) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: method intersection (line 19) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: method intersection (line 39) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: class Solution (line 38) | class Solution: method intersection (line 7) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: method intersection (line 13) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: method intersection (line 19) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: method intersection (line 39) | def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: FILE: Python/0350-intersection-of-two-arrays-ii.py class Solution (line 6) | class Solution: method intersect (line 7) | def intersect(self, nums1: List[int], nums2: List[int]) -> List[int]: FILE: Python/0351-android-unlock-patterns.py class Solution (line 3) | class Solution: method __init__ (line 4) | def __init__(self): method validSelection (line 15) | def validSelection(self, candidate, keyPadNum): method backtracking (line 22) | def backtracking(self, keyPadNum, numberOfPresses, keyPressesNeeded): method numberOfPatterns (line 34) | def numberOfPatterns(self, m: int, n: int) -> int: FILE: Python/0352-data-stream-as-disjoint-intervals.py class SummaryRanges (line 6) | class SummaryRanges: method __init__ (line 8) | def __init__(self): method addNum (line 11) | def addNum(self, value: int) -> None: method getIntervals (line 14) | def getIntervals(self) -> List[List[int]]: FILE: Python/0353-domino-and-tromino-tiling.py class Solution (line 6) | class Solution: method numTilings (line 7) | def numTilings(self, n: int) -> int: FILE: Python/0354-russian-doll-envelopes.py class Solution (line 6) | class Solution: method maxEnvelopes (line 7) | def maxEnvelopes(self, envelopes: List[List[int]]) -> int: FILE: Python/0355-design-twitter.py class Twitter (line 7) | class Twitter: method __init__ (line 9) | def __init__(self): method postTweet (line 14) | def postTweet(self, userId: int, tweetId: int) -> None: method getNewsFeed (line 18) | def getNewsFeed(self, userId: int) -> List[int]: method follow (line 30) | def follow(self, followerId: int, followeeId: int) -> None: method unfollow (line 34) | def unfollow(self, followerId: int, followeeId: int) -> None: FILE: Python/0358-rearrange-string-k-distance-apart.py class Solution (line 5) | class Solution: method rearrangeString (line 6) | def rearrangeString(self, s: str, k: int) -> str: FILE: Python/0359-logger-rate-limiter.py class Logger (line 6) | class Logger: method __init__ (line 8) | def __init__(self): method shouldPrintMessage (line 11) | def shouldPrintMessage(self, timestamp: int, message: str) -> bool: FILE: Python/0361-bomb-enemy.py class Solution (line 6) | class Solution: method maxKilledEnemies (line 7) | def maxKilledEnemies(self, grid: List[List[str]]) -> int: FILE: Python/0362-design-hit-counter.py class HitCounter (line 1) | class HitCounter: method __init__ (line 3) | def __init__(self): method hit (line 6) | def hit(self, timestamp: int) -> None: method getHits (line 9) | def getHits(self, timestamp: int) -> int: FILE: Python/0364-nested-list-weight-sum-ii.py class Solution (line 49) | class Solution: method depthSumInverse (line 50) | def depthSumInverse(self, nestedList: List[NestedInteger]) -> int: FILE: Python/0366-find-leaves-of-binary-tree.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method findLeaves (line 15) | def findLeaves(self, root: Optional[TreeNode]) -> List[List[int]]: FILE: Python/0368-largest-divisible-subset.py class Solution (line 6) | class Solution: method largestDivisibleSubset (line 7) | def largestDivisibleSubset(self, nums: List[int]) -> List[int]: FILE: Python/0370-range-addition.py class Solution (line 6) | class Solution: method getModifiedArray (line 7) | def getModifiedArray(self, length: int, updates: List[List[int]]) -> L... FILE: Python/0371-sum-of-two-integers.py class Solution (line 3) | class Solution: method getSum (line 4) | def getSum(self, a: int, b: int) -> int: method getSum (line 68) | def getSum(self, a: int, b: int) -> int: class Solution (line 67) | class Solution: method getSum (line 4) | def getSum(self, a: int, b: int) -> int: method getSum (line 68) | def getSum(self, a: int, b: int) -> int: FILE: Python/0373-find-k-pairs-with-smallest-sums.py class Solution (line 7) | class Solution: method kSmallestPairs (line 8) | def kSmallestPairs(self, nums1: List[int], nums2: List[int], k: int) -... FILE: Python/0374-guess-number-higher-or-lower.py function guess (line 3) | def guess(mid: int) -> int: class Solution (line 12) | class Solution: method guessNumber (line 13) | def guessNumber(self, n: int) -> int: FILE: Python/0377-combination-sum-iv.py class Solution (line 5) | class Solution: method combinationSum4 (line 6) | def combinationSum4(self, nums: List[int], target: int) -> int: FILE: Python/0378-kth-smallest-element-in-a-sorted-matrix.py class Solution (line 7) | class Solution: method kthSmallest (line 8) | def kthSmallest(self, matrix: List[List[int]], k: int) -> int: FILE: Python/0380-insert-delete-getrandom-o1.py class RandomizedSet (line 6) | class RandomizedSet: method __init__ (line 8) | def __init__(self): method insert (line 12) | def insert(self, val: int) -> bool: method remove (line 19) | def remove(self, val: int) -> bool: method getRandom (line 29) | def getRandom(self) -> int: FILE: Python/0383-ransom-note.py class Solution (line 5) | class Solution: method canConstruct (line 6) | def canConstruct(self, ransomNote: str, magazine: str) -> bool: FILE: Python/0386-lexicographical-numbers.py class Solution (line 6) | class Solution: method lexicalOrder (line 7) | def lexicalOrder(self, n: int) -> List[int]: method generateLexicalNumbers (line 13) | def generateLexicalNumbers(self, currentNumber: int, limit: int, resul... method lexicalOrder (line 26) | def lexicalOrder(self, n: int) -> List[int]: class Solution (line 25) | class Solution: method lexicalOrder (line 7) | def lexicalOrder(self, n: int) -> List[int]: method generateLexicalNumbers (line 13) | def generateLexicalNumbers(self, currentNumber: int, limit: int, resul... method lexicalOrder (line 26) | def lexicalOrder(self, n: int) -> List[int]: FILE: Python/0387-first-unique-character-in-a-string.py class Solution (line 6) | class Solution: method firstUniqChar (line 7) | def firstUniqChar(self, s: str) -> int: FILE: Python/0388-longest-absolute-file-path.py class Solution (line 6) | class Solution: method lengthLongestPath (line 7) | def lengthLongestPath(self, input: str) -> int: FILE: Python/0389-find-the-difference.py class Solution (line 6) | class Solution: method findTheDifference (line 7) | def findTheDifference(self, s: str, t: str) -> str: FILE: Python/0390-elimination-game.py class Solution (line 3) | class Solution: method lastRemaining (line 4) | def lastRemaining(self, n: int) -> int: FILE: Python/0391-perfect-rectangle.py class Solution (line 7) | class Solution: method isRectangleCover (line 8) | def isRectangleCover(self, rectangles: List[List[int]]) -> bool: FILE: Python/0392-is-subsequence.py class Solution (line 6) | class Solution: method isSubsequence (line 7) | def isSubsequence(self, s: str, t: str) -> bool: FILE: Python/0393-utf-8-validation.py class Solution (line 6) | class Solution: method validUtf8 (line 7) | def validUtf8(self, data: List[int]) -> bool: FILE: Python/0394-decode-string.py class Solution (line 3) | class Solution: method decodeString (line 4) | def decodeString(self, s: str) -> str: FILE: Python/0395-longest-substring-with-at-least-k-repeating-characters.py class Solution (line 3) | class Solution: method longestSubstring (line 4) | def longestSubstring(self, s: str, k: int) -> int: FILE: Python/0396-rotate-function.py class Solution (line 6) | class Solution: method maxRotateFunction (line 7) | def maxRotateFunction(self, nums: List[int]) -> int: FILE: Python/0397-integer-replacement.py class Solution (line 3) | class Solution: method integerReplacement (line 4) | def integerReplacement(self, n: int) -> int: FILE: Python/0398-random-pick-index.py class Solution (line 8) | class Solution: method __init__ (line 9) | def __init__(self, nums: List[int]): method pick (line 14) | def pick(self, target: int) -> int: FILE: Python/0399-evaluate-division.py class Solution (line 7) | class Solution: method calcEquation (line 8) | def calcEquation(self, equations: List[List[str]], values: List[float]... FILE: Python/0400-nth-digit.py class Solution (line 3) | class Solution: method findNthDigit (line 4) | def findNthDigit(self, n: int) -> int: FILE: Python/0401-binary-watch.py class Solution (line 6) | class Solution: method readBinaryWatch (line 7) | def readBinaryWatch(self, turnedOn: int) -> List[str]: FILE: Python/0402-remove-k-digits.py class Solution (line 3) | class Solution: method removeKdigits (line 4) | def removeKdigits(self, num: str, k: int) -> str: FILE: Python/0403-frog-jump.py class Solution (line 8) | class Solution: method canCross (line 9) | def canCross(self, stones: List[int]) -> bool: FILE: Python/0404-sum-of-left-leaves.py class TreeNode (line 4) | class TreeNode: method __init__ (line 5) | def __init__(self, val=0, left=None, right=None): class Solution (line 11) | class Solution: method sumOfLeftLeaves (line 12) | def sumOfLeftLeaves(self, root: Optional[TreeNode]) -> int: FILE: Python/0405-convert-a-number-to-hexadecimal.py class Solution (line 3) | class Solution: method toHex (line 4) | def toHex(self, num: int) -> str: FILE: Python/0406-queue-reconstruction-by-height.py class Solution (line 6) | class Solution: method reconstructQueue (line 7) | def reconstructQueue(self, people: List[List[int]]) -> List[List[int]]: FILE: Python/0407-trapping-rain-water-ii.py class Solution (line 7) | class Solution: method trapRainWater (line 8) | def trapRainWater(self, heightMap: List[List[int]]) -> int: FILE: Python/0408-valid-word-abbreviation.py class Solution (line 3) | class Solution: method validWordAbbreviation (line 4) | def validWordAbbreviation(self, word: str, abbr: str) -> bool: FILE: Python/0409-longest-palindrome.py class Solution (line 6) | class Solution: method longestPalindrome (line 7) | def longestPalindrome(self, s: str) -> int: FILE: Python/0410-split-array-largest-sum.py class Solution (line 6) | class Solution: method splitArray (line 7) | def splitArray(self, nums: List[int], k: int) -> int: FILE: Python/0414-third-maximum-number.py class Solution (line 7) | class Solution: method thirdMax (line 8) | def thirdMax(self, nums: List[int]) -> int: FILE: Python/0416-partition-equal-subset-sum.py class Solution (line 8) | class Solution: method canPartition (line 9) | def canPartition(self, nums: List[int]) -> bool: method canPartition (line 27) | def canPartition(self, nums: List[int]) -> bool: class Solution (line 26) | class Solution: method canPartition (line 9) | def canPartition(self, nums: List[int]) -> bool: method canPartition (line 27) | def canPartition(self, nums: List[int]) -> bool: FILE: Python/0417-pacific-atlantic-water-flow.py class Solution (line 7) | class Solution: method pacificAtlantic (line 8) | def pacificAtlantic(self, heights: List[List[int]]) -> List[List[int]]: FILE: Python/0424-longest-repeating-character-replacement.py class Solution (line 6) | class Solution: method characterReplacement (line 7) | def characterReplacement(self, s: str, k: int) -> int: FILE: Python/0425-word-squares.py class Solution (line 7) | class Solution: method wordSquares (line 9) | def wordSquares(self, words: List[str]) -> List[List[str]]: FILE: Python/0426-convert-binary-search-tree-to-sorted-doubly-linked-list.py class Node (line 3) | class Node: method __init__ (line 4) | def __init__(self, val, left=None, right=None): class Solution (line 10) | class Solution: method treeToDoublyList (line 11) | def treeToDoublyList(self, root: 'Node') -> 'Node': FILE: Python/0427-construct-quad-tree.py class Node (line 6) | class Node: method __init__ (line 7) | def __init__(self, val, isLeaf, topLeft=None, topRight=None, bottomLef... class Solution (line 16) | class Solution: method construct (line 17) | def construct(self, grid: List[List[int]]) -> 'Node': method helper (line 20) | def helper(self, grid, i, j, w): method allSame (line 31) | def allSame(self, grid, i, j, w): FILE: Python/0432-all-oone-data-structure.py class Node (line 1) | class Node: method __init__ (line 2) | def __init__(self, freq): class AllOne (line 9) | class AllOne: method __init__ (line 10) | def __init__(self): method inc (line 17) | def inc(self, key: str) -> None: method dec (line 55) | def dec(self, key: str) -> None: method getMaxKey (line 85) | def getMaxKey(self) -> str: method getMinKey (line 92) | def getMinKey(self) -> str: method removeNode (line 99) | def removeNode(self, node): FILE: Python/0433-minimum-genetic-mutation.py class Solution (line 7) | class Solution: method minMutation (line 8) | def minMutation(self, startGene: str, endGene: str, bank: List[str]) -... FILE: Python/0435-non-overlapping-intervals.py class Solution (line 6) | class Solution: method eraseOverlapIntervals (line 7) | def eraseOverlapIntervals(self, intervals: List[List[int]]) -> int: FILE: Python/0436-find-right-interval.py class Solution (line 7) | class Solution: method findRightInterval (line 8) | def findRightInterval(self, intervals: List[List[int]]) -> List[int]: FILE: Python/0437-path-sum-iii.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method pathSum (line 16) | def pathSum(self, root: Optional[TreeNode], targetSum: int) -> int: FILE: Python/0438-find-all-anagrams-in-a-string.py class Solution (line 6) | class Solution: method findAnagrams (line 7) | def findAnagrams(self, original: str, target: str) -> List[int]: FILE: Python/0439-ternary-expression-parser.py class Solution (line 1) | class Solution: method parseTernary (line 2) | def parseTernary(self, expression: str) -> str: FILE: Python/0440-k-th-smallest-in-lexicographical-order.py class Solution (line 3) | class Solution(object): method findKthNumber (line 4) | def findKthNumber(self, n, k): method countSteps (line 19) | def countSteps(self, n, prefix1, prefix2): FILE: Python/0442-find-all-duplicates-in-an-array.py class Solution (line 7) | class Solution: method findDuplicates (line 8) | def findDuplicates(self, nums: List[int]) -> List[int]: method findDuplicates (line 18) | def findDuplicates(self, nums: List[int]) -> List[int]: class Solution (line 17) | class Solution: method findDuplicates (line 8) | def findDuplicates(self, nums: List[int]) -> List[int]: method findDuplicates (line 18) | def findDuplicates(self, nums: List[int]) -> List[int]: FILE: Python/0443-string-compression.py class Solution (line 6) | class Solution: method compress (line 7) | def compress(self, chars: List[str]) -> int: FILE: Python/0444-sequence-reconstruction.py class Solution (line 7) | class Solution: method sequenceReconstruction (line 8) | def sequenceReconstruction(self, nums: List[int], sequences: List[List... FILE: Python/0445-add-two-numbers-ii.py class Solution (line 9) | class Solution: method reverseList (line 10) | def reverseList(self, node: Optional[ListNode]) -> Optional[ListNode]: method addTwoNumbers (line 19) | def addTwoNumbers(self, l1: Optional[ListNode], l2: Optional[ListNode]... FILE: Python/0446-arithmetic-slices-ii-subsequence.py class Solution (line 5) | class Solution: method numberOfArithmeticSlices (line 6) | def numberOfArithmeticSlices(self, nums: List[int]) -> int: FILE: Python/0448-find-all-numbers-disappeared-in-an-array.py class Solution (line 6) | class Solution: method findDisappearedNumbers (line 7) | def findDisappearedNumbers(self, nums: List[int]) -> List[int]: FILE: Python/0449-serialize-and-deserialize-bst.py class Codec (line 9) | class Codec: method serialize (line 10) | def serialize(self, root: Optional[TreeNode]) -> str: method deserialize (line 15) | def deserialize(self, data: str) -> Optional[TreeNode]: FILE: Python/0450-delete-node-in-a-bst.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method traverse (line 14) | def traverse(self, node: Optional[TreeNode]): method deleteNode (line 21) | def deleteNode(self, root: Optional[TreeNode], key: int) -> Optional[T... FILE: Python/0451-sort-characters-by-frequency.py class Solution (line 6) | class Solution: method frequencySort (line 7) | def frequencySort(self, s: str) -> str: FILE: Python/0452-minimum-number-of-arrows-to-burst-balloons.py class Solution (line 6) | class Solution: method findMinArrowShots (line 7) | def findMinArrowShots(self, points: List[List[int]]) -> int: FILE: Python/0455-assign-cookies.py class Solution (line 6) | class Solution: method findContentChildren (line 7) | def findContentChildren(self, greedyChildren: List[int], cookiesSize: ... FILE: Python/0456-132-pattern.py class Solution (line 5) | class Solution: method find132pattern (line 6) | def find132pattern(self, nums: List[int]) -> bool: FILE: Python/0457-circular-array-loop.py class Solution (line 6) | class Solution: method circularArrayLoop (line 7) | def circularArrayLoop(self, nums: List[int]) -> bool: FILE: Python/0458-poor-pigs.py class Solution (line 4) | class Solution: method poorPigs (line 5) | def poorPigs(self, buckets: int, minutesToDie: int, minutesToTest: int... FILE: Python/0459-repeated-substring-pattern.py class Solution (line 1) | class Solution: method repeatedSubstringPattern (line 2) | def repeatedSubstringPattern(self, s: str) -> bool: FILE: Python/0460-lfu-cache.py class LFUCache (line 6) | class LFUCache: method __init__ (line 7) | def __init__(self, capacity: int): method insert (line 13) | def insert(self, key, frequency, value): method get (line 17) | def get(self, key: int) -> int: method put (line 29) | def put(self, key: int, value: int) -> None: FILE: Python/0463-island-perimeter.py class Solution (line 6) | class Solution: method islandPerimeter (line 7) | def islandPerimeter(self, grid: List[List[int]]) -> int: FILE: Python/0465-optimal-account-balancing.py class Solution (line 7) | class Solution: method minTransfers (line 8) | def minTransfers(self, transactions: List[List[int]]) -> int: FILE: Python/0473-matchsticks-to-square.py class Solution (line 6) | class Solution: method makesquare (line 7) | def makesquare(self, matchsticks: List[int]) -> bool: FILE: Python/0474-ones-and-zeroes.py class Solution (line 7) | class Solution: method findMaxForm (line 8) | def findMaxForm(self, strs: List[str], m: int, n: int) -> int: method findMaxForm (line 25) | def findMaxForm(self, strs: List[str], m: int, n: int) -> int: class Solution (line 24) | class Solution: method findMaxForm (line 8) | def findMaxForm(self, strs: List[str], m: int, n: int) -> int: method findMaxForm (line 25) | def findMaxForm(self, strs: List[str], m: int, n: int) -> int: FILE: Python/0475-heaters.py class Solution (line 6) | class Solution: method findRadius (line 7) | def findRadius(self, houses: List[int], heaters: List[int]) -> int: FILE: Python/0476-number-complement.py class Solution (line 3) | class Solution: method findComplement (line 4) | def findComplement(self, num: int) -> int: FILE: Python/0485-max-consecutive-ones.py class Solution (line 6) | class Solution: method findMaxConsecutiveOnes (line 7) | def findMaxConsecutiveOnes(self, nums: List[int]) -> int: FILE: Python/0486-predict-the-winner.py class Solution (line 5) | class Solution: method PredictTheWinner (line 6) | def PredictTheWinner(self, nums: List[int]) -> bool: FILE: Python/0487-max-consecutive-ones-ii.py class Solution (line 6) | class Solution: method findMaxConsecutiveOnes (line 7) | def findMaxConsecutiveOnes(self, nums: List[int]) -> int: FILE: Python/0489-robot-room-cleaner.py class Solution (line 35) | class Solution: method cleanRoom (line 36) | def cleanRoom(self, robot): FILE: Python/0490-the-maze.py class Solution (line 7) | class Solution: method hasPath (line 8) | def hasPath(self, maze: List[List[int]], start: List[int], destination... FILE: Python/0491-non-decreasing-subsequences.py class Solution (line 6) | class Solution: method findSubsequences (line 7) | def findSubsequences(self, nums: List[int]) -> List[List[int]]: FILE: Python/0493-reverse-pairs.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, start, end, val=0, left=None, right=None): class SegmentTree (line 15) | class SegmentTree: method __init__ (line 16) | def __init__(self, n): method build (line 19) | def build(self, l, r): method update (line 26) | def update(self, root, index, value): method query (line 36) | def query(self, root, l, r) -> int: class Solution (line 44) | class Solution: method reversePairs (line 45) | def reversePairs(self, nums: List[int]) -> int: FILE: Python/0494-target-sum.py class Solution (line 5) | class Solution: method findTargetSumWays (line 6) | def findTargetSumWays(self, nums: List[int], target: int) -> int: method findTargetSumWays (line 25) | def findTargetSumWays(self, nums: List[int], target: int) -> int: method findTargetSumWays (line 44) | def findTargetSumWays(self, nums: List[int], target: int) -> int: class Solution (line 24) | class Solution: method findTargetSumWays (line 6) | def findTargetSumWays(self, nums: List[int], target: int) -> int: method findTargetSumWays (line 25) | def findTargetSumWays(self, nums: List[int], target: int) -> int: method findTargetSumWays (line 44) | def findTargetSumWays(self, nums: List[int], target: int) -> int: class Solution (line 43) | class Solution: method findTargetSumWays (line 6) | def findTargetSumWays(self, nums: List[int], target: int) -> int: method findTargetSumWays (line 25) | def findTargetSumWays(self, nums: List[int], target: int) -> int: method findTargetSumWays (line 44) | def findTargetSumWays(self, nums: List[int], target: int) -> int: FILE: Python/0496-next-greater-element-i.py class Solution (line 7) | class Solution: method nextGreaterElement (line 8) | def nextGreaterElement(self, nums1: List[int], nums2: List[int]) -> Li... FILE: Python/0498-diagonal-traverse.py class Solution (line 7) | class Solution: method findDiagonalOrder (line 8) | def findDiagonalOrder(self, mat: List[List[int]]) -> List[int]: FILE: Python/0499-the-maze-iii.py class Solution (line 7) | class Solution: method findShortestWay (line 8) | def findShortestWay(self, maze: List[List[int]], ball: List[int], hole... FILE: Python/0501-find-mode-in-binary-search-tree.py class TreeNode (line 9) | class TreeNode: method __init__ (line 10) | def __init__(self, val=0, left=None, right=None): class Solution (line 16) | class Solution: method findMode (line 17) | def findMode(self, root: Optional[TreeNode]) -> List[int]: FILE: Python/0502-ipo.py class Solution (line 7) | class Solution: method findMaximizedCapital (line 8) | def findMaximizedCapital(self, k: int, w: int, profits: List[int], cap... FILE: Python/0505-the-maze-ii.py class Solution (line 8) | class Solution: method shortestDistance (line 9) | def shortestDistance(self, maze: List[List[int]], start: List[int], de... FILE: Python/0506-relative-ranks.py class Solution (line 7) | class Solution: method findRelativeRanks (line 8) | def findRelativeRanks(self, scores: List[int]) -> List[str]: method findRelativeRanks (line 24) | def findRelativeRanks(self, score: List[int]) -> List[str]: class Solution (line 23) | class Solution: method findRelativeRanks (line 8) | def findRelativeRanks(self, scores: List[int]) -> List[str]: method findRelativeRanks (line 24) | def findRelativeRanks(self, score: List[int]) -> List[str]: FILE: Python/0509-fibonacci-number.py class Solution (line 1) | class Solution: method fib (line 2) | def fib(self, n: int) -> int: FILE: Python/0510-inorder-successor-in-bst-ii.py class Node (line 6) | class Node: method __init__ (line 7) | def __init__(self, val): class Solution (line 14) | class Solution: method inorderSuccessor (line 15) | def inorderSuccessor(self, node: 'Node') -> 'Optional[Node]': FILE: Python/0513-find-bottom-left-tree-value.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method findBottomLeftValue (line 15) | def findBottomLeftValue(self, root: Optional[TreeNode]) -> int: FILE: Python/0514-freedom-trail.py class Solution (line 6) | class Solution: method findRotateSteps (line 7) | def findRotateSteps(self, ring: str, key: str) -> int: FILE: Python/0515-find-largest-value-in-each-tree-row.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method largestValues (line 14) | def largestValues(self, root: Optional[TreeNode]) -> List[int]: FILE: Python/0516-longest-palindromic-subsequence.py class Solution (line 3) | class Solution: method longestPalindromeSubseq (line 4) | def longestPalindromeSubseq(self, s: str) -> int: method longestCommonSubsequence (line 20) | def longestCommonSubsequence(self, s: str, t: str) -> int: method longestPalindromeSubseq (line 33) | def longestPalindromeSubseq(self, s: str) -> int: class Solution (line 19) | class Solution: method longestPalindromeSubseq (line 4) | def longestPalindromeSubseq(self, s: str) -> int: method longestCommonSubsequence (line 20) | def longestCommonSubsequence(self, s: str, t: str) -> int: method longestPalindromeSubseq (line 33) | def longestPalindromeSubseq(self, s: str) -> int: FILE: Python/0518-coin-change-ii.py class Solution (line 6) | class Solution: method change (line 7) | def change(self, amount: int, coins: List[int]) -> int: method change (line 35) | def change(self, amount: int, coins: List[int]) -> int: class Solution (line 34) | class Solution: method change (line 7) | def change(self, amount: int, coins: List[int]) -> int: method change (line 35) | def change(self, amount: int, coins: List[int]) -> int: FILE: Python/0523-continuous-subarray-sum.py class Solution (line 6) | class Solution: method checkSubarraySum (line 7) | def checkSubarraySum(self, nums: List[int], k: int) -> bool: FILE: Python/0525-contiguous-array.py class Solution (line 6) | class Solution: method findMaxLength (line 7) | def findMaxLength(self, nums: List[int]) -> int: FILE: Python/0527-word-abbreviation.py class Solution (line 6) | class Solution: method wordsAbbreviation (line 7) | def wordsAbbreviation(self, words: List[str]) -> List[str]: FILE: Python/0528-random-pick-with-weight.py class Solution (line 7) | class Solution: method __init__ (line 9) | def __init__(self, w: List[int]): method pickIndex (line 17) | def pickIndex(self) -> int: method __init__ (line 27) | def __init__(self, w: List[int]): method pickIndex (line 35) | def pickIndex(self) -> int: class Solution (line 25) | class Solution: method __init__ (line 9) | def __init__(self, w: List[int]): method pickIndex (line 17) | def pickIndex(self) -> int: method __init__ (line 27) | def __init__(self, w: List[int]): method pickIndex (line 35) | def pickIndex(self) -> int: FILE: Python/0530-minimum-absolute-difference-in-bst.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method getMinimumDifference (line 14) | def getMinimumDifference(self, root: Optional[TreeNode]) -> int: FILE: Python/0532-k-diff-pairs-in-an-array.py class Solution (line 4) | class Solution: method findPairs (line 5) | def findPairs(self, nums: List[int], k: int) -> int: FILE: Python/0539-minimum-time-difference.py class Solution (line 6) | class Solution: method findMinDifference (line 7) | def findMinDifference(self, timePoints: List[str]) -> int: FILE: Python/0540-single-element-in-a-sorted-array.py class Solution (line 6) | class Solution: method singleNonDuplicate (line 7) | def singleNonDuplicate(self, nums: List[int]) -> int: FILE: Python/0542-01-matrix.py class Solution (line 9) | class Solution: method updateMatrix (line 10) | def updateMatrix(self, matrix: List[List[int]]) -> List[List[int]]: method updateMatrix (line 34) | def updateMatrix(self, matrix: List[List[int]]) -> List[List[int]]: method updateMatrix (line 56) | def updateMatrix(self, mat: List[List[int]]) -> List[List[int]]: class Solution (line 33) | class Solution: method updateMatrix (line 10) | def updateMatrix(self, matrix: List[List[int]]) -> List[List[int]]: method updateMatrix (line 34) | def updateMatrix(self, matrix: List[List[int]]) -> List[List[int]]: method updateMatrix (line 56) | def updateMatrix(self, mat: List[List[int]]) -> List[List[int]]: class Solution (line 55) | class Solution: method updateMatrix (line 10) | def updateMatrix(self, matrix: List[List[int]]) -> List[List[int]]: method updateMatrix (line 34) | def updateMatrix(self, matrix: List[List[int]]) -> List[List[int]]: method updateMatrix (line 56) | def updateMatrix(self, mat: List[List[int]]) -> List[List[int]]: FILE: Python/0543-diameter-of-binary-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method diameterOfBinaryTree (line 14) | def diameterOfBinaryTree(self, root: Optional[TreeNode]) -> int: FILE: Python/0545-boundary-of-binary-tree.py class TreeNode (line 4) | class TreeNode: method __init__ (line 5) | def __init__(self, val=0, left=None, right=None): class Solution (line 11) | class Solution: method boundaryOfBinaryTree (line 12) | def boundaryOfBinaryTree(self, root: Optional[TreeNode]) -> List[int]: FILE: Python/0547-number-of-provinces.py class Solution (line 6) | class Solution: method findCircleNum (line 7) | def findCircleNum(self, isConnected: List[List[int]]) -> int: method findCircleNum (line 56) | def findCircleNum(self, grid: List[List[int]]) -> int: class UnionFind (line 26) | class UnionFind: method __init__ (line 27) | def __init__(self, n): method find (line 32) | def find(self, num): method union (line 38) | def union(self, x, y): class Solution (line 55) | class Solution: method findCircleNum (line 7) | def findCircleNum(self, isConnected: List[List[int]]) -> int: method findCircleNum (line 56) | def findCircleNum(self, grid: List[List[int]]) -> int: FILE: Python/0549-binary-tree-longest-consecutive-sequence-ii.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method longestConsecutive (line 14) | def longestConsecutive(self, root: Optional[TreeNode]) -> int: FILE: Python/0552-student-attendance-record-ii.py class Solution (line 3) | class Solution: method checkRecord (line 4) | def checkRecord(self, n: int) -> int: FILE: Python/0560-subarray-sum-equals-k.py class Solution (line 6) | class Solution: method subarraySum (line 7) | def subarraySum(self, nums: List[int], k: int) -> int: FILE: Python/0561-array-partition.py class Solution (line 4) | class Solution: method arrayPairSum (line 5) | def arrayPairSum(self, nums: List[int]) -> int: FILE: Python/0564-find-the-closest-palindrome.py class Solution (line 3) | class Solution: method nearestPalindromic (line 4) | def nearestPalindromic(self, n: str) -> str: method halfToPalindrome (line 34) | def halfToPalindrome(self, left: int, even: bool) -> int: FILE: Python/0567-permutation-in-string.py class Solution (line 6) | class Solution: method checkInclusion (line 7) | def checkInclusion(self, s1: str, s2: str) -> bool: FILE: Python/0572-subtree-of-another-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method isSameTree (line 14) | def isSameTree(self, root1: Optional[TreeNode], root2: Optional[TreeNo... method isSubtree (line 23) | def isSubtree(self, root: Optional[TreeNode], subRoot: Optional[TreeNo... FILE: Python/0573-squirrel-simulation.py class Solution (line 6) | class Solution: method minDistance (line 7) | def minDistance(self, height: int, width: int, tree: List[int], squirr... FILE: Python/0576-out-of-boundary-paths.py class Solution (line 3) | class Solution: method findPaths (line 4) | def findPaths(self, row: int, col: int, maxMove: int, startRow: int, s... FILE: Python/0588-design-in-memory-file-system.py class Dir (line 11) | class Dir: method __init__ (line 12) | def __init__(self): class FileSystem (line 16) | class FileSystem: method __init__ (line 18) | def __init__(self): method ls (line 21) | def ls(self, path: str) -> List[str]: method mkdir (line 39) | def mkdir(self, path: str) -> None: method addContentToFile (line 47) | def addContentToFile(self, filePath: str, content: str) -> None: method readContentFromFile (line 56) | def readContentFromFile(self, filePath: str) -> str: FILE: Python/0590-n-ary-tree-postorder-traversal.py class Node (line 6) | class Node: method __init__ (line 7) | def __init__(self, val=None, children=None): class Solution (line 12) | class Solution: method postorder (line 13) | def postorder(self, root: "Node") -> List[int]: FILE: Python/0592-fraction-addition-and-subtraction.py class Solution (line 6) | class Solution: method fractionAddition (line 7) | def fractionAddition(self, expression: str) -> str: method findGcd (line 22) | def findGcd(self, a: int, b: int) -> int: FILE: Python/0594-longest-harmonious-subsequence.py class Solution (line 4) | class Solution: method findLHS (line 5) | def findLHS(self, nums: List[int]) -> int: FILE: Python/0605-can-place-flowers.py class Solution (line 6) | class Solution: method canPlaceFlowers (line 7) | def canPlaceFlowers(self, flowerbed: List[int], n: int) -> bool: FILE: Python/0606-construct-string-from-binary-tree.py class TreeNode (line 4) | class TreeNode: method __init__ (line 5) | def __init__(self, val=0, left=None, right=None): class Solution (line 11) | class Solution(object): method tree2str (line 12) | def tree2str(self, root: Optional[TreeNode]) -> str: method dfs (line 17) | def dfs(self, root: Optional[TreeNode], res: []): FILE: Python/0609-find-duplicate-file-in-system.py class Solution (line 7) | class Solution: method findDuplicate (line 8) | def findDuplicate(self, paths: List[str]) -> List[List[str]]: FILE: Python/0611-valid-triangle-number.py class Solution (line 6) | class Solution: method triangleNumber (line 7) | def triangleNumber(self, nums: List[int]) -> int: FILE: Python/0616-add-bold-tag-in-string.py class Solution (line 6) | class Solution: method addBoldTag (line 7) | def addBoldTag(self, s: str, words: List[str]) -> str: FILE: Python/0621-task-scheduler.py class Solution (line 7) | class Solution: method leastInterval (line 8) | def leastInterval(self, tasks: List[str], n: int) -> int: FILE: Python/0623-add-one-row-to-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method add (line 14) | def add(self, root: Optional[TreeNode], val: int, depth: int, curr: int): method addOneRow (line 32) | def addOneRow(self, root: Optional[TreeNode], val: int, depth: int) ->... FILE: Python/0624-maximum-distance-in-arrays.py class Solution (line 4) | class Solution: method maxDistance (line 5) | def maxDistance(self, arrays: List[List[int]]) -> int: FILE: Python/0629-k-inverse-pairs-array.py class Solution (line 3) | class Solution: method kInversePairs (line 4) | def kInversePairs(self, n: int, k: int) -> int: FILE: Python/0632-smallest-range-covering-elements-from-k-lists.py class Solution (line 7) | class Solution: method smallestRange (line 8) | def smallestRange(self, nums: List[List[int]]) -> List[int]: FILE: Python/0633-sum-of-square-numbers.py class Solution (line 6) | class Solution: method judgeSquareSum (line 7) | def judgeSquareSum(self, c: int) -> bool: FILE: Python/0636-exclusive-time-of-functions.py class Solution (line 6) | class Solution: method exclusiveTime (line 7) | def exclusiveTime(self, n: int, logs: List[str]) -> List[int]: FILE: Python/0637-average-of-levels-in-binary-tree.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method averageOfLevels (line 15) | def averageOfLevels(self, root: Optional[TreeNode]) -> List[float]: FILE: Python/0641-design-circular-deque.py class MyCircularDeque (line 1) | class MyCircularDeque: method __init__ (line 3) | def __init__(self, k: int): method insertFront (line 10) | def insertFront(self, value: int) -> bool: method insertLast (line 18) | def insertLast(self, value: int) -> bool: method deleteFront (line 26) | def deleteFront(self) -> bool: method deleteLast (line 33) | def deleteLast(self) -> bool: method getFront (line 40) | def getFront(self) -> int: method getRear (line 45) | def getRear(self) -> int: method isEmpty (line 51) | def isEmpty(self) -> bool: method isFull (line 54) | def isFull(self) -> bool: FILE: Python/0643-maximum-average-subarray-i.py class Solution (line 6) | class Solution: method findMaxAverage (line 7) | def findMaxAverage(self, nums: List[int], k: int) -> float: FILE: Python/0645-set-mismatch.py class Solution (line 6) | class Solution: method findErrorNums (line 7) | def findErrorNums(self, nums: List[int]) -> List[int]: FILE: Python/0646-maximum-length-of-pair-chain.py class Solution (line 4) | class Solution: method findLongestChain (line 5) | def findLongestChain(self, pairs: List[List[int]]) -> int: FILE: Python/0647-palindromic-substrings.py class Solution (line 3) | class Solution: method countSubstrings (line 4) | def countSubstrings(self, s: str) -> int: FILE: Python/0648-replace-words.py class Solution (line 6) | class Solution: method replaceWords (line 7) | def replaceWords(self, dictionary: List[str], sentence: str) -> str: method replaceWords (line 53) | def replaceWords(self, dictionary: List[str], sentence: str) -> str: class TrieNode (line 21) | class TrieNode: method __init__ (line 22) | def __init__(self, char=""): class Trie (line 28) | class Trie: method __init__ (line 29) | def __init__(self): method insert (line 32) | def insert(self, word: str): method replace (line 40) | def replace(self, word: str): class Solution (line 52) | class Solution: method replaceWords (line 7) | def replaceWords(self, dictionary: List[str], sentence: str) -> str: method replaceWords (line 53) | def replaceWords(self, dictionary: List[str], sentence: str) -> str: FILE: Python/0649-dota2-senate.py class Solution (line 6) | class Solution: method predictPartyVictory (line 7) | def predictPartyVictory(self, senate: str) -> str: FILE: Python/0650-2-keys-keyboard.py class Solution (line 3) | class Solution: method minSteps (line 4) | def minSteps(self, n: int) -> int: method minStepsHelper (line 12) | def minStepsHelper(self, currLen: int, pasteLen: int) -> int: FILE: Python/0653-two-sum-iv-input-is-a-bst.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method findTarget (line 15) | def findTarget(self, root: Optional[TreeNode], k: int) -> bool: FILE: Python/0656-coin-path.py class Solution (line 7) | class Solution: method cheapestJump (line 8) | def cheapestJump(self, coins: List[int], maxJump: int) -> List[int]: FILE: Python/0658-find-k-closest-elements.py class Solution (line 6) | class Solution: method findClosestElements (line 7) | def findClosestElements(self, nums: List[int], k: int, target: int) ->... FILE: Python/0661-image-smoother.py class Solution (line 6) | class Solution: method imageSmoother (line 7) | def imageSmoother(self, img: List[List[int]]) -> List[List[int]]: FILE: Python/0662-maximum-width-of-binary-tree.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method widthOfBinaryTree (line 15) | def widthOfBinaryTree(self, root: Optional[TreeNode]) -> int: FILE: Python/0663-equal-tree-partition.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method checkEqualTree (line 14) | def checkEqualTree(self, root: Optional[TreeNode]) -> bool: FILE: Python/0664-strange-printer.py class Solution (line 1) | class Solution: method strangePrinter (line 2) | def strangePrinter(self, s: str) -> int: FILE: Python/0666-path-sum-iv.py class Solution (line 6) | class Solution: method pathSum (line 7) | def pathSum(self, nums: List[int]) -> int: FILE: Python/0670-maximum-swap.py class Solution (line 3) | class Solution: method maximumSwap (line 4) | def maximumSwap(self, num: int) -> int: FILE: Python/0677-map-sum-pairs.py class MapSum (line 6) | class MapSum: method __init__ (line 7) | def __init__(self): method insert (line 10) | def insert(self, key: str, val: int) -> None: method sum (line 13) | def sum(self, prefix: str) -> int: FILE: Python/0678-valid-parenthesis-string.py class Solution (line 6) | class Solution: method checkValidString (line 7) | def checkValidString(self, s: str) -> bool: method checkValidString (line 30) | def checkValidString(self, s: str) -> bool: method checkValidString (line 55) | def checkValidString(self, s: str) -> bool: method checkValidString (line 81) | def checkValidString(self, s: str) -> bool: class Solution (line 29) | class Solution: method checkValidString (line 7) | def checkValidString(self, s: str) -> bool: method checkValidString (line 30) | def checkValidString(self, s: str) -> bool: method checkValidString (line 55) | def checkValidString(self, s: str) -> bool: method checkValidString (line 81) | def checkValidString(self, s: str) -> bool: class Solution (line 54) | class Solution: method checkValidString (line 7) | def checkValidString(self, s: str) -> bool: method checkValidString (line 30) | def checkValidString(self, s: str) -> bool: method checkValidString (line 55) | def checkValidString(self, s: str) -> bool: method checkValidString (line 81) | def checkValidString(self, s: str) -> bool: class Solution (line 80) | class Solution: method checkValidString (line 7) | def checkValidString(self, s: str) -> bool: method checkValidString (line 30) | def checkValidString(self, s: str) -> bool: method checkValidString (line 55) | def checkValidString(self, s: str) -> bool: method checkValidString (line 81) | def checkValidString(self, s: str) -> bool: FILE: Python/0679-24-game.py class Solution (line 6) | class Solution: method generate_possible_results (line 7) | def generate_possible_results(self, a: float, b: float) -> List[float]: method checkIfResultReached (line 15) | def checkIfResultReached(self, cards: List[float]) -> bool: method judgePoint24 (line 30) | def judgePoint24(self, cards: List[int]) -> bool: FILE: Python/0680-valid-palindrome-ii.py class Solution (line 3) | class Solution: method validPalindrome (line 4) | def validPalindrome(self, s: str) -> bool: FILE: Python/0683-k-empty-slots.py class Solution (line 7) | class Solution: method kEmptySlots (line 8) | def kEmptySlots(self, bulbs: List[int], k: int) -> int: FILE: Python/0684-redundant-connection.py class UnionFind (line 6) | class UnionFind: method __init__ (line 7) | def __init__(self, countNodes: int) -> None: method find (line 11) | def find(self, node: int) -> int: method union (line 17) | def union(self, nodeX: int, nodeY: int) -> bool: class Solution (line 30) | class Solution: method findRedundantConnection (line 31) | def findRedundantConnection(self, edges: List[List[int]]) -> List[int]: FILE: Python/0689-maximum-sum-of-3-non-overlapping-subarrays.py class Solution (line 6) | class Solution: method maxSumOfThreeSubarrays (line 7) | def maxSumOfThreeSubarrays(self, nums: List[int], k: int) -> List[int]: method dp (line 22) | def dp(self, sums, k, idx, rem, memo): method dfs (line 36) | def dfs(self, sums, k, idx, rem, memo, indices): FILE: Python/0692-top-k-frequent-words.py class Solution (line 7) | class Solution: method topKFrequent (line 8) | def topKFrequent(self, words: List[str], k: int) -> List[str]: FILE: Python/0694-number-of-distinct-islands.py class Solution (line 6) | class Solution: method numDistinctIslands (line 7) | def numDistinctIslands(self, grid: List[List[int]]) -> int: FILE: Python/0695-max-area-of-island.py class Solution (line 7) | class Solution: method maxAreaOfIsland (line 8) | def maxAreaOfIsland(self, grid: List[List[int]]) -> int: FILE: Python/0702-search-in-a-sorted-array-of-unknown-size.py class ArrayReader (line 3) | class ArrayReader: method get (line 4) | def get(self, index: int) -> int: class Solution (line 8) | class Solution: method search (line 9) | def search(self, reader: ArrayReader, target: int) -> int: FILE: Python/0703-kth-largest-element-in-a-stream.py class KthLargest (line 7) | class KthLargest: method __init__ (line 8) | def __init__(self, k: int, nums: List[int]): method add (line 14) | def add(self, val: int) -> int: FILE: Python/0704-binary-search.py class Solution (line 6) | class Solution: method search (line 7) | def search(self, nums: List[int], target: int) -> int: FILE: Python/0705-design-hashset.py class Node (line 3) | class Node: method __init__ (line 4) | def __init__(self, value, nextNode=None): class Bucket (line 9) | class Bucket: method __init__ (line 10) | def __init__(self): method insert (line 13) | def insert(self, newValue): method delete (line 18) | def delete(self, value): method exists (line 28) | def exists(self, value): class MyHashSet (line 37) | class MyHashSet: method __init__ (line 39) | def __init__(self): method hash (line 43) | def hash(self, key): method add (line 46) | def add(self, key: int) -> None: method remove (line 50) | def remove(self, key: int) -> None: method contains (line 54) | def contains(self, key: int) -> bool: FILE: Python/0706-design-hashmap.py class Bucket (line 5) | class Bucket: method __init__ (line 6) | def __init__(self): method get (line 9) | def get(self, key): method update (line 15) | def update(self, key, value): method remove (line 26) | def remove(self, key): class MyHashMap (line 32) | class MyHashMap(object): method __init__ (line 34) | def __init__(self): method put (line 39) | def put(self, key, value): method get (line 45) | def get(self, key): method remove (line 50) | def remove(self, key): method __init__ (line 64) | def __init__(self): method hash (line 67) | def hash(self, key): method put (line 70) | def put(self, key: int, value: int) -> None: method get (line 79) | def get(self, key: int) -> int: method remove (line 87) | def remove(self, key: int) -> None: method __init__ (line 98) | def __init__(self): method put (line 101) | def put(self, key: int, value: int) -> None: method get (line 105) | def get(self, key: int) -> int: method remove (line 112) | def remove(self, key: int) -> None: class ListNode (line 56) | class ListNode: method __init__ (line 57) | def __init__(self, key=-1, val=-1, next=None): class MyHashMap (line 63) | class MyHashMap: method __init__ (line 34) | def __init__(self): method put (line 39) | def put(self, key, value): method get (line 45) | def get(self, key): method remove (line 50) | def remove(self, key): method __init__ (line 64) | def __init__(self): method hash (line 67) | def hash(self, key): method put (line 70) | def put(self, key: int, value: int) -> None: method get (line 79) | def get(self, key: int) -> int: method remove (line 87) | def remove(self, key: int) -> None: method __init__ (line 98) | def __init__(self): method put (line 101) | def put(self, key: int, value: int) -> None: method get (line 105) | def get(self, key: int) -> int: method remove (line 112) | def remove(self, key: int) -> None: class MyHashMap (line 96) | class MyHashMap: method __init__ (line 34) | def __init__(self): method put (line 39) | def put(self, key, value): method get (line 45) | def get(self, key): method remove (line 50) | def remove(self, key): method __init__ (line 64) | def __init__(self): method hash (line 67) | def hash(self, key): method put (line 70) | def put(self, key: int, value: int) -> None: method get (line 79) | def get(self, key: int) -> int: method remove (line 87) | def remove(self, key: int) -> None: method __init__ (line 98) | def __init__(self): method put (line 101) | def put(self, key: int, value: int) -> None: method get (line 105) | def get(self, key: int) -> int: method remove (line 112) | def remove(self, key: int) -> None: FILE: Python/0712-minimum-ascii-delete-sum-for-two-strings.py class Solution (line 1) | class Solution: method minimumDeleteSum (line 2) | def minimumDeleteSum(self, s1: str, s2: str) -> int: FILE: Python/0713-subarray-product-less-than-k.py class Solution (line 6) | class Solution: method numSubarrayProductLessThanK (line 7) | def numSubarrayProductLessThanK(self, nums: List[int], k: int) -> int: FILE: Python/0714-best-time-to-buy-and-sell-stock-with-transaction-fee.py class Solution (line 6) | class Solution: method maxProfit (line 7) | def maxProfit(self, prices: List[int], fee: int) -> int: FILE: Python/0715-range-module.py class RangeModule (line 13) | class RangeModule: method __init__ (line 15) | def __init__(self): method checkIntervals (line 18) | def checkIntervals(self, left: int, right: int): method addRange (line 30) | def addRange(self, left: int, right: int) -> None: method queryRange (line 45) | def queryRange(self, left: int, right: int) -> bool: method removeRange (line 51) | def removeRange(self, left: int, right: int) -> None: FILE: Python/0716-max-stack.py class MaxStack (line 4) | class MaxStack: method __init__ (line 6) | def __init__(self): method push (line 12) | def push(self, x: int) -> None: method pop (line 17) | def pop(self) -> int: method top (line 24) | def top(self) -> int: method peekMax (line 29) | def peekMax(self) -> int: method popMax (line 34) | def popMax(self) -> int: FILE: Python/0717-1-bit-and-2-bit-characters.py class Solution (line 6) | class Solution: method isOneBitCharacter (line 7) | def isOneBitCharacter(self, bits: List[int]) -> bool: FILE: Python/0718-maximum-length-of-repeated-subarray.py class Solution (line 6) | class Solution: method findLength (line 7) | def findLength(self, nums1: List[int], nums2: List[int]) -> int: FILE: Python/0719-find-k-th-smallest-pair-distance.py class Solution (line 6) | class Solution: method smallestDistancePair (line 7) | def smallestDistancePair(self, numbers: List[int], k: int) -> int: FILE: Python/0721-accounts-merge.py class Solution (line 6) | class Solution: method __init__ (line 7) | def __init__(self): method DFS (line 11) | def DFS(self, merged_account: List[str], email: str) -> None: method accountsMerge (line 19) | def accountsMerge(self, account_list: List[List[str]]) -> List[List[st... method accountsMerge (line 61) | def accountsMerge(self, accountList: List[List[str]]) -> List[List[str]]: class UnionFind (line 44) | class UnionFind: method __init__ (line 45) | def __init__(self, n): method find (line 48) | def find(self, node): method union (line 53) | def union(self, x, y): class Solution (line 60) | class Solution: method __init__ (line 7) | def __init__(self): method DFS (line 11) | def DFS(self, merged_account: List[str], email: str) -> None: method accountsMerge (line 19) | def accountsMerge(self, account_list: List[List[str]]) -> List[List[st... method accountsMerge (line 61) | def accountsMerge(self, accountList: List[List[str]]) -> List[List[str]]: FILE: Python/0723-candy-crush.py class Solution (line 4) | class Solution: method candyCrush (line 5) | def candyCrush(self, board: List[List[int]]) -> List[List[int]]: FILE: Python/0724-find-pivot-index.py class Solution (line 6) | class Solution: method pivotIndex (line 7) | def pivotIndex(self, nums: List[int]) -> int: FILE: Python/0725-split-linked-list-in-parts.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method splitListToParts (line 13) | def splitListToParts(self, head: Optional[ListNode], k: int) -> List[O... FILE: Python/0726-number-of-atoms.py class Solution (line 7) | class Solution: method countOfAtoms (line 8) | def countOfAtoms(self, formula: str) -> str: FILE: Python/0727-minimum-window-subsequence.py class Solution (line 3) | class Solution: method minWindow (line 4) | def minWindow(self, s1: str, s2: str) -> str: FILE: Python/0729-my-calendar-i.py class MyCalendar (line 1) | class MyCalendar: method __init__ (line 3) | def __init__(self): method book (line 6) | def book(self, start: int, end: int) -> bool: FILE: Python/0731-my-calendar-ii.py class MyCalendarTwo (line 3) | class MyCalendarTwo: method __init__ (line 5) | def __init__(self): method book (line 9) | def book(self, start: int, end: int) -> bool: method does_overlap (line 22) | def does_overlap(self, start1: int, end1: int, start2: int, end2: int)... method get_overlapped (line 25) | def get_overlapped(self, start1: int, end1: int, start2: int, end2: in... FILE: Python/0733-flood-fill.py class Solution (line 7) | class Solution: method floodFill (line 8) | def floodFill(self, image: List[List[int]], sr: int, sc: int, color: i... FILE: Python/0734-sentence-similarity.py class Solution (line 7) | class Solution: method areSentencesSimilar (line 8) | def areSentencesSimilar(self, sentence1: List[str], sentence2: List[st... FILE: Python/0735-asteroid-collision.py class Solution (line 6) | class Solution: method asteroidCollision (line 7) | def asteroidCollision(self, asteroids: List[int]) -> List[int]: FILE: Python/0737-sentence-similarity-ii.py class UnionFind (line 7) | class UnionFind: method __init__ (line 8) | def __init__(self, words: set): method find (line 12) | def find(self, node: str): method union (line 17) | def union(self, nodeX: str, nodeY: str): class Solution (line 26) | class Solution: method areSentencesSimilarTwo (line 27) | def areSentencesSimilarTwo(self, sentence1: List[str], sentence2: List... FILE: Python/0739-daily-temperatures.py class Solution (line 6) | class Solution: method dailyTemperatures (line 7) | def dailyTemperatures(self, temperatures: List[int]) -> List[int]: FILE: Python/0740-delete-and-earn.py class Solution (line 8) | class Solution: method deleteAndEarn (line 9) | def deleteAndEarn(self, nums: List[int]) -> int: FILE: Python/0741-cherry-pickup.py class Solution (line 6) | class Solution(object): method cherryPickup (line 7) | def cherryPickup(self, grid: List[List[int]]) -> int: FILE: Python/0743-network-delay-time.py class Solution (line 8) | class Solution: method networkDelayTime (line 9) | def networkDelayTime(self, times: List[List[int]], n: int, k: int) -> ... FILE: Python/0744-find-smallest-letter-greater-than-target.py class Solution (line 6) | class Solution: method nextGreatestLetter (line 7) | def nextGreatestLetter(self, letters: List[str], target: str) -> str: FILE: Python/0746-min-cost-climbing-stairs.py class Solution (line 5) | class Solution: method minCostClimbingStairs (line 6) | def minCostClimbingStairs(self, cost: List[int]) -> int: FILE: Python/0752-open-the-lock.py class Solution (line 7) | class Solution: method openLock (line 8) | def openLock(self, deadends: List[str], target: str) -> int: method getNeighbors (line 23) | def getNeighbors(self, s): FILE: Python/0756-pyramid-transition-matrix.py class Solution (line 6) | class Solution: method pyramidTransition (line 7) | def pyramidTransition(self, bottom: str, allowed: List[str]) -> bool: FILE: Python/0757-set-intersection-size-at-least-two.py class Solution (line 6) | class Solution: method intersectionSizeTwo (line 7) | def intersectionSizeTwo(self, intervals: List[List[int]]) -> int: FILE: Python/0758-bold-words-in-string.py class Solution (line 6) | class Solution: method boldWords (line 7) | def boldWords(self, words: List[str], S: str) -> str: FILE: Python/0759-employee-free-time.py class Interval (line 7) | class Interval: method __init__ (line 8) | def __init__(self, start: int = None, end: int = None): class Solution (line 13) | class Solution: method employeeFreeTime (line 14) | def employeeFreeTime(self, schedule: List[List[Interval]]) -> List[Int... FILE: Python/0763-partition-labels.py class Solution (line 6) | class Solution: method partitionLabels (line 7) | def partitionLabels(self, s: str) -> List[int]: FILE: Python/0767-reorganize-string.py class Solution (line 7) | class Solution: method reorganizeString (line 8) | def reorganizeString(self, s: str) -> str: FILE: Python/0768-partition-labels.py class Solution (line 6) | class Solution: method partitionLabels (line 7) | def partitionLabels(self, s: str) -> List[int]: method partitionLabels (line 22) | def partitionLabels(self, s: str) -> List[int]: class Solution (line 21) | class Solution: method partitionLabels (line 7) | def partitionLabels(self, s: str) -> List[int]: method partitionLabels (line 22) | def partitionLabels(self, s: str) -> List[int]: FILE: Python/0769-max-chunks-to-make-sorted.py class Solution (line 6) | class Solution: method maxChunksToSorted (line 7) | def maxChunksToSorted(self, arr: List[int]) -> int: FILE: Python/0773-sliding-puzzle.py class Solution (line 6) | class Solution: method slidingPuzzle (line 16) | def slidingPuzzle(self, board: List[List[int]]) -> int: FILE: Python/0774-minimize-max-distance-to-gas-station.py class Solution (line 6) | class Solution: method minmaxGasDist (line 7) | def minmaxGasDist(self, stations: List[int], k: int) -> float: FILE: Python/0775-global-and-local-inversions.py class Solution (line 6) | class Solution: method isIdealPermutation (line 7) | def isIdealPermutation(self, nums: List[int]) -> bool: FILE: Python/0776-split-bst.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method splitBST (line 14) | def splitBST(self, root: Optional[TreeNode], target: int) -> List[Opti... FILE: Python/0778-swim-in-rising-water.py class Solution (line 8) | class Solution: method swimInWater (line 9) | def swimInWater(self, grid: List[List[int]]) -> int: FILE: Python/0779-k-th-symbol-in-grammar.py class Solution (line 1) | class Solution: method depthFirstSearch (line 2) | def depthFirstSearch(self, n: int, k: int, rootVal: int) -> int: method kthGrammar (line 15) | def kthGrammar(self, n: int, k: int) -> int: FILE: Python/0781-rabbits-in-forest.py class Solution (line 7) | class Solution: method numRabbits (line 8) | def numRabbits(self, answers: List[int]) -> int: FILE: Python/0786-k-th-smallest-prime-fraction.py class Solution (line 5) | class Solution: method kthSmallestPrimeFraction (line 6) | def kthSmallestPrimeFraction(self, arr: List[int], k: int) -> List[int]: FILE: Python/0787-cheapest-flights-within-k-stops.py class Solution (line 7) | class Solution: method findCheapestPrice (line 8) | def findCheapestPrice(self, n: int, flights: List[List[int]], src: int... FILE: Python/0790-domino-and-tromino-tiling.py class Solution (line 6) | class Solution: method numTilings (line 7) | def numTilings(self, n: int) -> int: FILE: Python/0791-custom-sort-string.py class Solution (line 6) | class Solution: method customSortString (line 7) | def customSortString(self, order: str, s: str) -> str: method customSortString (line 18) | def customSortString(self, order: str, s: str) -> str: class Solution (line 17) | class Solution: method customSortString (line 7) | def customSortString(self, order: str, s: str) -> str: method customSortString (line 18) | def customSortString(self, order: str, s: str) -> str: FILE: Python/0794-valid-tic-tac-toe-state.py class Solution (line 6) | class Solution: method validTicTacToe (line 7) | def validTicTacToe(self, board: List[str]) -> bool: FILE: Python/0796-rotate-string.py class Solution (line 3) | class Solution: method rotateString (line 4) | def rotateString(self, s: str, goal: str) -> bool: FILE: Python/0797-all-paths-from-source-to-target.py class Solution (line 7) | class Solution: method allPathsSourceTarget (line 8) | def allPathsSourceTarget(self, graph: List[List[int]]) -> List[List[in... FILE: Python/0799-champagne-tower.py class Solution (line 1) | class Solution: method champagneTower (line 2) | def champagneTower(self, poured: int, query_row: int, query_glass: int... FILE: Python/0802-find-eventual-safe-states.py class Solution (line 7) | class Solution: method eventualSafeNodes (line 8) | def eventualSafeNodes(self, graph: List[List[int]]) -> List[int]: FILE: Python/0807-max-increase-to-keep-city-skyline.py class Solution (line 6) | class Solution: method maxIncreaseKeepingSkyline (line 7) | def maxIncreaseKeepingSkyline(self, grid: List[List[int]]) -> int: FILE: Python/0808-soup-servings.py class Solution (line 7) | class Solution: method soupServings (line 8) | def soupServings(self, n: int) -> float: FILE: Python/0812-largest-triangle-area.py class Solution (line 7) | class Solution: method largestTriangleArea (line 8) | def largestTriangleArea(self, points: List[List[int]]) -> float: FILE: Python/0814-binary-tree-pruning.py class TreeNode (line 4) | class TreeNode: method __init__ (line 5) | def __init__(self, val=0, left=None, right=None): class Solution (line 11) | class Solution: method pruneTree (line 12) | def pruneTree(self, root: Optional[TreeNode]) -> Optional[TreeNode]: FILE: Python/0815-bus-routes.py class Solution (line 7) | class Solution: method numBusesToDestination (line 8) | def numBusesToDestination(self, routes: List[List[int]], source: int, ... FILE: Python/0817-linked-list-components.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method numComponents (line 13) | def numComponents(self, head: Optional[ListNode], nums: List[int]) -> ... FILE: Python/0823-binary-trees-with-factors.py class Solution (line 4) | class Solution(object): method numFactoredBinaryTrees (line 5) | def numFactoredBinaryTrees(self, A): FILE: Python/0826-most-profit-assigning-work.py class Solution (line 6) | class Solution: method maxProfitAssignment (line 7) | def maxProfitAssignment( FILE: Python/0827-making-a-large-island.py class DisjointSet (line 6) | class DisjointSet: method __init__ (line 7) | def __init__(self, n: int): method findRoot (line 11) | def findRoot(self, node: int) -> int: method unionNodes (line 19) | def unionNodes(self, nodeA: int, nodeB: int): class Solution (line 35) | class Solution: method largestIsland (line 36) | def largestIsland(self, grid: List[List[int]]) -> int: FILE: Python/0831-masking-personal-information.py class Solution (line 6) | class Solution: method maskPII (line 7) | def maskPII(self, s: str) -> str: FILE: Python/0832-flipping-an-image.py class Solution (line 6) | class Solution: method flipAndInvertImage (line 7) | def flipAndInvertImage(self, image: List[List[int]]) -> List[List[int]]: FILE: Python/0833-find-and-replace-in-string.py class Solution (line 6) | class Solution: method findReplaceString (line 7) | def findReplaceString(self, s: str, indices: List[int], sources: List[... FILE: Python/0834-sum-of-distances-in-tree.py class Solution (line 7) | class Solution: method sumOfDistancesInTree (line 8) | def sumOfDistancesInTree(self, n: int, edges: List[List[int]]) -> List... FILE: Python/0837-new-21-game.py class Solution (line 3) | class Solution: method new21Game (line 4) | def new21Game(self, n: int, k: int, maxPts: int) -> float: FILE: Python/0838-push-dominoes.py class Solution (line 3) | class Solution(object): method pushDominoes (line 4) | def pushDominoes(self, dominoes): FILE: Python/0840-magic-squares-in-grid.py class Solution (line 6) | class Solution: method numMagicSquaresInside (line 7) | def numMagicSquaresInside(self, grid: List[List[int]]) -> int: method isMagicSquare (line 17) | def isMagicSquare(self, grid, row, col): FILE: Python/0841-keys-and-rooms.py class Solution (line 7) | class Solution: method canVisitAllRooms (line 8) | def canVisitAllRooms(self, rooms: List[List[int]]) -> bool: FILE: Python/0844-backspace-string-compare.py class Solution (line 1) | class Solution: method backspaceCompare (line 2) | def backspaceCompare(self, s: str, t: str) -> bool: FILE: Python/0845-longest-mountain-in-array.py class Solution (line 6) | class Solution(object): method longestMountain (line 7) | def longestMountain(self, arr: List[int]) -> int: FILE: Python/0846-hand-of-straights.py class Solution (line 6) | class Solution: method isNStraightHand (line 7) | def isNStraightHand(self, hand: List[int], groupSize: int) -> bool: FILE: Python/0847-shortest-path-visiting-all-nodes.py class Solution (line 4) | class Solution: method shortestPathLength (line 5) | def shortestPathLength(self, graph: List[List[int]]) -> int: FILE: Python/0849-maximize-distance-to-closest-person.py class Solution (line 6) | class Solution: method maxDistToClosest (line 7) | def maxDistToClosest(self, seats: List[int]) -> int: FILE: Python/0851-loud-and-rich.py class Solution (line 7) | class Solution: method loudAndRich (line 8) | def loudAndRich(self, richer: List[List[int]], quiet: List[int]) -> Li... FILE: Python/0852-peak-index-in-a-mountain-array.py class Solution (line 6) | class Solution: method peakIndexInMountainArray (line 7) | def peakIndexInMountainArray(self, arr: List[int]) -> int: FILE: Python/0853-car-fleet.py class Solution (line 6) | class Solution: method carFleet (line 7) | def carFleet(self, target: int, position: List[int], speed: List[int])... FILE: Python/0856-score-of-parentheses.py class Solution (line 3) | class Solution: method scoreOfParentheses (line 4) | def scoreOfParentheses(self, s: str) -> int: FILE: Python/0857-minimum-cost-to-hire-k-workers.py class Solution (line 7) | class Solution: method mincostToHireWorkers (line 8) | def mincostToHireWorkers(self, quality: List[int], wage: List[int], k:... FILE: Python/0860-lemonade-change.py class Solution (line 6) | class Solution: method lemonadeChange (line 7) | def lemonadeChange(self, bills: List[int]) -> bool: FILE: Python/0861-score-after-flipping-matrix.py class Solution (line 6) | class Solution: method matrixScore (line 7) | def matrixScore(self, grid: List[List[int]]) -> int: FILE: Python/0862-shortest-subarray-with-sum-at-least-k.py class Solution (line 7) | class Solution: method shortestSubarray (line 8) | def shortestSubarray(self, nums: List[int], k: int) -> int: FILE: Python/0863-all-nodes-distance-k-in-binary-tree.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, x): class Solution (line 14) | class Solution: method distanceK (line 15) | def distanceK(self, root: TreeNode, target: TreeNode, k: int) -> List[... FILE: Python/0865-smallest-subtree-with-all-the-deepest-nodes.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method subtreeWithAllDeepest (line 14) | def subtreeWithAllDeepest(self, root: Optional[TreeNode]) -> Optional[... FILE: Python/0867-transpose-matrix.py class Solution (line 6) | class Solution: method transpose (line 7) | def transpose(self, matrix: List[List[int]]) -> List[List[int]]: FILE: Python/0869-reordered-power-of-2.py class Solution (line 6) | class Solution: method reorderedPowerOf2 (line 7) | def reorderedPowerOf2(self, n: int) -> bool: FILE: Python/0871-minimum-number-of-refueling-stops.py class Solution (line 7) | class Solution: method minRefuelStops (line 8) | def minRefuelStops(self, target: int, startFuel: int, stations: List[L... FILE: Python/0872-leaf-similar-trees.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method leafSimilar (line 15) | def leafSimilar(self, root1: Optional[TreeNode], root2: Optional[TreeN... FILE: Python/0873-length-of-longest-fibonacci-subsequence.py class Solution (line 6) | class Solution: method lenLongestFibSubseq (line 7) | def lenLongestFibSubseq(self, arr: List[int]) -> int: FILE: Python/0874-walking-robot-simulation.py class Solution (line 6) | class Solution: method robotSim (line 7) | def robotSim(self, commands: List[int], obstacles: List[List[int]]) ->... FILE: Python/0875-koko-eating-bananas.py class Solution (line 7) | class Solution: method minEatingSpeed (line 8) | def minEatingSpeed(self, piles: List[int], h: int) -> int: FILE: Python/0876-middle-of-the-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method middleNode (line 13) | def middleNode(self, head: Optional[ListNode]) -> Optional[ListNode]: FILE: Python/0880-decoded-string-at-index.py class Solution (line 1) | class Solution: method decodeAtIndex (line 2) | def decodeAtIndex(self, s: str, k: int) -> str: FILE: Python/0881-boats-to-save-people.py class Solution (line 6) | class Solution: method numRescueBoats (line 7) | def numRescueBoats(self, people: List[int], limit: int) -> int: FILE: Python/0884-uncommon-words-from-two-sentences.py class Solution (line 6) | class Solution: method uncommonFromSentences (line 7) | def uncommonFromSentences(self, s1: str, s2: str) -> List[str]: FILE: Python/0885-spiral-matrix-iii.py class Solution (line 6) | class Solution: method spiralMatrixIII (line 7) | def spiralMatrixIII(self, rows: int, cols: int, rStart: int, cStart: i... FILE: Python/0888-fair-candy-swap.py class Solution (line 4) | class Solution: method fairCandySwap (line 5) | def fairCandySwap(self, aliceSizes: List[int], bobSizes: List[int]) ->... FILE: Python/0889-construct-binary-tree-from-preorder-and-postorder-traversal.py class Solution (line 9) | class Solution: method constructFromPrePost (line 10) | def constructFromPrePost(self, preorder: List[int], postorder: List[in... FILE: Python/0890-find-and-replace-pattern.py class Solution (line 7) | class Solution: method findAndReplacePattern (line 8) | def findAndReplacePattern(self, words: List[str], pattern: str) -> Lis... FILE: Python/0894-all-possible-full-binary-trees.py class TreeNode (line 5) | class TreeNode: method __init__ (line 6) | def __init__(self, val=0, left=None, right=None): class Solution (line 12) | class Solution: method allPossibleFBT (line 13) | def allPossibleFBT(self, n: int) -> List[Optional[TreeNode]]: FILE: Python/0895-maximum-frequency-stack.py class FreqStack (line 6) | class FreqStack: method __init__ (line 8) | def __init__(self): method push (line 13) | def push(self, val: int) -> None: method pop (line 20) | def pop(self) -> int: FILE: Python/0896-monotonic-array.py class Solution (line 4) | class Solution: method isMonotonic (line 5) | def isMonotonic(self, nums: List[int]) -> bool: FILE: Python/0898-bitwise-ors-of-subarrays.py class Solution (line 6) | class Solution: method subarrayBitwiseORs (line 7) | def subarrayBitwiseORs(self, arr: List[int]) -> int: FILE: Python/0900-rle-iterator.py class RLEIterator (line 6) | class RLEIterator: method __init__ (line 7) | def __init__(self, encoding: List[int]): method next (line 10) | def next(self, n: int) -> int: FILE: Python/0901-online-stock-span.py class StockSpanner (line 3) | class StockSpanner: method __init__ (line 5) | def __init__(self): method next (line 8) | def next(self, price: int) -> int: FILE: Python/0904-fruit-into-baskets.py class Solution (line 6) | class Solution: method totalFruit (line 7) | def totalFruit(self, fruits: List[int]) -> int: FILE: Python/0905-sort-array-by-parity.py class Solution (line 4) | class Solution: method sortArrayByParity (line 5) | def sortArrayByParity(self, nums: List[int]) -> List[int]: FILE: Python/0907-koko-eating-bananas.py class Solution (line 7) | class Solution: method minEatingSpeed (line 8) | def minEatingSpeed(self, piles: List[int], h: int) -> int: FILE: Python/0907-sum-of-subarray-minimums.py class Solution (line 6) | class Solution: method sumSubarrayMins (line 7) | def sumSubarrayMins(self, arr: List[int]) -> int: FILE: Python/0909-snakes-and-ladders.py class Solution (line 7) | class Solution: method snakesAndLadders (line 8) | def snakesAndLadders(self, board: List[List[int]]) -> int: FILE: Python/0912-sort-an-array.py class Solution (line 6) | class Solution: method sortArray (line 7) | def sortArray(self, nums: List[int]) -> List[int]: method mergeSortedArray (line 15) | def mergeSortedArray(self, aList: List[int], bList: List[int]): method sortArray (line 33) | def sortArray(self, nums: List[int]) -> List[int]: method radixSort (line 66) | def radixSort(self, nums: List[int]) -> List[int]: method sortArray (line 101) | def sortArray(self, nums: List[int]) -> List[int]: method sortArray (line 107) | def sortArray(self, nums: List[int]) -> List[int]: class Solution (line 32) | class Solution: method sortArray (line 7) | def sortArray(self, nums: List[int]) -> List[int]: method mergeSortedArray (line 15) | def mergeSortedArray(self, aList: List[int], bList: List[int]): method sortArray (line 33) | def sortArray(self, nums: List[int]) -> List[int]: method radixSort (line 66) | def radixSort(self, nums: List[int]) -> List[int]: method sortArray (line 101) | def sortArray(self, nums: List[int]) -> List[int]: method sortArray (line 107) | def sortArray(self, nums: List[int]) -> List[int]: class Solution (line 65) | class Solution: method sortArray (line 7) | def sortArray(self, nums: List[int]) -> List[int]: method mergeSortedArray (line 15) | def mergeSortedArray(self, aList: List[int], bList: List[int]): method sortArray (line 33) | def sortArray(self, nums: List[int]) -> List[int]: method radixSort (line 66) | def radixSort(self, nums: List[int]) -> List[int]: method sortArray (line 101) | def sortArray(self, nums: List[int]) -> List[int]: method sortArray (line 107) | def sortArray(self, nums: List[int]) -> List[int]: class Solution (line 106) | class Solution: method sortArray (line 7) | def sortArray(self, nums: List[int]) -> List[int]: method mergeSortedArray (line 15) | def mergeSortedArray(self, aList: List[int], bList: List[int]): method sortArray (line 33) | def sortArray(self, nums: List[int]) -> List[int]: method radixSort (line 66) | def radixSort(self, nums: List[int]) -> List[int]: method sortArray (line 101) | def sortArray(self, nums: List[int]) -> List[int]: method sortArray (line 107) | def sortArray(self, nums: List[int]) -> List[int]: FILE: Python/0915-partition-array-into-disjoint-intervals.py class Solution (line 6) | class Solution: method partitionDisjoint (line 7) | def partitionDisjoint(self, nums: List[int]) -> int: FILE: Python/0916-word-subsets.py class Solution (line 6) | class Solution: method wordSubsets (line 7) | def wordSubsets(self, words1: List[str], words2: List[str]) -> List[str]: FILE: Python/0918-maximum-sum-circular-subarray.py class Solution (line 4) | class Solution: method maxSubarraySumCircular (line 5) | def maxSubarraySumCircular(self, nums: List[int]) -> int: FILE: Python/0920-number-of-music-playlists.py class Solution (line 1) | class Solution: method numMusicPlaylists (line 2) | def numMusicPlaylists(self, n: int, goal: int, k: int) -> int: FILE: Python/0921-minimum-add-to-make-parentheses-valid.py class Solution (line 3) | class Solution: method minAddToMakeValid (line 4) | def minAddToMakeValid(self, s: str) -> int: FILE: Python/0924-minimize-malware-spread.py class Solution (line 7) | class Solution: method minMalwareSpread (line 8) | def minMalwareSpread(self, graph: List[List[int]], initial: List[int])... method minMalwareSpread (line 62) | def minMalwareSpread(self, graph: List[List[int]], initial: List[int])... class UnionFind (line 40) | class UnionFind: method __init__ (line 41) | def __init__(self, n): method find (line 45) | def find(self, num): method union (line 50) | def union(self, x, y): class Solution (line 61) | class Solution: method minMalwareSpread (line 8) | def minMalwareSpread(self, graph: List[List[int]], initial: List[int])... method minMalwareSpread (line 62) | def minMalwareSpread(self, graph: List[List[int]], initial: List[int])... FILE: Python/0930-binary-subarrays-with-sum.py class Solution (line 6) | class Solution: method numSubarraysWithSum (line 7) | def numSubarraysWithSum(self, nums: List[int], goal: int) -> int: FILE: Python/0931-minimum-falling-path-sum.py class Solution (line 6) | class Solution: method minFallingPathSum (line 7) | def minFallingPathSum(self, matrix: List[List[int]]) -> int: FILE: Python/0933-number-of-recent-calls.py class RecentCounter (line 6) | class RecentCounter: method __init__ (line 8) | def __init__(self): method ping (line 11) | def ping(self, t: int) -> int: FILE: Python/0934-shortest-bridge.py class Solution (line 6) | class Solution: method shortestBridge (line 7) | def shortestBridge(self, grid: List[List[int]]) -> int: FILE: Python/0935-knight-dialer.py class Solution (line 4) | class Solution: method knightDialer (line 5) | def knightDialer(self, n: int) -> int: FILE: Python/0938-range-sum-of-bst.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method rangeSumBST (line 15) | def rangeSumBST(self, root: Optional[TreeNode], low: int, high: int) -... FILE: Python/0939-minimum-area-rectangle.py class Solution (line 6) | class Solution: method minAreaRect (line 7) | def minAreaRect(self, points: List[List[int]]) -> int: FILE: Python/0941-valid-mountain-array.py class Solution (line 6) | class Solution: method validMountainArray (line 7) | def validMountainArray(self, arr: List[int]) -> bool: FILE: Python/0944-delete-columns-to-make-sorted.py class Solution (line 6) | class Solution: method minDeletionSize (line 7) | def minDeletionSize(self, strs: List[str]) -> int: FILE: Python/0945-minimum-increment-to-make-array-unique.py class Solution (line 6) | class Solution: method minIncrementForUnique (line 7) | def minIncrementForUnique(self, nums: List[int]) -> int: FILE: Python/0946-validate-stack-sequences.py class Solution (line 7) | class Solution: method validateStackSequences (line 8) | def validateStackSequences(self, pushed: List[int], popped: List[int])... FILE: Python/0947-most-stones-removed-with-same-row-or-column.py class UnionFind (line 6) | class UnionFind: method __init__ (line 7) | def __init__(self): method find (line 11) | def find(self, coordinate): method union (line 16) | def union(self, x, y): class Solution (line 32) | class Solution: method removeStones (line 33) | def removeStones(self, stones: List[List[int]]) -> int: method removeStones (line 49) | def removeStones(self, stones: List[List[int]]) -> int: class Solution (line 48) | class Solution: method removeStones (line 33) | def removeStones(self, stones: List[List[int]]) -> int: method removeStones (line 49) | def removeStones(self, stones: List[List[int]]) -> int: FILE: Python/0948-bag-of-tokens.py class Solution (line 6) | class Solution: method bagOfTokensScore (line 7) | def bagOfTokensScore(self, tokens: List[int], power: int) -> int: FILE: Python/0949-largest-time-for-given-digits.py class Solution (line 6) | class Solution: method largestTimeFromDigits (line 7) | def largestTimeFromDigits(self, nums: List[int]) -> str: FILE: Python/0950-reveal-cards-in-increasing-order.py class Solution (line 7) | class Solution: method deckRevealedIncreasing (line 8) | def deckRevealedIncreasing(self, deck: List[int]) -> List[int]: FILE: Python/0951-flip-equivalent-binary-trees.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): function traverse (line 13) | def traverse(node): class Solution (line 24) | class Solution: method flipEquiv (line 25) | def flipEquiv(self, root1: Optional[TreeNode], root2: Optional[TreeNod... FILE: Python/0953-verifying-an-alien-dictionary.py class Solution (line 6) | class Solution: method isAlienSorted (line 7) | def isAlienSorted(self, words: List[str], order: str) -> bool: FILE: Python/0954-array-of-doubled-pairs.py class Solution (line 6) | class Solution: method canReorderDoubled (line 7) | def canReorderDoubled(self, arr: List[int]) -> bool: FILE: Python/0955-delete-columns-to-make-sorted-ii.py class Solution (line 6) | class Solution: method minDeletionSize (line 7) | def minDeletionSize(self, strs: List[str]) -> int: FILE: Python/0958-check-completeness-of-a-binary-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method isCompleteTree (line 14) | def isCompleteTree(self, root: Optional[TreeNode]) -> bool: FILE: Python/0959-regions-cut-by-slashes.py class Solution (line 6) | class Solution: method regionsBySlashes (line 7) | def regionsBySlashes(self, grid: List[str]) -> int: method find (line 40) | def find(self, parentArray: List[int], node: int) -> int: method union (line 46) | def union(self, parentArray: List[int], node1: int, node2: int) -> int: FILE: Python/0960-delete-columns-to-make-sorted-iii.py class Solution (line 6) | class Solution: method minDeletionSize (line 7) | def minDeletionSize(self, strs: List[str]) -> int: FILE: Python/0961-n-repeated-element-in-size-2n-array.py class Solution (line 6) | class Solution: method repeatedNTimes (line 7) | def repeatedNTimes(self, nums: List[int]) -> int: FILE: Python/0962-maximum-width-ramp.py class Solution (line 6) | class Solution: method maxWidthRamp (line 7) | def maxWidthRamp(self, nums: List[int]) -> int: FILE: Python/0966-vowel-spellchecker.py class Solution (line 6) | class Solution: method spellchecker (line 7) | def spellchecker(self, wordlist: List[str], queries: List[str]) -> Lis... method deVowel (line 35) | def deVowel(self, s): FILE: Python/0967-numbers-with-same-consecutive-differences.py class Solution (line 6) | class Solution: method numsSameConsecDiff (line 7) | def numsSameConsecDiff(self, n: int, k: int) -> List[int]: FILE: Python/0969-pancake-sorting.py class Solution (line 6) | class Solution: method pancakeSort (line 7) | def pancakeSort(self, arr: List[int]): FILE: Python/0973-k-closest-points-to-origin.py class Solution (line 7) | class Solution: method kClosest (line 8) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method kClosest (line 22) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method kClosest (line 35) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method splitDis (line 54) | def splitDis(self, remaining: List[int], distances: List[float], method distance (line 64) | def distance(self, point: List[int]) -> float: method kClosest (line 70) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method quickSelect (line 73) | def quickSelect(self, points: List[List[int]], k: int) -> List[List[in... method partition (line 85) | def partition(self, points: List[List[int]], left: int, right: int) ->... method choosePivot (line 99) | def choosePivot(self, points: List[List[int]], left: int, right: int) ... method distance (line 102) | def distance(self, point: List[int]) -> int: class Solution (line 21) | class Solution: method kClosest (line 8) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method kClosest (line 22) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method kClosest (line 35) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method splitDis (line 54) | def splitDis(self, remaining: List[int], distances: List[float], method distance (line 64) | def distance(self, point: List[int]) -> float: method kClosest (line 70) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method quickSelect (line 73) | def quickSelect(self, points: List[List[int]], k: int) -> List[List[in... method partition (line 85) | def partition(self, points: List[List[int]], left: int, right: int) ->... method choosePivot (line 99) | def choosePivot(self, points: List[List[int]], left: int, right: int) ... method distance (line 102) | def distance(self, point: List[int]) -> int: class Solution (line 34) | class Solution: method kClosest (line 8) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method kClosest (line 22) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method kClosest (line 35) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method splitDis (line 54) | def splitDis(self, remaining: List[int], distances: List[float], method distance (line 64) | def distance(self, point: List[int]) -> float: method kClosest (line 70) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method quickSelect (line 73) | def quickSelect(self, points: List[List[int]], k: int) -> List[List[in... method partition (line 85) | def partition(self, points: List[List[int]], left: int, right: int) ->... method choosePivot (line 99) | def choosePivot(self, points: List[List[int]], left: int, right: int) ... method distance (line 102) | def distance(self, point: List[int]) -> int: class Solution (line 69) | class Solution: method kClosest (line 8) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method kClosest (line 22) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method kClosest (line 35) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method splitDis (line 54) | def splitDis(self, remaining: List[int], distances: List[float], method distance (line 64) | def distance(self, point: List[int]) -> float: method kClosest (line 70) | def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: method quickSelect (line 73) | def quickSelect(self, points: List[List[int]], k: int) -> List[List[in... method partition (line 85) | def partition(self, points: List[List[int]], left: int, right: int) ->... method choosePivot (line 99) | def choosePivot(self, points: List[List[int]], left: int, right: int) ... method distance (line 102) | def distance(self, point: List[int]) -> int: FILE: Python/0974-subarray-sums-divisible-by-k.py class Solution (line 6) | class Solution: method subarraysDivByK (line 7) | def subarraysDivByK(self, nums: List[int], k: int) -> int: FILE: Python/0976-largest-perimeter-triangle.py class Solution (line 6) | class Solution: method largestPerimeter (line 7) | def largestPerimeter(self, nums: List[int]) -> int: FILE: Python/0977-squares-of-a-sorted-array.py class Solution (line 6) | class Solution: method sortedSquares (line 7) | def sortedSquares(self, nums: List[int]) -> List[int]: FILE: Python/0978-longest-turbulent-subarray.py class Solution (line 6) | class Solution: method maxTurbulenceSize (line 7) | def maxTurbulenceSize(self, arr: List[int]) -> int: FILE: Python/0979-distribute-coins-in-binary-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method distributeCoins (line 14) | def distributeCoins(self, root: Optional[TreeNode]) -> int: FILE: Python/0981-time-based-key-value-store.py class TimeMap (line 10) | class TimeMap: method __init__ (line 12) | def __init__(self): method set (line 15) | def set(self, key: str, value: str, timestamp: int) -> None: method get (line 18) | def get(self, key: str, timestamp: int) -> str: FILE: Python/0983-minimum-cost-for-tickets.py class Solution (line 6) | class Solution: method mincostTickets (line 7) | def mincostTickets(self, days: List[int], costs: List[int]) -> int: FILE: Python/0984-string-without-aaa-or-bbb.py class Solution (line 3) | class Solution: method strWithout3a3b (line 4) | def strWithout3a3b(self, a: int, b: int) -> str: FILE: Python/0986-interval-list-intersections.py class Solution (line 6) | class Solution: method intervalIntersection (line 7) | def intervalIntersection(self, firstList: List[List[int]], secondList:... FILE: Python/0987-vertical-order-traversal-of-a-binary-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method verticalTraversal (line 14) | def verticalTraversal(self, root: TreeNode) -> List[List[int]]: FILE: Python/0988-smallest-string-starting-from-leaf.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method smallestFromLeaf (line 14) | def smallestFromLeaf(self, root: Optional[TreeNode]) -> str: FILE: Python/0992-subarrays-with-k-different-integers.py class Solution (line 7) | class Solution: method subarraysWithKDistinct (line 8) | def subarraysWithKDistinct(self, nums: List[int], k: int) -> int: FILE: Python/0993-cousins-in-binary-tree.py class TreeNode (line 5) | class TreeNode: method __init__ (line 6) | def __init__(self, val=0, left=None, right=None): class Solution (line 12) | class Solution: method isCousins (line 13) | def isCousins(self, root: Optional[TreeNode], x: int, y: int) -> bool: FILE: Python/0994-rotting-oranges.py class Solution (line 7) | class Solution: method orangesRotting (line 8) | def orangesRotting(self, grid: List[List[int]]) -> int: FILE: Python/0995-minimum-number-of-k-consecutive-bit-flips.py class Solution (line 6) | class Solution: method minKBitFlips (line 7) | def minKBitFlips(self, nums: List[int], k: int) -> int: FILE: Python/0997-find-the-town-judge.py class Solution (line 6) | class Solution: method findJudge (line 7) | def findJudge(self, n: int, trust: List[List[int]]) -> int: FILE: Python/0998-maximum-binary-tree-ii.py class Solution (line 8) | class Solution: method insertIntoMaxTree (line 9) | def insertIntoMaxTree(self, root: Optional[TreeNode], val: int) -> Opt... FILE: Python/1002-find-common-characters.py class Solution (line 6) | class Solution: method commonChars (line 7) | def commonChars(self, words: List[str]) -> List[str]: FILE: Python/1003-check-if-word-is-valid-after-substitutions.py class Solution (line 3) | class Solution: method isValid (line 4) | def isValid(self, s: str) -> bool: FILE: Python/1004-max-consecutive-ones-iii.py class Solution (line 6) | class Solution: method longestOnes (line 7) | def longestOnes(self, nums: List[int], k: int) -> int: FILE: Python/1006-clumsy-factorial.py class Solution (line 6) | class Solution: method clumsy (line 7) | def clumsy(self, n: int) -> int: FILE: Python/1007-minimum-domino-rotations-for-equal-row.py class Solution (line 6) | class Solution: method minDominoRotations (line 7) | def minDominoRotations(self, A: List[int], B: List[int]) -> int: FILE: Python/1008-construct-binary-search-tree-from-preorder-traversal.py class Solution (line 9) | class Solution: method bstFromPreorder (line 10) | def bstFromPreorder(self, preorder: List[int]) -> Optional[TreeNode]: FILE: Python/1009-complement-of-base-10-integer.py class Solution (line 3) | class Solution: method bitwiseComplement (line 4) | def bitwiseComplement(self, n: int) -> int: FILE: Python/1010-pairs-of-songs-with-total-durations-divisible-by-60.py class Solution (line 6) | class Solution: method numPairsDivisibleBy60 (line 7) | def numPairsDivisibleBy60(self, time: List[int]) -> int: FILE: Python/1011-capacity-to-ship-packages-within-d-days.py class Solution (line 6) | class Solution: method shipWithinDays (line 7) | def shipWithinDays(self, weights: List[int], days: int) -> int: FILE: Python/1014-best-sightseeing-pair.py class Solution (line 6) | class Solution: method maxScoreSightseeingPair (line 7) | def maxScoreSightseeingPair(self, values: List[int]) -> int: FILE: Python/1015-smallest-integer-divisible-by-k.py class Solution (line 3) | class Solution: method smallestRepunitDivByK (line 4) | def smallestRepunitDivByK(self, k: int) -> int: FILE: Python/1018-binary-prefix-divisible-by-5.py class Solution (line 6) | class Solution: method prefixesDivBy5 (line 7) | def prefixesDivBy5(self, nums: List[int]) -> List[bool]: FILE: Python/1019-next-greater-node-in-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method nextLargerNodes (line 13) | def nextLargerNodes(self, head: Optional[ListNode]) -> List[int]: FILE: Python/1023-camelcase-matching.py class Solution (line 6) | class Solution: method camelMatch (line 7) | def camelMatch(self, queries: List[str], pattern: str) -> List[bool]: FILE: Python/1026-maximum-difference-between-node-and-ancestor.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method maxAncestorDiff (line 15) | def maxAncestorDiff(self, root: Optional[TreeNode]) -> int: FILE: Python/1028-recover-a-tree-from-preorder-traversal.py class Solution (line 7) | class Solution: method recoverFromPreorder (line 8) | def recoverFromPreorder(self, traversal: str) -> Optional[TreeNode]: FILE: Python/1029-two-city-scheduling.py class Solution (line 6) | class Solution: method twoCitySchedCost (line 7) | def twoCitySchedCost(self, costs: List[List[int]]) -> int: FILE: Python/1033-moving-stones-until-consecutive.py class Solution (line 6) | class Solution: method numMovesStones (line 7) | def numMovesStones(self, a: int, b: int, c: int) -> List[int]: FILE: Python/1038-binary-search-tree-to-greater-sum-tree.py class TreeNode (line 3) | class TreeNode: method __init__ (line 4) | def __init__(self, val=0, left=None, right=None): class Solution (line 10) | class Solution: method bstToGst (line 11) | def bstToGst(self, root: TreeNode) -> TreeNode: method trace (line 16) | def trace(self, node: TreeNode, nodeSum): FILE: Python/1039-minimum-score-triangulation-of-polygon.py class Solution (line 7) | class Solution: method minScoreTriangulation (line 8) | def minScoreTriangulation(self, values: List[int]) -> int: FILE: Python/1041-robot-bounded-in-circle.py class Solution (line 3) | class Solution: method isRobotBounded (line 4) | def isRobotBounded(self, instructions: str) -> bool: FILE: Python/1043-partition-array-for-maximum-sum.py class Solution (line 6) | class Solution: method maxSumAfterPartitioning (line 7) | def maxSumAfterPartitioning(self, arr: List[int], k: int) -> int: FILE: Python/1046-last-stone-weight.py class Solution (line 7) | class Solution: method lastStoneWeight (line 8) | def lastStoneWeight(self, stones: List[int]) -> int: FILE: Python/1047-remove-all-adjacent-duplicates-in-string.py class Solution (line 3) | class Solution: method removeDuplicates (line 4) | def removeDuplicates(self, s: str) -> str: FILE: Python/1048-longest-string-chain.py class Solution (line 4) | class Solution: method longestStrChain (line 5) | def longestStrChain(self, words: List[str]) -> int: FILE: Python/1051-height-checker.py class Solution (line 6) | class Solution: method heightChecker (line 7) | def heightChecker(self, heights: List[int]) -> int: FILE: Python/1052-grumpy-bookstore-owner.py class Solution (line 6) | class Solution: method maxSatisfied (line 7) | def maxSatisfied(self, customers: List[int], grumpy: List[int], minute... FILE: Python/1055-shortest-way-to-form-string.py class Solution (line 3) | class Solution: method shortestWay (line 4) | def shortestWay(self, source: str, target: str) -> int: FILE: Python/1057-campus-bikes.py class Solution (line 8) | class Solution: method assignBikes (line 9) | def assignBikes(self, workers: List[List[int]], bikes: List[List[int]]... FILE: Python/1060-missing-element-in-sorted-array.py class Solution (line 4) | class Solution: method missingElement (line 5) | def missingElement(self, nums: List[int], k: int) -> int: FILE: Python/1061-lexicographically-smallest-equivalent-string.py class UnionFind (line 4) | class UnionFind: method __init__ (line 5) | def __init__(self, size): method find (line 8) | def find(self, node): method union (line 14) | def union(self, x, y): method connected (line 23) | def connected(self, x, y): class Solution (line 27) | class Solution: method smallestEquivalentString (line 28) | def smallestEquivalentString(self, s1: str, s2: str, baseStr: str) -> ... FILE: Python/1062-longest-repeating-substring.py class Solution (line 3) | class Solution: method longestRepeatingSubstring (line 4) | def longestRepeatingSubstring(self, s: str) -> int: FILE: Python/1063-number-of-valid-subarrays.py class Solution (line 4) | class Solution: method validSubarrays (line 5) | def validSubarrays(self, nums: List[int]) -> int: FILE: Python/1065-index-pairs-of-a-string.py class Solution (line 6) | class Solution: method indexPairs (line 7) | def indexPairs(self, text: str, words: List[str]) -> List[List[int]]: FILE: Python/1066-campus-bikes-ii.py class Solution (line 7) | class Solution: method assignBikes (line 8) | def assignBikes(self, workers: List[List[int]], bikes: List[List[int]]... FILE: Python/1071-greatest-common-divisor-of-strings.py class Solution (line 4) | class Solution: method gcdOfStrings (line 5) | def gcdOfStrings(self, str1: str, str2: str) -> str: FILE: Python/1072-flip-columns-for-maximum-number-of-equal-rows.py class Solution (line 7) | class Solution: method maxEqualRowsAfterFlips (line 8) | def maxEqualRowsAfterFlips(self, matrix: List[List[int]]) -> int: FILE: Python/1074-number-of-submatrices-that-sum-to-target.py class Solution (line 4) | class Solution: method numSubmatrixSumTarget (line 5) | def numSubmatrixSumTarget(self, matrix: List[List[int]], target: int) ... FILE: Python/1079-letter-tile-possibilities.py class Solution (line 6) | class Solution: method numTilePossibilities (line 7) | def numTilePossibilities(self, tiles: str) -> int: FILE: Python/1081-smallest-subsequence-of-distinct-characters.py class Solution (line 3) | class Solution: method smallestSubsequence (line 4) | def smallestSubsequence(self, s: str) -> str: FILE: Python/1086-high-five.py class Solution (line 8) | class Solution: method highFive (line 9) | def highFive(self, items: List[List[int]]) -> List[List[int]]: FILE: Python/1087-brace-expansion.py class Solution (line 7) | class Solution: method expand (line 8) | def expand(self, s: str) -> List[str]: FILE: Python/1090-largest-values-from-labels.py class Solution (line 8) | class Solution: method largestValsFromLabels (line 9) | def largestValsFromLabels(self, values: List[int], labels: List[int], ... FILE: Python/1091-shortest-path-in-binary-matrix.py class Solution (line 7) | class Solution: method shortestPathBinaryMatrix (line 8) | def shortestPathBinaryMatrix(self, grid: List[List[int]]) -> int: FILE: Python/1092-shortest-common-supersequence.py class Solution (line 3) | class Solution: method shortestCommonSupersequence (line 4) | def shortestCommonSupersequence(self, str1: str, str2: str) -> str: FILE: Python/1093-statistics-from-a-large-sample.py class Solution (line 7) | class Solution: method sampleStats (line 8) | def sampleStats(self, arr: List[int]) -> List[float]: FILE: Python/1094-car-pooling.py class Solution (line 7) | class Solution: method carPooling (line 8) | def carPooling(self, trips: List[List[int]], capacity: int) -> bool: FILE: Python/1095-find-in-mountain-array.py class MountainArray (line 4) | class MountainArray: method __init__ (line 5) | def __init__(self, array: List[int]): method get (line 8) | def get(self, index: int) -> int: method length (line 13) | def length(self) -> int: class Solution (line 17) | class Solution: method findInMountainArray (line 18) | def findInMountainArray(self, target: int, mountainArray: 'MountainArr... FILE: Python/1097-stream-of-characters.py class StreamChecker (line 7) | class StreamChecker: method __init__ (line 9) | def __init__(self, words: List[str]): method query (line 21) | def query(self, letter: str) -> bool: FILE: Python/1099-two-sum-less-than-k.py class Solution (line 6) | class Solution: method twoSumLessThanK (line 7) | def twoSumLessThanK(self, nums: List[int], k: int) -> int: FILE: Python/1100-find-k-length-substrings-with-no-repeated-characters.py class Solution (line 6) | class Solution: method numKLenSubstrNoRepeats (line 7) | def numKLenSubstrNoRepeats(self, s: str, k: int) -> int: FILE: Python/1101-the-earliest-moment-when-everyone-become-friends.py class Solution (line 5) | class Solution: method earliestAcq (line 6) | def earliestAcq(self, logs: List[List[int]], n: int) -> int: FILE: Python/1104-path-in-zigzag-labelled-binary-tree.py class Solution (line 8) | class Solution: method pathInZigZagTree (line 9) | def pathInZigZagTree(self, label: int) -> List[int]: FILE: Python/1105-filling-bookcase-shelves.py class Solution (line 7) | class Solution: method minHeightShelves (line 8) | def minHeightShelves(self, books: List[List[int]], shelfWidth: int) ->... FILE: Python/1106-parsing-a-boolean-expression.py class Solution (line 6) | class Solution: method parseBoolExpr (line 7) | def parseBoolExpr(self, expression: str) -> bool: FILE: Python/1109-corporate-flight-bookings.py class Solution (line 4) | class Solution: method corpFlightBookings (line 5) | def corpFlightBookings(self, bookings: List[List[int]], n: int) -> Lis... FILE: Python/1110-delete-nodes-and-return-forest.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method delNodes (line 14) | def delNodes(self, root: Optional[TreeNode], toDelete: List[int]) -> L... FILE: Python/1119-remove-vowels-from-a-string.py class Solution (line 4) | class Solution: method removeVowels (line 5) | def removeVowels(self, s: str) -> str: FILE: Python/1120-maximum-average-subtree.py class TreeNode (line 4) | class TreeNode: method __init__ (line 5) | def __init__(self, val=0, left=None, right=None): class Solution (line 11) | class Solution: method maximumAverageSubtree (line 12) | def maximumAverageSubtree(self, root: Optional[TreeNode]) -> float: FILE: Python/1121-divide-array-into-increasing-sequences.py class Solution (line 6) | class Solution: method canDivideIntoSubsequences (line 7) | def canDivideIntoSubsequences(self, nums: List[int], k: int) -> bool: FILE: Python/1122-relative-sort-array.py class Solution (line 6) | class Solution: method relativeSortArray (line 7) | def relativeSortArray(self, arr1: List[int], arr2: List[int]) -> List[... FILE: Python/1123-lowest-common-ancestor-of-deepest-leaves.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method lcaDeepestLeaves (line 14) | def lcaDeepestLeaves(self, root: Optional[TreeNode]) -> Optional[TreeN... FILE: Python/1128-number-of-equivalent-domino-pairs.py class Solution (line 7) | class Solution: method numEquivDominoPairs (line 8) | def numEquivDominoPairs(self, dominoes: List[List[int]]) -> int: FILE: Python/1133-largest-unique-number.py class Solution (line 4) | class Solution: method largestUniqueNumber (line 5) | def largestUniqueNumber(self, nums: List[int]) -> int: FILE: Python/1135-connecting-cities-with-minimum-cost.py class Solution (line 8) | class Solution: method minimumCost (line 9) | def minimumCost(self, n: int, connections: List[List[int]]) -> int: FILE: Python/1136-parallel-courses.py class Solution (line 4) | class Solution: method minimumSemesters (line 5) | def minimumSemesters(self, n: int, relations: List[List[int]]) -> int: FILE: Python/1137-n-th-tribonacci-number.py class Solution (line 6) | class Solution: method tribonacci (line 7) | def tribonacci(self, n: int) -> int: method tribonacci (line 22) | def tribonacci(self, n: int) -> int: class Solution (line 21) | class Solution: method tribonacci (line 7) | def tribonacci(self, n: int) -> int: method tribonacci (line 22) | def tribonacci(self, n: int) -> int: FILE: Python/1138-alphabet-board-path.py class Solution (line 3) | class Solution: method alphabetBoardPath (line 4) | def alphabetBoardPath(self, target: str): FILE: Python/1140-stone-game-ii.py class Solution (line 6) | class Solution: method stoneGameII (line 7) | def stoneGameII(self, piles: List[int]) -> int: method max_stones (line 16) | def max_stones( FILE: Python/1143-longest-common-subsequence.py class Solution (line 8) | class Solution: method longestCommonSubsequence (line 9) | def longestCommonSubsequence(self, text1: str, text2: str) -> int: method longestCommonSubsequence (line 28) | def longestCommonSubsequence(self, text1: str, text2: str) -> int: method longestCommonSubsequence (line 47) | def longestCommonSubsequence(self, text1: str, text2: str) -> int: class Solution (line 27) | class Solution: method longestCommonSubsequence (line 9) | def longestCommonSubsequence(self, text1: str, text2: str) -> int: method longestCommonSubsequence (line 28) | def longestCommonSubsequence(self, text1: str, text2: str) -> int: method longestCommonSubsequence (line 47) | def longestCommonSubsequence(self, text1: str, text2: str) -> int: class Solution (line 46) | class Solution: method longestCommonSubsequence (line 9) | def longestCommonSubsequence(self, text1: str, text2: str) -> int: method longestCommonSubsequence (line 28) | def longestCommonSubsequence(self, text1: str, text2: str) -> int: method longestCommonSubsequence (line 47) | def longestCommonSubsequence(self, text1: str, text2: str) -> int: FILE: Python/1144-decrease-elements-to-make-array-zigzag.py class Solution (line 6) | class Solution: method movesToMakeZigzag (line 7) | def movesToMakeZigzag(self, nums: List[int]) -> int: FILE: Python/1146-snapshot-array.py class SnapshotArray (line 6) | class SnapshotArray: method __init__ (line 8) | def __init__(self, length: int): method set (line 12) | def set(self, index: int, val: int) -> None: method snap (line 15) | def snap(self) -> int: method get (line 19) | def get(self, index: int, snapId: int) -> int: FILE: Python/1150-check-if-a-number-is-majority-element-in-a-sorted-array.py class Solution (line 7) | class Solution: method isMajorityElement (line 8) | def isMajorityElement(self, nums: List[int], target: int) -> bool: FILE: Python/1151-minimum-swaps-to-group-all-1s-together.py class Solution (line 6) | class Solution: method minSwaps (line 7) | def minSwaps(self, data: List[int]) -> int: FILE: Python/1152-analyze-user-website-visit-pattern.py class Solution (line 8) | class Solution: method mostVisitedPattern (line 9) | def mostVisitedPattern(self, username: List[str], timestamp: List[int]... FILE: Python/1155-number-of-dice-rolls-with-target-sum.py class Solution (line 4) | class Solution: method numRollsToTarget (line 5) | def numRollsToTarget(self, n: int, k: int, target: int) -> int: FILE: Python/1160-find-words-that-can-be-formed-by-characters.py class Solution (line 7) | class Solution: method countCharacters (line 8) | def countCharacters(self, words: List[str], chars: str) -> int: FILE: Python/1161-maximum-level-sum-of-a-binary-tree.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method maxLevelSum (line 15) | def maxLevelSum(self, root: Optional[TreeNode]) -> int: FILE: Python/1165-single-row-keyboard.py class Solution (line 3) | class Solution: method calculateTime (line 4) | def calculateTime(self, keyboard: str, word: str) -> int: FILE: Python/1166-design-file-system.py class FileSystem (line 4) | class FileSystem: method __init__ (line 6) | def __init__(self): method createPath (line 9) | def createPath(self, path: str, value: int) -> bool: method get (line 21) | def get(self, path: str) -> int: FILE: Python/1167-minimum-cost-to-connect-sticks.py class Solution (line 7) | class Solution: method connectSticks (line 8) | def connectSticks(self, sticks: List[int]) -> int: FILE: Python/1168-optimize-water-distribution-in-a-village.py class UnionFind (line 6) | class UnionFind: method __init__ (line 7) | def __init__(self, size): method find (line 11) | def find(self, node): method union (line 17) | def union(self, x, y): method connected (line 29) | def connected(self, x, y): class Solution (line 33) | class Solution: method minCostToSupplyWater (line 34) | def minCostToSupplyWater(self, n: int, wells: List[int], pipes: List[L... FILE: Python/1170-compare-strings-by-frequency-of-the-smallest-character.py class Solution (line 7) | class Solution: method numSmallerByFrequency (line 8) | def numSmallerByFrequency(self, queries: List[str], words: List[str]) ... FILE: Python/1171-remove-zero-sum-consecutive-nodes-from-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution(object): method removeZeroSumSublists (line 13) | def removeZeroSumSublists(self, head: Optional[ListNode]) -> Optional[... FILE: Python/1176-diet-plan-performance.py class Solution (line 6) | class Solution: method dietPlanPerformance (line 7) | def dietPlanPerformance(self, calories: List[int], k: int, lower: int,... FILE: Python/1181-before-and-after-puzzle.py class Solution (line 6) | class Solution: method beforeAndAfterPuzzles (line 7) | def beforeAndAfterPuzzles(self, phrases: List[str]) -> List[str]: FILE: Python/1182-shortest-distance-to-target-color.py class Solution (line 8) | class Solution: method shortestDistanceColor (line 9) | def shortestDistanceColor(self, colors: List[int], queries: List[List[... FILE: Python/1183-maximum-number-of-ones.py class Solution (line 3) | class Solution: method maximumNumberOfOnes (line 4) | def maximumNumberOfOnes(self, width: int, height: int, sideLength: int... FILE: Python/1190-reverse-substrings-between-each-pair-of-parentheses.py class Solution (line 3) | class Solution: method reverseParentheses (line 4) | def reverseParentheses(self, s: str) -> str: FILE: Python/1192-critical-connections-in-a-network.py class Solution (line 7) | class Solution: method criticalConnections (line 12) | def criticalConnections(self, n: int, connections: List[List[int]]) ->... method dfs (line 20) | def dfs(self, node: int, discoveryRank: int) -> int: method formGraph (line 35) | def formGraph(self, n: int, connections: List[List[int]]): FILE: Python/1197-minimum-knight-moves.py class Solution (line 4) | class Solution: method minKnightMoves (line 5) | def minKnightMoves(self, x: int, y: int) -> int: FILE: Python/1198-find-smallest-common-element-in-all-rows.py class Solution (line 6) | class Solution: method smallestCommonElement (line 7) | def smallestCommonElement(self, mat: List[List[int]]) -> int: FILE: Python/1199-minimum-time-to-build-blocks.py class Solution (line 4) | class Solution: method minBuildTime (line 5) | def minBuildTime(self, blocks: List[int], split: int) -> int: FILE: Python/1200-minimum-absolute-difference.py class Solution (line 6) | class Solution: method minimumAbsDifference (line 7) | def minimumAbsDifference(self, arr: List[int]) -> List[List[int]]: FILE: Python/1202-smallest-string-with-swaps.py class UnionFind (line 8) | class UnionFind: method __init__ (line 9) | def __init__(self, size): method find (line 13) | def find(self, node): method union (line 19) | def union(self, x, y): method connected (line 32) | def connected(self, x, y): class Solution (line 36) | class Solution: method smallestStringWithSwaps (line 37) | def smallestStringWithSwaps(self, s: str, pairs: List[List[int]]) -> str: FILE: Python/1203-sort-items-by-groups-respecting-dependencies.py class Solution (line 5) | class Solution: method sortItems (line 6) | def sortItems(self, n: int, m: int, group: List[int], beforeItems: Lis... FILE: Python/1207-unique-number-of-occurrences.py class Solution (line 7) | class Solution: method uniqueOccurrences (line 8) | def uniqueOccurrences(self, arr: List[int]) -> bool: FILE: Python/1208-get-equal-substrings-within-budget.py class Solution (line 3) | class Solution: method equalSubstring (line 4) | def equalSubstring(self, s: str, t: str, maxCost: int) -> int: FILE: Python/1209-remove-all-adjacent-duplicates-in-string-ii.py class Solution (line 3) | class Solution: method removeDuplicates (line 4) | def removeDuplicates(self, s: str, k: int) -> str: FILE: Python/1213-intersection-of-three-sorted-arrays.py class Solution (line 6) | class Solution: method arraysIntersection (line 7) | def arraysIntersection(self, arr1: List[int], arr2: List[int], arr3: L... FILE: Python/1214-two-sum-bsts.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method twoSumBSTs (line 14) | def twoSumBSTs(self, root1: Optional[TreeNode], root2: Optional[TreeNo... FILE: Python/1216-valid-palindrome-iii.py class Solution (line 1) | class Solution: method isValidPalindrome (line 2) | def isValidPalindrome(self, s: str, k: int) -> bool: FILE: Python/1219-path-with-maximum-gold.py class Solution (line 6) | class Solution: method dfs (line 10) | def dfs(self, grid: List[List[int]], x: int, y: int, n: int, m: int): method getMaximumGold (line 27) | def getMaximumGold(self, grid: List[List[int]]) -> int: FILE: Python/1220-count-vowels-permutation.py class Solution (line 1) | class Solution: method countVowelPermutation (line 2) | def countVowelPermutation(self, n: int) -> int: FILE: Python/1222-queens-that-can-attack-the-king.py class Solution (line 6) | class Solution: method queensAttacktheKing (line 7) | def queensAttacktheKing(self, queens: List[List[int]], king: List[int]... FILE: Python/1229-meeting-scheduler.py class Solution (line 6) | class Solution: method minAvailableDuration (line 7) | def minAvailableDuration(self, slots1: List[List[int]], slots2: List[L... FILE: Python/1230-toss-strange-coins.py class Solution (line 6) | class Solution: method probabilityOfHeads (line 7) | def probabilityOfHeads(self, prob: List[float], target: int) -> float: FILE: Python/1233-remove-sub-folders-from-the-filesystem.py class Solution (line 6) | class Solution: method removeSubfolders (line 7) | def removeSubfolders(self, folder: List[str]) -> List[str]: FILE: Python/1235-maximum-profit-in-job-scheduling.py class Solution (line 5) | class Solution: method __init__ (line 6) | def __init__(self): method findMaxProfit (line 9) | def findMaxProfit(self, jobs: List[List[int]], start: List[int], n: in... method jobScheduling (line 20) | def jobScheduling(self, startTime: List[int], endTime: List[int], prof... FILE: Python/1239-maximum-length-of-a-concatenated-string-with-unique-characters.py class Solution (line 6) | class Solution: method maxLength (line 7) | def maxLength(self, arr: List[str]) -> int: FILE: Python/1244-design-a-leaderboard.py class Leaderboard (line 4) | class Leaderboard: method __init__ (line 6) | def __init__(self): method addScore (line 9) | def addScore(self, playerId: int, score: int) -> None: method top (line 14) | def top(self, K: int) -> int: method reset (line 25) | def reset(self, playerId: int) -> None: FILE: Python/1245-tree-diameter.py class Solution (line 7) | class Solution: method treeDiameter (line 10) | def treeDiameter(self, edges: List[List[int]]) -> int: FILE: Python/1248-count-number-of-nice-subarrays.py class Solution (line 6) | class Solution: method numberOfSubarrays (line 7) | def numberOfSubarrays(self, nums: List[int], k: int) -> int: FILE: Python/1249-minimum-remove-to-make-valid-parentheses.py class Solution (line 3) | class Solution: method minRemoveToMakeValid (line 4) | def minRemoveToMakeValid(self, s: str) -> str: FILE: Python/1253-reconstruct-a-2-row-binary-matrix.py class Solution (line 6) | class Solution: method reconstructMatrix (line 7) | def reconstructMatrix(self, upper: int, lower: int, colsum: List[int])... FILE: Python/1254-number-of-closed-islands.py class Solution (line 7) | class Solution: method closedIsland (line 8) | def closedIsland(self, grid: List[List[int]]) -> int: FILE: Python/1255-maximum-score-words-formed-by-letters.py class Solution (line 6) | class Solution: method maxScoreWords (line 7) | def maxScoreWords(self, words: List[str], letters: List[str], score: L... FILE: Python/1256-encode-number.py class Solution (line 3) | class Solution: method encode (line 4) | def encode(self, num: int) -> str: FILE: Python/1257-smallest-common-region.py class Solution (line 6) | class Solution: method fetchPathForRegion (line 7) | def fetchPathForRegion(self, currNode: str, childParentMap: set) -> Li... method findSmallestRegion (line 18) | def findSmallestRegion(self, regions: List[List[str]], region1: str, r... FILE: Python/1261-find-elements-in-a-contaminated-binary-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class FindElements (line 13) | class FindElements: method __init__ (line 14) | def __init__(self, root: Optional[TreeNode]): method find (line 28) | def find(self, target: int) -> bool: FILE: Python/1262-greatest-sum-divisible-by-three.py class Solution (line 6) | class Solution: method maxSumDivThree (line 7) | def maxSumDivThree(self, nums: List[int]) -> int: FILE: Python/1266-minimum-time-visiting-all-points.py class Solution (line 6) | class Solution: method minTimeToVisitAllPoints (line 7) | def minTimeToVisitAllPoints(self, points: List[List[int]]) -> int: FILE: Python/1267-count-servers-that-communicate.py class Solution (line 6) | class Solution: method countServers (line 7) | def countServers(self, grid: List[List[int]]) -> int: FILE: Python/1268-search-suggestions-system.py class TrieNode (line 6) | class TrieNode: method __init__ (line 7) | def __init__(self, char=""): class Trie (line 14) | class Trie: method __init__ (line 15) | def __init__(self): method insert (line 18) | def insert(self, word: str) -> None: method search (line 32) | def search(self, word: str) -> bool: class Solution (line 41) | class Solution: method suggestedProducts (line 42) | def suggestedProducts(self, products: List[str], searchWord: str) -> L... FILE: Python/1269-number-of-ways-to-stay-in-the-same-place-after-some-steps.py class Solution (line 1) | class Solution: method numWays (line 2) | def numWays(self, steps: int, arrLen: int) -> int: FILE: Python/1272-remove-interval.py class Solution (line 6) | class Solution: method removeInterval (line 7) | def removeInterval(self, intervals: List[List[int]], toBeRemoved: List... FILE: Python/1276-number-of-burgers-with-no-waste-of-ingredients.py class Solution (line 6) | class Solution: method numOfBurgers (line 7) | def numOfBurgers(self, tomatoSlices: int, cheeseSlices: int) -> List[i... FILE: Python/1277-count-square-submatrices-with-all-ones.py class Solution (line 6) | class Solution: method countSquares (line 7) | def countSquares(self, matrix: List[List[int]]) -> int: FILE: Python/1282-group-the-people-given-the-group-size-they-belong-to.py class Solution (line 7) | class Solution: method groupThePeople (line 8) | def groupThePeople(self, groupSizes: List[int]) -> List[List[int]]: FILE: Python/1283-find-the-smallest-divisor-given-a-threshold.py class Solution (line 8) | class Solution: method smallestDivisor (line 9) | def smallestDivisor(self, nums: List[int], threshold: int) -> int: FILE: Python/1287-element-appearing-more-than-25-in-sorted-array.py class Solution (line 6) | class Solution: method findSpecialInteger (line 7) | def findSpecialInteger(self, arr: List[int]) -> int: FILE: Python/1288-remove-covered-intervals.py class Solution (line 6) | class Solution: method removeCoveredIntervals (line 7) | def removeCoveredIntervals(self, intervals: List[List[int]]) -> int: FILE: Python/1289-minimum-falling-path-sum-ii.py class Solution (line 7) | class Solution: method minFallingPathSum (line 8) | def minFallingPathSum(self, grid: List[List[int]]) -> int: FILE: Python/1290-convert-binary-number-in-a-linked-list-to-integer.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method getDecimalValue (line 13) | def getDecimalValue(self, head: Optional[ListNode]) -> int: FILE: Python/1291-sequential-digits.py class Solution (line 6) | class Solution: method sequentialDigits (line 7) | def sequentialDigits(self, low: int, high: int) -> List[int]: FILE: Python/1292-maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold.py class Solution (line 6) | class Solution: method maxSideLength (line 7) | def maxSideLength(self, mat: List[List[int]], threshold: int) -> int: FILE: Python/1295-find-numbers-with-even-number-of-digits.py class Solution (line 6) | class Solution: method findNumbers (line 7) | def findNumbers(self, nums: List[int]) -> int: FILE: Python/1296-divide-array-in-sets-of-k-consecutive-numbers.py class Solution (line 7) | class Solution: method isPossibleDivide (line 8) | def isPossibleDivide(self, nums: List[int], k: int) -> bool: FILE: Python/1298-maximum-candies-you-can-get-from-boxes.py class Solution (line 7) | class Solution: method maxCandies (line 8) | def maxCandies( FILE: Python/1300-sum-of-mutated-array-closest-to-target.py class Solution (line 6) | class Solution: method findBestValue (line 7) | def findBestValue(self, arr: List[int], target: int) -> int: FILE: Python/1302-deepest-leaves-sum.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method deepestLeavesSum (line 14) | def deepestLeavesSum(self, root: Optional[TreeNode]) -> int: FILE: Python/1304-find-n-unique-integers-sum-up-to-zero.py class Solution (line 6) | class Solution: method sumZero (line 7) | def sumZero(self, n: int) -> List[int]: FILE: Python/1305-all-elements-in-two-binary-search-trees.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method getAllElements (line 14) | def getAllElements(self, root1: Optional[TreeNode], root2: Optional[Tr... FILE: Python/1306-jump-game-iii.py class Solution (line 7) | class Solution: method canReach (line 8) | def canReach(self, arr: List[int], start: int) -> bool: FILE: Python/1310-xor-queries-of-a-subarray.py class Solution (line 6) | class Solution: method xorQueries (line 7) | def xorQueries(self, arr: List[int], queries: List[List[int]]) -> List... FILE: Python/1314-matrix-block-sum.py class Solution (line 6) | class Solution: method matrixBlockSum (line 7) | def matrixBlockSum(self, mat: List[List[int]], K: int) -> List[List[in... FILE: Python/1315-sum-of-nodes-with-even-valued-grandparent.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method sumEvenGrandparent (line 14) | def sumEvenGrandparent(self, root: Optional[TreeNode]) -> int: FILE: Python/1317-convert-integer-to-the-sum-of-two-no-zero-integers.py class Solution (line 6) | class Solution: method getNoZeroIntegers (line 7) | def getNoZeroIntegers(self, n: int) -> List[int]: FILE: Python/1318-minimum-flips-to-make-a-or-b-equal-to-c.py class Solution (line 3) | class Solution: method minFlips (line 4) | def minFlips(self, a: int, b: int, c: int) -> int: FILE: Python/1323-maximum-69-number.py class Solution (line 3) | class Solution: method maximum69Number (line 4) | def maximum69Number(self, num: int) -> int: FILE: Python/1324-print-words-vertically.py class Solution (line 6) | class Solution: method printVertically (line 7) | def printVertically(self, s: str) -> List[str]: FILE: Python/1325-delete-leaves-with-a-given-value.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method removeLeafNodes (line 14) | def removeLeafNodes(self, root: Optional[TreeNode], target: int) -> Op... FILE: Python/1326-minimum-number-of-taps-to-open-to-water-a-garden.py class Solution (line 4) | class Solution: method minTaps (line 5) | def minTaps(self, n: int, ranges: List[int]) -> int: FILE: Python/1328-break-a-palindrome.py class Solution (line 3) | class Solution: method breakPalindrome (line 4) | def breakPalindrome(self, palindrome: str) -> str: FILE: Python/1329-sort-the-matrix-diagonally.py class Solution (line 7) | class Solution: method diagonalSort (line 8) | def diagonalSort(self, mat: List[List[int]]) -> List[List[int]]: FILE: Python/1331-rank-transform-of-an-array.py class Solution (line 6) | class Solution: method arrayRankTransform (line 7) | def arrayRankTransform(self, arr: List[int]) -> List[int]: FILE: Python/1333-filter-restaurants-by-vegan-friendly-price-and-distance.py class Solution (line 6) | class Solution: method filterRestaurants (line 7) | def filterRestaurants(self, restaurants: List[List[int]], veganFriendl... FILE: Python/1334-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance.py class Solution (line 7) | class Solution: method findTheCity (line 8) | def findTheCity( method dijkstra (line 30) | def dijkstra( method getCityWithFewestReachable (line 61) | def getCityWithFewestReachable( FILE: Python/1335-minimum-difficulty-of-a-job-schedule.py class Solution (line 3) | class Solution: method minDifficulty (line 4) | def minDifficulty(self, jobDifficulty, d): FILE: Python/1337-the-k-weakest-rows-in-a-matrix.py class Solution (line 7) | class Solution: method kWeakestRows (line 8) | def kWeakestRows(self, mat: List[List[int]], k: int) -> List[int]: FILE: Python/1338-reduce-array-size-to-the-half.py class Solution (line 6) | class Solution: method minSetSize (line 7) | def minSetSize(self, arr: List[int]) -> int: FILE: Python/1339-maximum-product-of-splitted-binary-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method maxProduct (line 14) | def maxProduct(self, root: Optional[TreeNode]) -> int: FILE: Python/1343-number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold.py class Solution (line 6) | class Solution: method numOfSubarrays (line 7) | def numOfSubarrays(self, arr: List[int], k: int, threshold: int) -> int: FILE: Python/1344-angle-between-hands-of-a-clock.py class Solution (line 3) | class Solution: method angleClock (line 4) | def angleClock(self, hour: int, minutes: int) -> float: FILE: Python/1346-check-if-n-and-its-double-exist.py class Solution (line 6) | class Solution: method checkIfExist (line 7) | def checkIfExist(self, arr: List[int]) -> bool: FILE: Python/1347-minimum-number-of-steps-to-make-two-strings-anagram.py class Solution (line 6) | class Solution: method minSteps (line 7) | def minSteps(self, s: str, t: str) -> int: FILE: Python/1351-count-negative-numbers-in-a-sorted-matrix.py class Solution (line 6) | class Solution: method countNegatives (line 7) | def countNegatives(self, grid: List[List[int]]) -> int: FILE: Python/1352-product-of-the-last-k-numbers.py class ProductOfNumbers (line 3) | class ProductOfNumbers: method __init__ (line 5) | def __init__(self): method add (line 10) | def add(self, num: int) -> None: method getProduct (line 20) | def getProduct(self, k: int) -> int: FILE: Python/1353-maximum-number-of-events-that-can-be-attended.py class Solution (line 7) | class Solution: method maxEvents (line 8) | def maxEvents(self, events: List[List[int]]) -> int: FILE: Python/1356-sort-integers-by-the-number-of-1-bits.py class Solution (line 4) | class Solution: method sortByBits (line 5) | def sortByBits(self, arr: List[int]) -> List[int]: FILE: Python/1357-apply-discount-every-n-orders.py class Cashier (line 7) | class Cashier: method __init__ (line 9) | def __init__(self, n: int, discount: int, products: List[int], prices:... method getBill (line 17) | def getBill(self, product: List[int], amount: List[int]) -> float: FILE: Python/1358-number-of-substrings-containing-all-three-characters.py class Solution (line 3) | class Solution: method numberOfSubstrings (line 4) | def numberOfSubstrings(self, s: str) -> int: FILE: Python/1359-count-all-valid-pickup-and-delivery-options.py class Solution (line 1) | class Solution: method countOrders (line 2) | def countOrders(self, n: int) -> int: FILE: Python/1360-number-of-days-between-two-dates.py class Solution (line 4) | class Solution: method daysBetweenDates (line 5) | def daysBetweenDates(self, date1: str, date2: str) -> int: FILE: Python/1361-validate-binary-tree-nodes.py class Solution (line 4) | class Solution: method validateBinaryTreeNodes (line 5) | def validateBinaryTreeNodes(self, n: int, leftChild: List[int], rightC... FILE: Python/1362-closest-divisors.py class Solution (line 7) | class Solution: method closestDivisors (line 8) | def closestDivisors(self, num: int) -> List[int]: FILE: Python/1365-how-many-numbers-are-smaller-than-the-current-number.py class Solution (line 7) | class Solution: method smallerNumbersThanCurrent (line 8) | def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]: FILE: Python/1366-rank-teams-by-votes.py class Solution (line 6) | class Solution: method rankTeams (line 7) | def rankTeams(self, votes: List[str]) -> str: FILE: Python/1367-linked-list-in-binary-tree.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class TreeNode (line 12) | class TreeNode: method __init__ (line 13) | def __init__(self, val=0, left=None, right=None): class Solution (line 19) | class Solution: method dfs (line 20) | def dfs(self, head: Optional[ListNode], node: Optional[TreeNode]) -> b... method isSubPath (line 29) | def isSubPath(self, head: Optional[ListNode], root: Optional[TreeNode]... FILE: Python/1368-minimum-cost-to-make-at-least-one-valid-path-in-a-grid.py class Solution (line 7) | class Solution: method minCost (line 8) | def minCost(self, grid: List[List[int]]) -> int: FILE: Python/1371-find-the-longest-substring-containing-vowels-in-even-counts.py class Solution (line 3) | class Solution: method findTheLongestSubstring (line 4) | def findTheLongestSubstring(self, s: str) -> int: FILE: Python/1372-longest-zigzag-path-in-a-binary-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method longestZigZag (line 14) | def longestZigZag(self, root: Optional[TreeNode]) -> int: FILE: Python/1375-number-of-times-binary-string-is-prefix-aligned.py class Solution (line 6) | class Solution: method numTimesAllBlue (line 7) | def numTimesAllBlue(self, flips: List[int]) -> int: FILE: Python/1376-time-needed-to-inform-all-employees.py class Solution (line 7) | class Solution: method numOfMinutes (line 8) | def numOfMinutes(self, n: int, headID: int, manager: List[int], inform... FILE: Python/1380-lucky-numbers-in-a-matrix.py class Solution (line 6) | class Solution: method luckyNumbers (line 7) | def luckyNumbers(self, matrix: List[List[int]]) -> List[int]: FILE: Python/1381-design-a-stack-with-increment-operation.py class CustomStack (line 1) | class CustomStack: method __init__ (line 3) | def __init__(self, maxSize: int): method push (line 7) | def push(self, x: int) -> None: method pop (line 14) | def pop(self) -> int: method increment (line 20) | def increment(self, k: int, val: int) -> None: FILE: Python/1382-balance-a-binary-search-tree.py class TreeNode (line 3) | class TreeNode: method __init__ (line 4) | def __init__(self, val=0, left=None, right=None): class Solution (line 10) | class Solution: method balanceBST (line 11) | def balanceBST(self, root: TreeNode) -> TreeNode: method Traversal (line 17) | def Traversal(self, root: TreeNode, inorder: list): method createBalancedBst (line 24) | def createBalancedBst(self, inorder: list, start: int, end: int) -> Tr... FILE: Python/1385-find-the-distance-value-between-two-arrays.py class Solution (line 6) | class Solution: method findTheDistanceValue (line 7) | def findTheDistanceValue(self, arr1: List[int], arr2: List[int], d: in... FILE: Python/1387-sort-integers-by-the-power-value.py class Solution (line 6) | class Solution: method getKth (line 7) | def getKth(self, lo: int, hi: int, k: int) -> int: FILE: Python/1390-four-divisors.py class Solution (line 7) | class Solution: method sumFourDivisors (line 8) | def sumFourDivisors(self, nums: List[int]) -> int: FILE: Python/1394-find-lucky-integer-in-an-array.py class Solution (line 6) | class Solution: method findLucky (line 7) | def findLucky(self, arr: List[int]) -> int: FILE: Python/1395-count-number-of-teams.py class Solution (line 6) | class Solution: method numTeams (line 7) | def numTeams(self, rating: List[int]) -> int: FILE: Python/1396-design-underground-system.py class UndergroundSystem (line 6) | class UndergroundSystem: method __init__ (line 8) | def __init__(self): method checkIn (line 12) | def checkIn(self, id: int, stationName: str, t: int) -> None: method checkOut (line 15) | def checkOut(self, id: int, stationName: str, t: int) -> None: method getAverageTime (line 21) | def getAverageTime(self, startStation: str, endStation: str) -> float: FILE: Python/1399-count-largest-group.py class Solution (line 6) | class Solution: method countLargestGroup (line 7) | def countLargestGroup(self, n: int) -> int: FILE: Python/1400-construct-k-palindrome-strings.py class Solution (line 3) | class Solution: method canConstruct (line 4) | def canConstruct(self, s: str, k: int) -> bool: FILE: Python/1404-number-of-steps-to-reduce-a-number-in-binary-representation-to-one.py class Solution (line 3) | class Solution: method numSteps (line 4) | def numSteps(self, s: str) -> int: FILE: Python/1405-longest-happy-string.py class Solution (line 6) | class Solution: method longestDiverseString (line 7) | def longestDiverseString(self, a: int, b: int, c: int) -> str: FILE: Python/1408-string-matching-in-an-array.py class Solution (line 6) | class Solution: method stringMatching (line 7) | def stringMatching(self, words: List[str]) -> List[str]: FILE: Python/1409-queries-on-a-permutation-with-key.py class Solution (line 6) | class Solution: method processQueries (line 7) | def processQueries(self, queries: List[int], m: int) -> List[int]: FILE: Python/1410-html-entity-parser.py class Solution (line 3) | class Solution: method entityParser (line 4) | def entityParser(self, text: str) -> str: FILE: Python/1411-number-of-ways-to-paint-n-3-grid.py class Solution (line 3) | class Solution: method numOfWays (line 4) | def numOfWays(self, n: int) -> int: FILE: Python/1414-find-the-minimum-number-of-fibonacci-numbers-whose-sum-is-k.py class Solution (line 3) | class Solution: method findMinFibonacciNumbers (line 4) | def findMinFibonacciNumbers(self, k: int) -> int: FILE: Python/1415-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n.py class Solution (line 3) | class Solution: method getHappyString (line 4) | def getHappyString(self, n: int, k: int) -> str: FILE: Python/1418-display-table-of-food-orders-in-a-restaurant.py class Solution (line 7) | class Solution: method displayTable (line 8) | def displayTable(self, orders: List[List[str]]) -> List[List[str]]: FILE: Python/1420-build-array-where-you-can-find-the-maximum-exactly-k-comparisons.py class Solution (line 4) | class Solution: method numOfArrays (line 5) | def numOfArrays(self, n: int, m: int, k: int) -> int: FILE: Python/1422-maximum-score-after-splitting-a-string.py class Solution (line 3) | class Solution: method maxScore (line 4) | def maxScore(self, s: str) -> int: FILE: Python/1423-maximum-points-you-can-obtain-from-cards.py class Solution (line 6) | class Solution: method maxScore (line 7) | def maxScore(self, cardPoints: List[int], k: int) -> int: FILE: Python/1424-diagonal-traverse-ii.py class Solution (line 7) | class Solution: method findDiagonalOrder (line 8) | def findDiagonalOrder(self, nums: List[List[int]]) -> List[int]: FILE: Python/1425-constrained-subsequence-sum.py class Solution (line 5) | class Solution: method constrainedSubsetSum (line 6) | def constrainedSubsetSum(self, nums: List[int], k: int) -> int: FILE: Python/1427-perform-string-shifts.py class Solution (line 6) | class Solution: method stringShift (line 7) | def stringShift(self, s: str, shift: List[List[int]]) -> str: FILE: Python/1428-leftmost-column-with-at-least-a-one.py class Row (line 10) | class Row: method __init__ (line 11) | def __init__(self, row, matrix): method __getitem__ (line 15) | def __getitem__(self, j): method __len__ (line 18) | def __len__(self): class Solution (line 22) | class Solution: method leftMostColumnWithOne (line 23) | def leftMostColumnWithOne(self, binaryMatrix: 'BinaryMatrix') -> int: FILE: Python/1429-first-unique-number.py class FirstUnique (line 5) | class FirstUnique: method __init__ (line 7) | def __init__(self, nums: List[int]): method showFirstUnique (line 19) | def showFirstUnique(self) -> int: method add (line 22) | def add(self, value: int) -> None: FILE: Python/1431-kids-with-the-greatest-number-of-candies.py class Solution (line 6) | class Solution: method kidsWithCandies (line 7) | def kidsWithCandies(self, candies: List[int], extraCandies: int) -> Li... FILE: Python/1432-max-difference-you-can-get-from-changing-an-integer.py class Solution (line 3) | class Solution: method maxDiff (line 4) | def maxDiff(self, num: int) -> int: FILE: Python/1433-check-if-a-string-can-break-another-string.py class Solution (line 3) | class Solution: method checkIfCanBreak (line 4) | def checkIfCanBreak(self, s1: str, s2: str) -> bool: FILE: Python/1436-destination-city.py class Solution (line 6) | class Solution: method destCity (line 7) | def destCity(self, paths: List[List[str]]) -> str: FILE: Python/1437-check-if-all-1s-are-at-least-length-k-places-away.py class Solution (line 6) | class Solution: method kLengthApart (line 7) | def kLengthApart(self, nums: List[int], k: int) -> bool: FILE: Python/1438-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit.py class Solution (line 7) | class Solution: method longestSubarray (line 8) | def longestSubarray(self, nums: List[int], limit: int) -> int: FILE: Python/1441-build-an-array-with-stack-operations.py class Solution (line 6) | class Solution: method buildArray (line 7) | def buildArray(self, target: List[int], n: int) -> List[str]: FILE: Python/1442-count-triplets-that-can-form-two-arrays-of-equal-xor.py class Solution (line 7) | class Solution: method countTriplets (line 8) | def countTriplets(self, arr: List[int]) -> int: method countTriplets (line 24) | def countTriplets(self, arr: List[int]) -> int: class Solution (line 23) | class Solution: method countTriplets (line 8) | def countTriplets(self, arr: List[int]) -> int: method countTriplets (line 24) | def countTriplets(self, arr: List[int]) -> int: FILE: Python/1447-simplified-fractions.py class Solution (line 7) | class Solution: method simplifiedFractions (line 8) | def simplifiedFractions(self, n: int) -> List[str]: FILE: Python/1448-count-good-nodes-in-binary-tree.py class TreeNode (line 1) | class TreeNode: method __init__ (line 2) | def __init__(self, val=0, left=None, right=None): class Solution (line 8) | class Solution: method goodNodes (line 9) | def goodNodes(self, root: TreeNode) -> int: FILE: Python/1451-rearrange-words-in-a-sentence.py class Solution (line 3) | class Solution: method arrangeWords (line 4) | def arrangeWords(self, text: str) -> str: FILE: Python/1452-people-whose-list-of-favorite-companies-is-not-a-subset-of-another-list.py class Solution (line 6) | class Solution: method peopleIndexes (line 7) | def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]: FILE: Python/1455-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence.py class Solution (line 3) | class Solution: method isPrefixOfWord (line 4) | def isPrefixOfWord(self, sentence: str, searchWord: str) -> int: FILE: Python/1456-maximum-number-of-vowels-in-a-substring-of-given-length.py class Solution (line 3) | class Solution: method maxVowels (line 4) | def maxVowels(self, s: str, k: int) -> int: FILE: Python/1457-pseudo-palindromic-paths-in-a-binary-tree.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method pseudoPalindromicPaths (line 15) | def pseudoPalindromicPaths(self, root: Optional[TreeNode]) -> int: FILE: Python/1458-max-dot-product-of-two-subsequences.py class Solution (line 5) | class Solution: method maxDotProduct (line 6) | def maxDotProduct(self, nums1: List[int], nums2: List[int]) -> int: FILE: Python/1460-make-two-arrays-equal-by-reversing-subarrays.py class Solution (line 6) | class Solution: method canBeEqual (line 7) | def canBeEqual(self, target: List[int], arr: List[int]) -> bool: FILE: Python/1461-check-if-a-string-contains-all-binary-codes-of-size-k.py class Solution (line 3) | class Solution: method hasAllCodes (line 4) | def hasAllCodes(self, s: str, k: int) -> bool: FILE: Python/1462-course-schedule-iv.py class Solution (line 7) | class Solution: method checkIfPrerequisite (line 8) | def checkIfPrerequisite(self, numCourses: int, prerequisites: List[Lis... FILE: Python/1463-cherry-pickup-ii.py class Solution (line 8) | class Solution: method cherryPickup (line 9) | def cherryPickup(self, grid: List[List[int]]) -> int: FILE: Python/1464-maximum-product-of-two-elements-in-an-array.py class Solution (line 6) | class Solution: method maxProduct (line 7) | def maxProduct(self, nums: List[int]) -> int: FILE: Python/1465-maximum-area-of-a-piece-of-cake-after-horizontal-and-vertical-cuts.py class Solution (line 6) | class Solution: method maxArea (line 7) | def maxArea(self, h: int, w: int, horizontalCuts: List[int], verticalC... FILE: Python/1466-reorder-routes-to-make-all-paths-lead-to-the-city-zero.py class Solution (line 6) | class Solution: method dfs (line 7) | def dfs(self, graph: List[List[int]], visited: List[bool], fromNode: i... method minReorder (line 16) | def minReorder(self, n: int, connections: List[List[int]]): FILE: Python/1469-find-all-the-lonely-nodes.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method getLonelyNodes (line 14) | def getLonelyNodes(self, root: Optional[TreeNode]) -> List[int]: FILE: Python/1470-shuffle-the-array.py class Solution (line 6) | class Solution: method shuffle (line 7) | def shuffle(self, nums: List[int], n: int) -> List[int]: FILE: Python/1471-the-k-strongest-values-in-an-array.py class Solution (line 6) | class Solution: method getStrongest (line 7) | def getStrongest(self, arr: List[int], k: int) -> List[int]: FILE: Python/1472-design-browser-history.py class DLLNode (line 1) | class DLLNode: method __init__ (line 2) | def __init__(self, url: str): class BrowserHistory (line 6) | class BrowserHistory: method __init__ (line 7) | def __init__(self, homepage: str): method visit (line 11) | def visit(self, url: str) -> None: method back (line 17) | def back(self, steps: int) -> str: method forward (line 23) | def forward(self, steps: int) -> str: FILE: Python/1474-delete-n-nodes-after-m-nodes-of-a-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method deleteNodes (line 13) | def deleteNodes(self, head: Optional[ListNode], m: int, n: int) -> Opt... function traverse (line 30) | def traverse(node: Optional[ListNode]): FILE: Python/1475-final-prices-with-a-special-discount-in-a-shop.py class Solution (line 6) | class Solution: method finalPrices (line 7) | def finalPrices(self, prices: List[int]) -> List[int]: FILE: Python/1476-subrectangle-queries.py class SubrectangleQueries (line 6) | class SubrectangleQueries: method __init__ (line 8) | def __init__(self, rectangle: List[List[int]]): method updateSubrectangle (line 11) | def updateSubrectangle(self, row1: int, col1: int, row2: int, col2: in... method getValue (line 16) | def getValue(self, row: int, col: int) -> int: FILE: Python/1481-least-number-of-unique-integers-after-k-removals.py class Solution (line 7) | class Solution: method findLeastNumOfUniqueInts (line 8) | def findLeastNumOfUniqueInts(self, arr: List[int], k: int) -> int: FILE: Python/1482-minimum-number-of-days-to-make-m-bouquets.py class Solution (line 6) | class Solution: method minDays (line 7) | def minDays(self, bloomDay: List[int], m: int, k: int) -> int: FILE: Python/1488-avoid-flood-in-the-city.py class Solution (line 5) | class Solution: method avoidFlood (line 6) | def avoidFlood(self, rains: List[int]) -> List[int]: FILE: Python/1489-find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree.py class Solution (line 4) | class Solution: class UnionFind (line 6) | class UnionFind: method __init__ (line 7) | def __init__(self, n): method find (line 12) | def find(self, x): method union (line 17) | def union(self, x, y): method findCriticalAndPseudoCriticalEdges (line 29) | def findCriticalAndPseudoCriticalEdges(self, n, edges): FILE: Python/1492-the-kth-factor-of-n.py class Solution (line 3) | class Solution: method kthFactor (line 4) | def kthFactor(self, n: int, k: int) -> int: FILE: Python/1493-longest-subarray-of-1s-after-deleting-one-element.py class Solution (line 6) | class Solution: method longestSubarray (line 7) | def longestSubarray(self, nums: List[int]) -> int: FILE: Python/1496-path-crossing.py class Solution (line 3) | class Solution: method isPathCrossing (line 4) | def isPathCrossing(self, path: str) -> bool: FILE: Python/1497-check-if-array-pairs-are-divisible-by-k.py class Solution (line 6) | class Solution: method canArrange (line 7) | def canArrange(self, arr: List[int], k: int) -> bool: FILE: Python/1498-number-of-subsequences-that-satisfy-the-given-sum-condition.py class Solution (line 6) | class Solution: method numSubseq (line 7) | def numSubseq(self, nums: List[int], target: int) -> int: FILE: Python/1503-last-moment-before-all-ants-fall-out-of-a-plank.py class Solution (line 6) | class Solution: method getLastMoment (line 7) | def getLastMoment(self, n: int, left: List[int], right: List[int]) -> ... FILE: Python/1508-range-sum-of-sorted-subarray-sums.py class Solution (line 9) | class Solution: method rangeSum (line 10) | def rangeSum(self, nums: List[int], n: int, left: int, right: int) -> ... method rangeSum (line 56) | def rangeSum(self, nums: List[int], n: int, left: int, right: int) -> ... class Solution (line 55) | class Solution: method rangeSum (line 10) | def rangeSum(self, nums: List[int], n: int, left: int, right: int) -> ... method rangeSum (line 56) | def rangeSum(self, nums: List[int], n: int, left: int, right: int) -> ... FILE: Python/1509-minimum-difference-between-largest-and-smallest-value-in-three-moves.py class Solution (line 6) | class Solution: method minDifference (line 7) | def minDifference(self, nums: List[int]) -> int: FILE: Python/1512-number-of-good-pairs.py class Solution (line 5) | class Solution: method getSum (line 6) | def getSum(self, n: int) -> int: method numIdenticalPairs (line 12) | def numIdenticalPairs(self, nums: List[int]) -> int: FILE: Python/1513-number-of-substrings-with-only-1s.py class Solution (line 3) | class Solution: method numSub (line 4) | def numSub(self, s: str) -> int: FILE: Python/1514-path-with-maximum-probability.py class Solution (line 6) | class Solution: method maxProbability (line 7) | def maxProbability(self, n: int, edges: List[List[int]], succProb: Lis... FILE: Python/1518-water-bottles.py class Solution (line 3) | class Solution: method numWaterBottles (line 4) | def numWaterBottles(self, numBottles: int, numExchange: int) -> int: FILE: Python/1523-count-odd-numbers-in-an-interval-range.py class Solution (line 1) | class Solution: method countOdds (line 2) | def countOdds(self, low: int, high: int) -> int: FILE: Python/1524-number-of-sub-arrays-with-odd-sum.py class Solution (line 6) | class Solution: method numOfSubarrays (line 7) | def numOfSubarrays(self, arr: List[int]) -> int: FILE: Python/1525-number-of-good-ways-to-split-a-string.py class Solution (line 6) | class Solution: method numSplits (line 7) | def numSplits(self, s: str) -> int: FILE: Python/1526-minimum-number-of-increments-on-subarrays-to-form-a-target-array.py class Solution (line 6) | class Solution: method minNumberOperations (line 7) | def minNumberOperations(self, target: List[int]) -> int: FILE: Python/1529-minimum-suffix-flips.py class Solution (line 3) | class Solution: method minFlips (line 4) | def minFlips(self, target: str) -> int: FILE: Python/1530-number-of-good-leaf-nodes-pairs.py class TreeNode (line 3) | class TreeNode: method __init__ (line 4) | def __init__(self, val=0, left=None, right=None): class Solution (line 10) | class Solution: method traverseTree (line 11) | def traverseTree(self, currNode: TreeNode, prevNode: TreeNode, graph: ... method countPairs (line 28) | def countPairs(self, root: TreeNode, distance: int) -> int: FILE: Python/1531-string-compression-ii.py class Solution (line 4) | class Solution: method getLengthOfOptimalCompression (line 5) | def getLengthOfOptimalCompression(self, s: str, k: int) -> int: FILE: Python/1534-count-good-triplets.py class Solution (line 6) | class Solution: method countGoodTriplets (line 7) | def countGoodTriplets(self, arr: List[int], a: int, b: int, c: int) ->... FILE: Python/1535-find-the-winner-of-an-array-game.py class Solution (line 7) | class Solution: method getWinner (line 8) | def getWinner(self, arr: List[int], k: int) -> int: FILE: Python/1539-kth-missing-positive-number.py class Solution (line 6) | class Solution: method findKthPositive (line 7) | def findKthPositive(self, nums: List[int], k: int) -> int: FILE: Python/1544-make-the-string-great.py class Solution (line 3) | class Solution: method makeGood (line 4) | def makeGood(self, s: str) -> str: FILE: Python/1545-find-kth-bit-in-nth-binary-string.py class Solution (line 1) | class Solution: method findKthBit (line 2) | def findKthBit(self, n: int, k: int) -> str: FILE: Python/1550-three-consecutive-odds.py class Solution (line 6) | class Solution: method threeConsecutiveOdds (line 7) | def threeConsecutiveOdds(self, arr: List[int]) -> bool: FILE: Python/1551-minimum-operations-to-make-array-equal.py class Solution (line 3) | class Solution: method minOperations (line 4) | def minOperations(self, n: int) -> int: FILE: Python/1552-magnetic-force-between-two-balls.py class Solution (line 6) | class Solution: method maxDistance (line 7) | def maxDistance(self, position: List[int], m: int) -> int: FILE: Python/1557-minimum-number-of-vertices-to-reach-all-nodes.py class Solution (line 6) | class Solution: method findSmallestSetOfVertices (line 7) | def findSmallestSetOfVertices(self, n: int, edges: List[List[int]]) ->... FILE: Python/1561-maximum-number-of-coins-you-can-get.py class Solution (line 6) | class Solution: method maxCoins (line 7) | def maxCoins(self, piles: List[int]) -> int: FILE: Python/1568-minimum-number-of-days-to-disconnect-island.py class Solution (line 6) | class Solution: method minDays (line 7) | def minDays(self, grid: List[List[int]]) -> int: FILE: Python/1570-dot-product-of-two-sparse-vectors.py class SparseVector (line 6) | class SparseVector: method __init__ (line 7) | def __init__(self, nums: List[int]): method dotProduct (line 10) | def dotProduct(self, vec: 'SparseVector') -> int: FILE: Python/1574-shortest-subarray-to-be-removed-to-make-array-sorted.py class Solution (line 6) | class Solution: method findLengthOfShortestSubarray (line 7) | def findLengthOfShortestSubarray(self, arr: List[int]) -> int: FILE: Python/1578-minimum-time-to-make-rope-colorful.py class Solution (line 6) | class Solution: method minCost (line 7) | def minCost(self, colors: str, neededTime: List[int]) -> int: FILE: Python/1579-remove-max-number-of-edges-to-keep-graph-fully-traversable.py class UnionFind (line 6) | class UnionFind: method __init__ (line 7) | def __init__(self, n): method find (line 12) | def find(self, p): method union (line 18) | def union(self, p, q): class Solution (line 31) | class Solution: method maxNumEdgesToRemove (line 32) | def maxNumEdgesToRemove(self, n: int, edges: List[List[int]]) -> int: FILE: Python/1580-put-boxes-into-the-warehouse-ii.py class Solution (line 6) | class Solution: method maxBoxesInWarehouse (line 7) | def maxBoxesInWarehouse(self, boxes: List[int], warehouse: List[int]) ... FILE: Python/1582-special-positions-in-a-binary-matrix.py class Solution (line 6) | class Solution: method numSpecial (line 7) | def numSpecial(self, mat: List[List[int]]) -> int: FILE: Python/1584-min-cost-to-connect-all-points.py class UnionFind (line 7) | class UnionFind: method __init__ (line 8) | def __init__(self, size: int) -> None: method find (line 12) | def find(self, node: int) -> int: method join (line 17) | def join(self, node1: int, node2: int) -> bool: class Solution (line 33) | class Solution: method minCostConnectPoints (line 35) | def minCostConnectPoints(self, points: List[List[int]]) -> int: method minCostConnectPoints (line 60) | def minCostConnectPoints(self, points: List[List[int]]) -> int: class Solution (line 59) | class Solution: method minCostConnectPoints (line 35) | def minCostConnectPoints(self, points: List[List[int]]) -> int: method minCostConnectPoints (line 60) | def minCostConnectPoints(self, points: List[List[int]]) -> int: FILE: Python/1590-make-sum-divisible-by-p.py class Solution (line 6) | class Solution: method minSubarray (line 7) | def minSubarray(self, nums: List[int], p: int) -> int: FILE: Python/1593-split-a-string-into-the-max-number-of-unique-substrings.py class Solution (line 3) | class Solution: method backtrack (line 4) | def backtrack(self, s: str, start: int, seen: set) -> int: method maxUniqueSplit (line 18) | def maxUniqueSplit(self, s: str) -> int: FILE: Python/1598-crawler-log-folder.py class Solution (line 6) | class Solution: method minOperations (line 7) | def minOperations(self, logs: List[str]) -> int: FILE: Python/1605-find-valid-matrix-given-row-and-column-sums.py class Solution (line 6) | class Solution: method restoreMatrix (line 7) | def restoreMatrix(self, rowSum: List[int], colSum: List[int]) -> List[... method findSumMatrix (line 21) | def findSumMatrix(self, matrix: List[List[int]]) -> List[int]: FILE: Python/1608-special-array-with-x-elements-greater-than-or-equal-x.py class Solution (line 6) | class Solution: method specialArray (line 7) | def specialArray(self, nums: List[int]) -> int: FILE: Python/1609-even-odd-tree.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method isEvenOddTree (line 15) | def isEvenOddTree(self, root: Optional[TreeNode]) -> bool: FILE: Python/1611-minimum-one-bit-operations-to-make-integers-zero.py class Solution (line 3) | class Solution: method minimumOneBitOperations (line 4) | def minimumOneBitOperations(self, n: int) -> int: FILE: Python/1614-maximum-nesting-depth-of-the-parentheses.py class Solution (line 3) | class Solution: method maxDepth (line 4) | def maxDepth(self, s: str) -> int: FILE: Python/1615-maximal-network-rank.py class Solution (line 5) | class Solution: method maximalNetworkRank (line 6) | def maximalNetworkRank(self, n: int, roads: List[List[int]]) -> int: FILE: Python/1624-largest-substring-between-two-equal-characters.py class Solution (line 3) | class Solution: method maxLengthBetweenEqualCharacters (line 4) | def maxLengthBetweenEqualCharacters(self, s: str) -> int: FILE: Python/1625-lexicographically-smallest-string-after-applying-operations.py class Solution (line 3) | class Solution: method findLexSmallestString (line 4) | def findLexSmallestString(self, s: str, a: int, b: int) -> str: FILE: Python/1630-arithmetic-subarrays.py class Solution (line 6) | class Solution: method checkArithmeticSubarrays (line 7) | def checkArithmeticSubarrays(self, nums: List[int], l: List[int], r: L... FILE: Python/1631-path-with-minimum-effort.py class Solution (line 4) | class Solution: method minimumEffortPath (line 5) | def minimumEffortPath(self, heights: List[List[int]]) -> int: FILE: Python/1634-add-two-polynomials-represented-as-linked-lists.py class PolyNode (line 3) | class PolyNode: method __init__ (line 4) | def __init__(self, x=0, y=0, next=None): class Solution (line 10) | class Solution: method addPoly (line 11) | def addPoly(self, poly1, poly2): FILE: Python/1636-sort-array-by-increasing-frequency.py class Solution (line 6) | class Solution: method frequencySort (line 7) | def frequencySort(self, nums: List[int]) -> List[int]: FILE: Python/1637-widest-vertical-area-between-two-points-containing-no-points.py class Solution (line 6) | class Solution: method maxWidthOfVerticalArea (line 7) | def maxWidthOfVerticalArea(self, points: List[List[int]]) -> int: FILE: Python/1639-number-of-ways-to-form-a-target-string-given-a-dictionary.py class Solution (line 6) | class Solution: method numWays (line 7) | def numWays(self, words: List[str], target: str) -> int: FILE: Python/1641-count-sorted-vowel-strings.py class Solution (line 2) | class Solution: method countVowelStrings (line 3) | def countVowelStrings(self, n: int) -> int: method countVowelStrings (line 22) | def countVowelStrings(self, n: int) -> int: class Solution (line 21) | class Solution: method countVowelStrings (line 3) | def countVowelStrings(self, n: int) -> int: method countVowelStrings (line 22) | def countVowelStrings(self, n: int) -> int: FILE: Python/1642-furthest-building-you-can-reach.py class Solution (line 7) | class Solution: method furthestBuilding (line 8) | def furthestBuilding(self, h: List[int], b: int, l: int) -> int: FILE: Python/1644-lowest-common-ancestor-of-a-binary-tree-ii.py class TreeNode (line 1) | class TreeNode: method __init__ (line 2) | def __init__(self, x): class Solution (line 8) | class Solution: method LCA (line 9) | def LCA(self, node: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'Tree... method DFS (line 25) | def DFS(self, node: 'TreeNode', target: int) -> bool: method lowestCommonAncestor (line 32) | def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'Tr... FILE: Python/1647-minimum-deletions-to-make-character-frequencies-unique.py class Solution (line 6) | class Solution: method minDeletions (line 7) | def minDeletions(self, s: str) -> int: FILE: Python/1650-lowest-common-ancestor-of-a-binary-tree-iii.py class Node (line 3) | class Node: method __init__ (line 4) | def __init__(self, val): class Solution (line 11) | class Solution: method lowestCommonAncestor (line 12) | def lowestCommonAncestor(self, p: 'Node', q: 'Node') -> 'Node': FILE: Python/1652-defuse-the-bomb.py class Solution (line 6) | class Solution: method decrypt (line 7) | def decrypt(self, code: List[int], k: int) -> List[int]: FILE: Python/1653-minimum-deletions-to-make-string-balanced.py class Solution (line 3) | class Solution: method minimumDeletions (line 4) | def minimumDeletions(self, s: str) -> int: FILE: Python/1657-determine-if-two-strings-are-close.py class Solution (line 6) | class Solution: method closeStrings (line 7) | def closeStrings(self, word1: str, word2: str) -> bool: FILE: Python/1658-minimum-operations-to-reduce-x-to-zero.py class Solution (line 4) | class Solution: method minOperations (line 5) | def minOperations(self, nums: List[int], x: int) -> int: FILE: Python/1660-correct-a-binary-tree.py class TreeNode (line 4) | class TreeNode: method __init__ (line 5) | def __init__(self, val=0, left=None, right=None): class Solution (line 11) | class Solution: method correctBinaryTree (line 12) | def correctBinaryTree(self, root: TreeNode) -> TreeNode: FILE: Python/1662-check-if-two-string-arrays-are-equivalent.py class Solution (line 6) | class Solution: method arrayStringsAreEqual (line 7) | def arrayStringsAreEqual(self, word1: List[str], word2: List[str]) -> ... FILE: Python/1663-smallest-string-with-a-given-numeric-value.py class Solution (line 3) | class Solution: method getSmallestString (line 4) | def getSmallestString(self, n: int, k: int) -> str: FILE: Python/1669-merge-in-between-linked-lists.py class ListNode (line 3) | class ListNode: method __init__ (line 4) | def __init__(self, val=0, next=None): class Solution (line 9) | class Solution: method mergeInBetween (line 10) | def mergeInBetween(self, list1: ListNode, a: int, b: int, list2: ListN... FILE: Python/1671-minimum-number-of-removals-to-make-mountain-array.py class Solution (line 6) | class Solution: method getLongestIncreasingSubsequenceLength (line 7) | def getLongestIncreasingSubsequenceLength(self, v: List[int]) -> List[... method lowerBound (line 23) | def lowerBound(self, lis: List[int], target: int) -> int: method minimumMountainRemovals (line 33) | def minimumMountainRemovals(self, nums: List[int]) -> int: FILE: Python/1679-max-number-of-k-sum-pairs.py class Solution (line 6) | class Solution: method maxOperations (line 7) | def maxOperations(self, nums: List[int], k: int) -> int: FILE: Python/1684-count-the-number-of-consistent-strings.py class Solution (line 6) | class Solution: method countConsistentStrings (line 7) | def countConsistentStrings(self, allowed: str, words: List[str]) -> int: FILE: Python/1685-sum-of-absolute-differences-in-a-sorted-array.py class Solution (line 6) | class Solution: method getSumAbsoluteDifferences (line 7) | def getSumAbsoluteDifferences(self, nums: List[int]) -> List[int]: FILE: Python/1688-count-of-matches-in-tournament.py class Solution (line 3) | class Solution: method numberOfMatches (line 4) | def numberOfMatches(self, n: int) -> int: FILE: Python/1689-partitioning-into-minimum-number-of-deci-binary-numbers.py class Solution (line 6) | class Solution: method minPartitions (line 7) | def minPartitions(self, n: str) -> int: FILE: Python/1695-maximum-erasure-value.py class Solution (line 6) | class Solution: method maximumUniqueSubarray (line 7) | def maximumUniqueSubarray(self, nums: List[int]) -> int: FILE: Python/1700-number-of-students-unable-to-eat-lunch.py class Solution (line 6) | class Solution: method countStudents (line 7) | def countStudents(self, students: List[int], sandwiches: List[int]) ->... FILE: Python/1701-average-waiting-time.py class Solution (line 6) | class Solution: method averageWaitingTime (line 7) | def averageWaitingTime(self, customers: List[List[int]]) -> float: FILE: Python/1704-determine-if-string-halves-are-alike.py class Solution (line 3) | class Solution: method halvesAreAlike (line 4) | def halvesAreAlike(self, s: str) -> bool: FILE: Python/1706-where-will-the-ball-fall.py class Solution (line 6) | class Solution: method findBall (line 7) | def findBall(self, grid: List[List[int]]) -> List[int]: FILE: Python/1716-calculate-money-in-leetcode-bank.py class Solution (line 3) | class Solution: method totalMoney (line 4) | def totalMoney(self, n: int) -> int: FILE: Python/1717-maximum-score-from-removing-substrings.py class Solution (line 3) | class Solution: method maximumGain (line 4) | def maximumGain(self, s: str, x: int, y: int) -> int: FILE: Python/1718-construct-the-lexicographically-largest-valid-sequence.py class Solution (line 6) | class Solution: method constructDistancedSequence (line 7) | def constructDistancedSequence(self, target: int) -> List[int]: method findLexicographicallyLargestSequence (line 17) | def findLexicographicallyLargestSequence(self, currIdx, resultSequence... FILE: Python/1721-swapping-nodes-in-a-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method traverse (line 13) | def traverse(self, head: Optional[ListNode]): method swapNodes (line 18) | def swapNodes(self, head: Optional[ListNode], k: int) -> Optional[List... FILE: Python/1726-tuple-with-same-product.py class Solution (line 7) | class Solution: method tupleSameProduct (line 8) | def tupleSameProduct(self, nums: List[int]) -> int: FILE: Python/1727-largest-submatrix-with-rearrangements.py class Solution (line 6) | class Solution: method largestSubmatrix (line 7) | def largestSubmatrix(self, matrix: List[List[int]]) -> int: FILE: Python/1730-shortest-path-to-get-food.py class Solution (line 7) | class Solution: method getFood (line 8) | def getFood(self, grid: List[List[str]]) -> int: FILE: Python/1732-find-the-highest-altitude.py class Solution (line 6) | class Solution: method largestAltitude (line 7) | def largestAltitude(self, gain: List[int]) -> int: FILE: Python/1733-minimum-number-of-people-to-teach.py class Solution (line 7) | class Solution: method minimumTeachings (line 8) | def minimumTeachings(self, n: int, languages: List[List[int]], friends... FILE: Python/1740-find-distance-in-a-binary-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method findDistance (line 14) | def findDistance(self, root: Optional[TreeNode], p: int, q: int) -> int: FILE: Python/1743-restore-the-array-from-adjacent-pairs.py class Solution (line 7) | class Solution: method restoreArray (line 8) | def restoreArray(self, adjacentPairs: List[List[int]]) -> List[int]: FILE: Python/1746-maximum-subarray-sum-after-one-operation.py class Solution (line 6) | class Solution: method maxSumAfterOperation (line 7) | def maxSumAfterOperation(self, nums: List[int]) -> int: FILE: Python/1749-maximum-absolute-sum-of-any-subarray.py class Solution (line 6) | class Solution: method maxAbsoluteSum (line 7) | def maxAbsoluteSum(self, nums: List[int]) -> int: FILE: Python/1750-minimum-length-of-string-after-deleting-similar-ends.py class Solution (line 3) | class Solution: method minimumLength (line 4) | def minimumLength(self, s: str) -> int: FILE: Python/1752-check-if-array-is-sorted-and-rotated.py class Solution (line 6) | class Solution: method check (line 7) | def check(self, nums: List[int]) -> bool: FILE: Python/1753-maximum-score-from-removing-stones.py class Solution (line 6) | class Solution: method maximumScore (line 7) | def maximumScore(self, a: int, b: int, c: int) -> int: FILE: Python/1756-design-most-recently-used-queue.py class MRUQueue (line 6) | class MRUQueue: method __init__ (line 8) | def __init__(self, n: int): method fetch (line 12) | def fetch(self, k: int) -> int: FILE: Python/1758-minimum-changes-to-make-alternating-binary-string.py class Solution (line 3) | class Solution: method minOperations (line 4) | def minOperations(self, s: str) -> int: FILE: Python/1759-count-number-of-homogenous-substrings.py class Solution (line 3) | class Solution: method countHomogenous (line 4) | def countHomogenous(self, s: str) -> int: FILE: Python/1760-minimum-limit-of-balls-in-a-bag.py class Solution (line 7) | class Solution: method minimumSize (line 8) | def minimumSize(self, nums: List[int], maxOperations: int) -> int: method isPossible (line 19) | def isPossible(self, maxBallsInBag: int, nums: List[int], maxOperation... FILE: Python/1762-buildings-with-an-ocean-view.py class Solution (line 7) | class Solution: method findBuildings (line 8) | def findBuildings(self, heights: List[int]) -> List[int]: FILE: Python/1765-map-of-highest-peak.py class Solution (line 7) | class Solution: method highestPeak (line 8) | def highestPeak(self, isWater: List[List[int]]) -> List[List[int]]: FILE: Python/1768-merge-strings-alternately.py class Solution (line 3) | class Solution: method mergeAlternately (line 4) | def mergeAlternately(self, word1: str, word2: str) -> str: FILE: Python/1769-minimum-number-of-operations-to-move-all-balls-to-each-box.py class Solution (line 6) | class Solution: method minOperations (line 7) | def minOperations(self, boxes: str) -> List[int]: method minOperations (line 21) | def minOperations(self, boxes: str) -> List[int]: class Solution (line 20) | class Solution: method minOperations (line 7) | def minOperations(self, boxes: str) -> List[int]: method minOperations (line 21) | def minOperations(self, boxes: str) -> List[int]: FILE: Python/1770-maximum-score-from-performing-multiplication-operations.py class Solution (line 6) | class Solution: method maximumScore (line 7) | def maximumScore(self, nums: List[int], multipliers: List[int]) -> int: FILE: Python/1780-check-if-number-is-a-sum-of-powers-of-three.py class Solution (line 3) | class Solution: method checkPowersOfThree (line 4) | def checkPowersOfThree(self, n: int) -> bool: FILE: Python/1785-minimum-elements-to-add-to-form-a-given-sum.py class Solution (line 7) | class Solution: method minElements (line 8) | def minElements(self, nums: List[int], limit: int, goal: int) -> int: FILE: Python/1790-check-if-one-string-swap-can-make-strings-equal.py class Solution (line 6) | class Solution: method areAlmostEqual (line 7) | def areAlmostEqual(self, s1: str, s2: str) -> bool: FILE: Python/1791-find-center-of-star-graph.py class Solution (line 6) | class Solution: method findCenter (line 7) | def findCenter(self, edges: List[List[int]]) -> int: FILE: Python/1792-maximum-average-pass-ratio.py class Solution (line 7) | class Solution: method maxAverageRatio (line 8) | def maxAverageRatio(self, classes: List[List[int]], extraStudents: int... FILE: Python/1793-maximum-score-of-a-good-subarray.py class Solution (line 6) | class Solution: method maximumScore (line 7) | def maximumScore(self, nums: List[int], k: int) -> int: FILE: Python/1797-design-authentication-manager.py class AuthenticationManager (line 6) | class AuthenticationManager(object): method __init__ (line 8) | def __init__(self, timeToLive: int): method generate (line 12) | def generate(self, tokenId: str, currentTime: int) -> None: method renew (line 15) | def renew(self, tokenId: str, currentTime: int) -> None: method countUnexpiredTokens (line 20) | def countUnexpiredTokens(self, currentTime: int) -> int: FILE: Python/1800-maximum-ascending-subarray-sum.py class Solution (line 6) | class Solution: method maxAscendingSum (line 7) | def maxAscendingSum(self, nums: List[int]) -> int: FILE: Python/1802-maximum-value-at-a-given-index-in-a-bounded-array.py class Solution (line 3) | class Solution: method getSum (line 4) | def getSum(self, index: int, mid: int, n: int) -> int: method maxValue (line 17) | def maxValue(self, n: int, index: int, maxSum: int) -> int: FILE: Python/1804-implement-trie-ii-prefix-tree.py class TrieNode (line 1) | class TrieNode: method __init__ (line 2) | def __init__(self): class Trie (line 8) | class Trie: method __init__ (line 9) | def __init__(self): method insert (line 12) | def insert(self, word: str) -> None: method countWordsEqualTo (line 22) | def countWordsEqualTo(self, word: str) -> int: method countWordsStartingWith (line 31) | def countWordsStartingWith(self, prefix: str) -> int: method erase (line 40) | def erase(self, word: str) -> None: FILE: Python/1806-minimum-number-of-operations-to-reinitialize-a-permutation.py class Solution (line 3) | class Solution: method reinitializePermutation (line 4) | def reinitializePermutation(self, n: int) -> int: FILE: Python/1807-evaluate-the-bracket-pairs-of-a-string.py class Solution (line 7) | class Solution: method evaluate (line 8) | def evaluate(self, s: str, knowledge: List[List[str]]) -> str: FILE: Python/1813-sentence-similarity-iii.py class Solution (line 6) | class Solution: method areSentencesSimilar (line 7) | def areSentencesSimilar(self, sentence1: str, sentence2: str) -> bool: FILE: Python/1814-count-nice-pairs-in-an-array.py class Solution (line 7) | class Solution: method countNicePairs (line 8) | def countNicePairs(self, nums: List[int]) -> int: FILE: Python/1817-finding-the-users-active-minutes.py class Solution (line 7) | class Solution: method findingUsersActiveMinutes (line 8) | def findingUsersActiveMinutes(self, logs: List[List[int]], k: int) -> ... FILE: Python/1823-find-the-winner-of-the-circular-game.py class Solution (line 3) | class Solution: method solve (line 4) | def solve(self, n: int, k: int) -> int: method findTheWinner (line 9) | def findTheWinner(self, n: int, k: int) -> int: FILE: Python/1828-queries-on-number-of-points-inside-a-circle.py class Solution (line 6) | class Solution: method countPoints (line 7) | def countPoints(self, points: List[List[int]], queries: List[List[int]... FILE: Python/1829-maximum-xor-for-each-query.py class Solution (line 6) | class Solution: method getMaximumXor (line 7) | def getMaximumXor(self, nums: List[int], maximumBit: int) -> List[int]: FILE: Python/1833-maximum-ice-cream-bars.py class Solution (line 7) | class Solution: method maxIceCream (line 8) | def maxIceCream(self, costs: List[int], coins: int) -> int: FILE: Python/1834-single-threaded-cpu.py class Solution (line 7) | class Solution: method getOrder (line 8) | def getOrder(self, tasks: List[List[int]]) -> List[int]: FILE: Python/1836-remove-duplicates-from-an-unsorted-linked-list.py class ListNode (line 3) | class ListNode: method __init__ (line 4) | def __init__(self, val=0, next=None): class Solution (line 9) | class Solution: method deleteDuplicatesUnsorted (line 10) | def deleteDuplicatesUnsorted(self, head: ListNode) -> ListNode: FILE: Python/1838-frequency-of-the-most-frequent-element.py class Solution (line 6) | class Solution: method maxFrequency (line 7) | def maxFrequency(self, nums: List[int], k: int) -> int: FILE: Python/1842-next-palindrome-using-same-digits.py class Solution (line 3) | class Solution: method nextPalindrome (line 4) | def nextPalindrome(self, num: str) -> str: FILE: Python/1845-seat-reservation-manager.py class SeatManager (line 7) | class SeatManager: method __init__ (line 9) | def __init__(self, n: int): method reserve (line 12) | def reserve(self) -> int: method unreserve (line 16) | def unreserve(self, seatNumber: int) -> None: FILE: Python/1846-maximum-element-after-decreasing-and-rearranging.py class Solution (line 6) | class Solution: method maximumElementAfterDecrementingAndRearranging (line 7) | def maximumElementAfterDecrementingAndRearranging(self, arr: List[int]... FILE: Python/1851-minimum-interval-to-include-each-query.py class Solution (line 7) | class Solution: method minInterval (line 8) | def minInterval(self, intervals: List[List[int]], queries: List[int]) ... FILE: Python/1852-distinct-numbers-in-each-subarray.py class Solution (line 7) | class Solution: method distinctNumbers (line 8) | def distinctNumbers(self, nums: List[int], k: int) -> List[int]: FILE: Python/1855-maximum-distance-between-a-pair-of-values.py class Solution (line 7) | class Solution: method maxDistance (line 8) | def maxDistance(self, nums1: List[int], nums2: List[int]) -> int: FILE: Python/1857-largest-color-value-in-a-directed-graph.py class Solution (line 7) | class Solution: method largestPathValue (line 8) | def largestPathValue(self, colors: str, edges: List[List[int]]) -> int: FILE: Python/1858-longest-word-with-all-prefixes.py class Trie (line 6) | class Trie: class TrieNode (line 7) | class TrieNode: method __init__ (line 8) | def __init__(self): method __init__ (line 12) | def __init__(self): method insert (line 15) | def insert(self, word): method hasAllPrefixes (line 23) | def hasAllPrefixes(self, word): class Solution (line 32) | class Solution: method longestWord (line 33) | def longestWord(self, words: List[str]) -> str: FILE: Python/1860-incremental-memory-leak.py class Solution (line 6) | class Solution: method memLeak (line 7) | def memLeak(self, memory1: int, memory2: int) -> List[int]: FILE: Python/1861-rotating-the-box.py class Solution (line 6) | class Solution: method rotateTheBox (line 7) | def rotateTheBox(self, box: List[List[str]]) -> List[List[str]]: FILE: Python/1863-sum-of-all-subset-xor-totals.py class Solution (line 4) | class Solution: method subsetXORSum (line 5) | def subsetXORSum(self, nums: List[int]) -> int: FILE: Python/1865-finding-pairs-with-a-certain-sum.py class FindSumPairs (line 6) | class FindSumPairs: method __init__ (line 8) | def __init__(self, nums1: List[int], nums2: List[int]): method add (line 13) | def add(self, index: int, val: int) -> None: method count (line 19) | def count(self, total: int) -> int: FILE: Python/1870-minimum-speed-to-arrive-on-time.py class Solution (line 5) | class Solution: method timeRequired (line 7) | def timeRequired(self, dist: List[int], speed: int) -> float: method minSpeedOnTime (line 14) | def minSpeedOnTime(self, dist: List[int], hour: float) -> int: FILE: Python/1874-minimize-product-sum-of-two-arrays.py class Solution (line 6) | class Solution: method minProductSum (line 7) | def minProductSum(self, nums1: List[int], nums2: List[int]) -> int: FILE: Python/1877-minimize-maximum-pair-sum-in-array.py class Solution (line 6) | class Solution: method minPairSum (line 7) | def minPairSum(self, nums: List[int]) -> int: FILE: Python/1881-maximum-value-after-insertion.py class Solution (line 3) | class Solution: method maxValue (line 4) | def maxValue(self, n: str, x: int) -> str: FILE: Python/1885-count-pairs-in-two-arrays.py class Solution (line 6) | class Solution: method countPairs (line 7) | def countPairs(self, nums1: List[int], nums2: List[int]) -> int: FILE: Python/1887-reduction-operations-to-make-the-array-elements-equal.py class Solution (line 6) | class Solution: method reductionOperations (line 7) | def reductionOperations(self, nums: List[int]) -> int: FILE: Python/1888-minimum-number-of-flips-to-make-the-binary-string-alternating.py class Solution (line 3) | class Solution: method minFlips (line 4) | def minFlips(self, s: str) -> int: FILE: Python/1891-cutting-ribbons.py class Solution (line 6) | class Solution: method maxLength (line 7) | def maxLength(self, ribbons: List[int], k: int) -> int: FILE: Python/1894-find-the-student-that-will-replace-the-chalk.py class Solution (line 6) | class Solution: method chalkReplacer (line 7) | def chalkReplacer(self, chalk: List[int], k: int) -> int: FILE: Python/1895-largest-magic-square.py class Solution (line 6) | class Solution: method largestMagicSquare (line 7) | def largestMagicSquare(self, grid: List[List[int]]) -> int: FILE: Python/1897-redistribute-characters-to-make-all-strings-equal.py class Solution (line 7) | class Solution: method makeEqual (line 8) | def makeEqual(self, words: List[str]) -> bool: FILE: Python/1898-maximum-number-of-removable-characters.py class Solution (line 6) | class Solution: method maximumRemovals (line 7) | def maximumRemovals(self, s: str, p: str, removable: List[int]) -> int: FILE: Python/1899-merge-triplets-to-form-target-triplet.py class Solution (line 6) | class Solution: method mergeTriplets (line 7) | def mergeTriplets(self, triplets: List[List[int]], target: List[int]) ... FILE: Python/1900-the-earliest-and-latest-rounds-where-players-compete.py class Solution (line 7) | class Solution: method earliestAndLatest (line 8) | def earliestAndLatest(self, n: int, firstPlayer: int, secondPlayer: in... FILE: Python/1903-largest-odd-number-in-string.py class Solution (line 3) | class Solution: method largestOddNumber (line 4) | def largestOddNumber(self, num: str) -> str: FILE: Python/1904-the-number-of-full-rounds-you-have-played.py class Solution (line 4) | class Solution: method numberOfRounds (line 5) | def numberOfRounds(self, loginTime: str, logoutTime: str) -> int: FILE: Python/1905-count-sub-islands.py class Solution (line 7) | class Solution: method isCellLand (line 10) | def isCellLand(self, x, y, grid): method isSubIsland (line 13) | def isSubIsland(self, x, y, grid1, grid2, visited): method countSubIslands (line 42) | def countSubIslands( FILE: Python/1910-remove-all-occurrences-of-a-substring.py class Solution (line 3) | class Solution: method removeOccurrences (line 4) | def removeOccurrences(self, s: str, part: str) -> str: FILE: Python/1912-design-movie-rental-system.py class MovieRentingSystem (line 6) | class MovieRentingSystem: method __init__ (line 8) | def __init__(self, n: int, entries: List[List[int]]): method search (line 22) | def search(self, movie: int) -> List[int]: method rent (line 31) | def rent(self, shop: int, movie: int) -> None: method drop (line 34) | def drop(self, shop: int, movie: int) -> None: method report (line 37) | def report(self) -> List[List[int]]: FILE: Python/1913-maximum-product-difference-between-two-pairs.py class Solution (line 1) | class Solution: method maxProductDifference (line 2) | def maxProductDifference(self, nums: List[int]) -> int: FILE: Python/1915-number-of-wonderful-substrings.py class Solution (line 3) | class Solution(object): method wonderfulSubstrings (line 4) | def wonderfulSubstrings(self, word): FILE: Python/1920-build-array-from-permutation.py class Solution (line 6) | class Solution: method buildArray (line 7) | def buildArray(self, nums: List[int]) -> List[int]: FILE: Python/1921-eliminate-maximum-number-of-monsters.py class Solution (line 4) | class Solution: method eliminateMaximum (line 5) | def eliminateMaximum(self, dist: List[int], speed: List[int]) -> int: FILE: Python/1922-count-good-numbers.py class Solution (line 3) | class Solution: method countGoodNumbers (line 4) | def countGoodNumbers(self, n: int) -> int: FILE: Python/1925-count-square-sum-triples.py class Solution (line 6) | class Solution: method countTriples (line 7) | def countTriples(self, n: int) -> int: FILE: Python/1926-nearest-exit-from-entrance-in-maze.py class Solution (line 7) | class Solution: method nearestExit (line 8) | def nearestExit(self, maze: List[List[str]], entrance: List[int]) -> int: FILE: Python/1929-concatenation-of-array.py class Solution (line 6) | class Solution: method getConcatenation (line 7) | def getConcatenation(self, nums: List[int]) -> List[int]: FILE: Python/1930-unique-length-3-palindromic-subsequences.py class Solution (line 4) | class Solution: method countPalindromicSubsequence (line 5) | def countPalindromicSubsequence(self, s: str) -> int: FILE: Python/1931-painting-a-grid-with-three-different-colors.py class Solution (line 6) | class Solution: method colorTheGrid (line 7) | def colorTheGrid(self, m: int, n: int) -> int: FILE: Python/1935-maximum-number-of-words-you-can-type.py class Solution (line 3) | class Solution: method canBeTypedWords (line 4) | def canBeTypedWords(self, text: str, brokenLetters: str) -> int: FILE: Python/1936-add-minimum-number-of-rungs.py class Solution (line 6) | class Solution: method addRungs (line 7) | def addRungs(self, rungs: List[int], dist: int) -> int: FILE: Python/1937-maximum-number-of-points-with-cost.py class Solution (line 6) | class Solution: method maxPoints (line 7) | def maxPoints(self, points: List[List[int]]) -> int: FILE: Python/1940-longest-common-subsequence-between-sorted-arrays.py class Solution (line 7) | class Solution: method longestCommonSubsequence (line 8) | def longestCommonSubsequence(self, arrays: List[List[int]]) -> List[int]: FILE: Python/1942-the-number-of-the-smallest-unoccupied-chair.py class Solution (line 7) | class Solution: method smallestChair (line 8) | def smallestChair(self, times: List[List[int]], targetFriend: int) -> ... FILE: Python/1945-sum-of-digits-of-string-after-convert.py class Solution (line 3) | class Solution: method getLucky (line 4) | def getLucky(self, s: str, k: int) -> int: FILE: Python/1946-largest-number-after-mutating-substring.py class Solution (line 6) | class Solution: method maximumNumber (line 7) | def maximumNumber(self, num: str, change: List[int]) -> str: FILE: Python/1948-delete-duplicate-folders-in-system.py class Trie (line 6) | class Trie: method __init__ (line 10) | def __init__(self): class Solution (line 14) | class Solution: method deleteDuplicateFolder (line 15) | def deleteDuplicateFolder(self, paths: List[List[str]]) -> List[List[s... FILE: Python/1957-delete-characters-to-make-fancy-string.py class Solution (line 3) | class Solution: method makeFancyString (line 4) | def makeFancyString(self, s: str) -> str: FILE: Python/1962-remove-stones-to-minimize-the-total.py class Solution (line 7) | class Solution: method minStoneSum (line 8) | def minStoneSum(self, piles: List[int], k: int) -> int: FILE: Python/1963-minimum-number-of-swaps-to-make-the-string-balanced.py class Solution (line 3) | class Solution: method minSwaps (line 4) | def minSwaps(self, s: str) -> int: FILE: Python/1968-array-with-elements-not-equal-to-average-of-neighbors.py class Solution (line 6) | class Solution: method rearrangeArray (line 7) | def rearrangeArray(self, nums: List[int]) -> List[int]: FILE: Python/1970-last-day-where-you-can-still-cross.py class UnionFind (line 6) | class UnionFind: method __init__ (line 7) | def __init__(self, n): method find (line 11) | def find(self, x): method union (line 16) | def union(self, x, y): class Solution (line 28) | class Solution: method latestDayToCross (line 29) | def latestDayToCross(self, row: int, col: int, cells: List[List[int]])... FILE: Python/1971-find-if-path-exists-in-graph.py class Solution (line 7) | class Solution: method validPath (line 8) | def validPath(self, n: int, edges: List[List[int]], source: int, desti... method validPath (line 50) | def validPath(self, n: int, edges: List[List[int]], source: int, desti... class UnionFind (line 29) | class UnionFind: method __init__ (line 30) | def __init__(self, n): method find (line 34) | def find(self, num): method union (line 39) | def union(self, x, y): class Solution (line 49) | class Solution: method validPath (line 8) | def validPath(self, n: int, edges: List[List[int]], source: int, desti... method validPath (line 50) | def validPath(self, n: int, edges: List[List[int]], source: int, desti... FILE: Python/1973-count-nodes-equal-to-sum-of-descendants.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method equalToDescendants (line 15) | def equalToDescendants(self, root: Optional[TreeNode]) -> int: FILE: Python/1975-maximum-matrix-sum.py class Solution (line 6) | class Solution: method maxMatrixSum (line 7) | def maxMatrixSum(self, matrix: List[List[int]]) -> int: FILE: Python/1976-number-of-ways-to-arrive-at-destination.py class Solution (line 8) | class Solution: method countPaths (line 9) | def countPaths(self, n: int, roads: List[List[int]]) -> int: FILE: Python/1980-find-unique-binary-string.py class Solution (line 6) | class Solution: method findDifferentBinaryString (line 7) | def findDifferentBinaryString(self, nums: List[str]) -> str: FILE: Python/1984-minimum-difference-between-highest-and-lowest-of-k-scores.py class Solution (line 6) | class Solution: method minimumDifference (line 7) | def minimumDifference(self, nums: List[int], k: int) -> int: FILE: Python/1985-find-the-kth-largest-integer-in-the-array.py class Solution (line 6) | class Solution: method kthLargestNumber (line 7) | def kthLargestNumber(self, nums: List[str], k: int) -> str: FILE: Python/1992-find-all-groups-of-farmland.py class Solution (line 6) | class Solution: method findFarmland (line 7) | def findFarmland(self, land: List[List[int]]) -> List[List[int]]: FILE: Python/2000-reverse-prefix-of-word.py class Solution (line 3) | class Solution: method reversePrefix (line 4) | def reversePrefix(self, word: str, ch: str) -> str: FILE: Python/2001-number-of-pairs-of-interchangeable-rectangles.py class Solution (line 7) | class Solution: method interchangeableRectangles (line 8) | def interchangeableRectangles(self, rectangles: List[List[int]]) -> int: FILE: Python/2002-maximum-product-of-the-length-of-two-palindromic-subsequences.py class Solution (line 6) | class Solution: method maxProduct (line 7) | def maxProduct(self, s: str) -> int: FILE: Python/2007-find-original-array-from-doubled-array.py class Solution (line 7) | class Solution: method findOriginalArray (line 8) | def findOriginalArray(self, changed: List[int]) -> List[int]: FILE: Python/2009-minimum-number-of-operations-to-make-array-continuous.py class Solution (line 4) | class Solution: method minOperations (line 5) | def minOperations(self, nums: List[int]) -> int: FILE: Python/2011-final-value-of-variable-after-performing-operations.py class Solution (line 6) | class Solution: method finalValueAfterOperations (line 7) | def finalValueAfterOperations(self, operations: List[str]) -> int: FILE: Python/2012-sum-of-beauty-in-the-array.py class Solution (line 6) | class Solution: method sumOfBeauties (line 7) | def sumOfBeauties(self, nums: List[int]) -> int: FILE: Python/2013-detect-squares.py class DetectSquares (line 5) | class DetectSquares: method __init__ (line 7) | def __init__(self): method add (line 10) | def add(self, point: List[int]) -> None: method count (line 14) | def count(self, point: List[int]) -> int: FILE: Python/2014-longest-subsequence-repeated-k-times.py class Solution (line 7) | class Solution: method longestSubsequenceRepeatedK (line 8) | def longestSubsequenceRepeatedK(self, s: str, k: int) -> str: FILE: Python/2016-maximum-difference-between-increasing-elements.py class Solution (line 6) | class Solution: method maximumDifference (line 7) | def maximumDifference(self, nums: List[int]) -> int: FILE: Python/2017-grid-game.py class Solution (line 6) | class Solution: method gridGame (line 7) | def gridGame(self, grid: List[List[int]]) -> int: FILE: Python/2022-convert-1d-array-into-2d-array.py class Solution (line 6) | class Solution: method construct2DArray (line 7) | def construct2DArray(self, original: List[int], m: int, n: int) -> Lis... FILE: Python/2023-number-of-pairs-of-strings-with-concatenation-equal-to-target.py class Solution (line 6) | class Solution: method numOfPairs (line 7) | def numOfPairs(self, nums: List[str], target: str) -> int: FILE: Python/2028-find-missing-observations.py class Solution (line 6) | class Solution: method missingRolls (line 7) | def missingRolls(self, rolls: List[int], mean: int, n: int) -> List[int]: FILE: Python/2033-minimum-operations-to-make-a-uni-value-grid.py class Solution (line 6) | class Solution: method minOperations (line 7) | def minOperations(self, grid: List[List[int]], x: int) -> int: FILE: Python/2034-stock-price-fluctuation.py class StockPrice (line 6) | class StockPrice: method __init__ (line 7) | def __init__(self): method update (line 14) | def update(self, timestamp: int, price: int) -> None: method current (line 21) | def current(self) -> int: method maximum (line 24) | def maximum(self) -> int: method minimum (line 33) | def minimum(self) -> int: FILE: Python/2035-partition-array-into-two-arrays-to-minimize-sum-difference.py class Solution (line 8) | class Solution: method getSubsequenceSumWithElements (line 9) | def getSubsequenceSumWithElements(self, arr): method minimumDifference (line 23) | def minimumDifference(self, nums: List[int]) -> int: FILE: Python/2037-minimum-number-of-moves-to-seat-everyone.py class Solution (line 6) | class Solution: method minMovesToSeat (line 7) | def minMovesToSeat(self, seats: List[int], students: List[int]) -> int: FILE: Python/2038-remove-colored-pieces-if-both-neighbors-are-the-same-color.py class Solution (line 1) | class Solution: method winnerOfGame (line 2) | def winnerOfGame(self, colors: str) -> bool: FILE: Python/2040-kth-smallest-product-of-two-sorted-arrays.py class Solution (line 6) | class Solution: method kthSmallestProduct (line 7) | def kthSmallestProduct(self, nums1: List[int], nums2: List[int], k: in... method countLessEqual (line 22) | def countLessEqual(self, nums1, nums2, mid): FILE: Python/2043-simple-bank-system.py class Bank (line 4) | class Bank: method __init__ (line 6) | def __init__(self, balance: List[int]): method transfer (line 10) | def transfer(self, account1: int, account2: int, money: int) -> bool: method deposit (line 19) | def deposit(self, account: int, money: int) -> bool: method withdraw (line 25) | def withdraw(self, account: int, money: int) -> bool: FILE: Python/2044-count-number-of-maximum-bitwise-or-subsets.py class Solution (line 6) | class Solution: method countMaxOrSubsets (line 7) | def countMaxOrSubsets(self, nums: List[int]) -> int: FILE: Python/2045-second-minimum-time-to-reach-destination.py class Solution (line 9) | class Solution: method secondMinimum (line 10) | def secondMinimum(self, n: int, edges: List[List[int]], time: int, cha... FILE: Python/2048-next-greater-numerically-balanced-number.py class Solution (line 6) | class Solution: method nextBeautifulNumber (line 7) | def nextBeautifulNumber(self, n: int) -> int: FILE: Python/2050-parallel-courses-iii.py class Solution (line 5) | class Solution: method minimumTime (line 6) | def minimumTime(self, n: int, relations: List[List[int]], time: List[i... FILE: Python/2053-kth-distinct-string-in-an-array.py class Solution (line 6) | class Solution: method kthDistinct (line 7) | def kthDistinct(self, arr: List[str], k: int) -> str: FILE: Python/2054-two-best-non-overlapping-events.py class Solution (line 7) | class Solution: method maxTwoEvents (line 8) | def maxTwoEvents(self, events: List[List[int]]) -> int: FILE: Python/2055-plates-between-candles.py class Solution (line 6) | class Solution: method platesBetweenCandles (line 7) | def platesBetweenCandles(self, s: str, queries: List[List[int]]) -> Li... FILE: Python/2058-find-the-minimum-and-maximum-number-of-nodes-between-critical-points.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method nodesBetweenCriticalPoints (line 13) | def nodesBetweenCriticalPoints(self, head: Optional[ListNode]) -> List... FILE: Python/2061-number-of-spaces-cleaning-robot-cleaned.py class Solution (line 7) | class Solution: method numberOfCleanRooms (line 8) | def numberOfCleanRooms(self, room: List[List[int]]) -> int: FILE: Python/2062-count-vowel-substrings-of-a-string.py class Solution (line 6) | class Solution: method countVowelSubstrings (line 7) | def countVowelSubstrings(self, word: str) -> int: FILE: Python/2064-minimized-maximum-of-products-distributed-to-any-store.py class Solution (line 8) | class Solution: method minimizedMaximum (line 9) | def minimizedMaximum(self, n: int, quantities: List[int]) -> int: FILE: Python/2070-most-beautiful-item-for-each-query.py class Solution (line 6) | class Solution: method maximumBeauty (line 7) | def maximumBeauty( method binarySearch (line 19) | def binarySearch(self, items, targetPrice): FILE: Python/2071-maximum-number-of-tasks-you-can-assign.py class Solution (line 7) | class Solution: method maxTaskAssign (line 8) | def maxTaskAssign(self, tasks: List[int], workers: List[int], pills: i... FILE: Python/2073-time-needed-to-buy-tickets.py class Solution (line 6) | class Solution: method timeRequiredToBuy (line 7) | def timeRequiredToBuy(self, tickets: List[int], k: int) -> int: FILE: Python/2074-reverse-nodes-in-even-length-groups.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method reverseEvenLengthGroups (line 13) | def reverseEvenLengthGroups(self, head: Optional[ListNode]) -> Optiona... FILE: Python/2077-paths-in-maze-that-lead-to-same-room.py class Solution (line 7) | class Solution: method numberOfPaths (line 8) | def numberOfPaths(self, n: int, corridors: List[List[int]]) -> int: FILE: Python/2079-watering-plants.py class Solution (line 4) | class Solution: method wateringPlants (line 5) | def wateringPlants(self, plants: List[int], capacity: int) -> int: FILE: Python/2081-sum-of-k-mirror-numbers.py class Solution (line 3) | class Solution: method kMirror (line 4) | def kMirror(self, k: int, n: int) -> int: FILE: Python/2083-substrings-that-begin-and-end-with-the-same-letter.py class Solution (line 3) | class Solution: method numberOfSubstrings (line 4) | def numberOfSubstrings(self, s: str) -> int: FILE: Python/2089-find-target-indices-after-sorting-array.py class Solution (line 6) | class Solution: method targetIndices (line 7) | def targetIndices(self, nums: List[int], target: int) -> List[int]: FILE: Python/2090-k-radius-subarray-averages.py class Solution (line 6) | class Solution: method getAverages (line 7) | def getAverages(self, nums: List[int], k: int) -> List[int]: FILE: Python/2091-removing-minimum-and-maximum-from-array.py class Solution (line 6) | class Solution: method minimumDeletions (line 7) | def minimumDeletions(self, nums: List[int]) -> int: FILE: Python/2092-find-all-people-with-secret.py class Solution (line 8) | class Solution: method findAllPeople (line 9) | def findAllPeople(self, n: int, meetings: List[List[int]], firstPerson... FILE: Python/2093-minimum-cost-to-reach-city-with-discounts.py class Solution (line 7) | class Solution: method minimumCost (line 8) | def minimumCost(self, n: int, highways: List[List[int]], discounts: in... FILE: Python/2094-finding-3-digit-even-numbers.py class Solution (line 6) | class Solution: method findEvenNumbers (line 7) | def findEvenNumbers(self, digits: List[int]) -> List[int]: FILE: Python/2095-delete-the-middle-node-of-a-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method deleteMiddle (line 13) | def deleteMiddle(self, head: Optional[ListNode]) -> Optional[ListNode]: FILE: Python/2096-step-by-step-directions-from-a-binary-tree-node-to-another.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method getDirections (line 14) | def getDirections( method findLCA (line 28) | def findLCA( method findPath (line 44) | def findPath( FILE: Python/2097-valid-arrangement-of-pairs.py class Solution (line 7) | class Solution: method validArrangement (line 8) | def validArrangement(self, pairs: List[List[int]]) -> List[List[int]]: FILE: Python/2099-find-subsequence-of-length-k-with-the-largest-sum.py class Solution (line 7) | class Solution: method maxSubsequence (line 8) | def maxSubsequence(self, nums: List[int], k: int) -> List[int]: FILE: Python/2101-detonate-the-maximum-bombs.py class Solution (line 7) | class Solution: method maximumDetonation (line 8) | def maximumDetonation(self, bombs: List[List[int]]) -> int: FILE: Python/2104-total-characters-in-string-after-transformations-i.py class Solution (line 4) | class Solution: method lengthAfterTransformations (line 5) | def lengthAfterTransformations(self, s: str, t: int) -> int: FILE: Python/2105-watering-plants-ii.py class Solution (line 6) | class Solution: method minimumRefill (line 7) | def minimumRefill(self, plants: List[int], capacityA: int, capacityB: ... FILE: Python/2106-maximum-fruits-harvested-after-at-most-k-steps.py class Solution (line 7) | class Solution: method maxTotalFruits (line 8) | def maxTotalFruits( FILE: Python/2107-number-of-unique-flavors-after-sharing-k-candies.py class Solution (line 7) | class Solution: method shareCandies (line 8) | def shareCandies(self, candies: List[int], k: int) -> int: FILE: Python/2108-find-first-palindromic-string-in-the-array.py class Solution (line 6) | class Solution: method firstPalindrome (line 7) | def firstPalindrome(self, words: List[str]) -> str: FILE: Python/2109-adding-spaces-to-a-string.py class Solution (line 6) | class Solution: method addSpaces (line 7) | def addSpaces(self, s: str, spaces: List[int]) -> str: FILE: Python/2110-number-of-smooth-descent-periods-of-a-stock.py class Solution (line 6) | class Solution: method getDescentPeriods (line 7) | def getDescentPeriods(self, prices: List[int]) -> int: FILE: Python/2115-find-all-possible-recipes-from-given-supplies.py class Solution (line 7) | class Solution: method findAllRecipes (line 8) | def findAllRecipes(self, recipes: List[str], ingredients: List[List[st... FILE: Python/2116-check-if-a-parentheses-string-can-be-valid.py class Solution (line 3) | class Solution: method canBeValid (line 4) | def canBeValid(self, s: str, locked: str) -> bool: FILE: Python/2120-execution-of-all-suffix-instructions-staying-in-a-grid.py class Solution (line 6) | class Solution: method executeInstructions (line 7) | def executeInstructions(self, n: int, startPos: List[int], s: str) -> ... FILE: Python/2125-number-of-laser-beams-in-a-bank.py class Solution (line 6) | class Solution: method numberOfBeams (line 7) | def numberOfBeams(self, bank: List[str]) -> int: FILE: Python/2127-maximum-employees-to-be-invited-to-a-meeting.py class Solution (line 7) | class Solution: method maximumInvitations (line 8) | def maximumInvitations(self, favorite: List[int]) -> int: FILE: Python/2130-maximum-twin-sum-of-a-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method pairSum (line 13) | def pairSum(self, head: Optional[ListNode]) -> int: FILE: Python/2131-longest-palindrome-by-concatenating-two-letter-words.py class Solution (line 7) | class Solution: method longestPalindrome (line 8) | def longestPalindrome(self, words: List[str]) -> int: FILE: Python/2134-minimum-swaps-to-group-all-1s-together-ii.py class Solution (line 6) | class Solution: method minSwaps (line 7) | def minSwaps(self, nums: List[int]) -> int: FILE: Python/2138-divide-a-string-into-groups-of-size-k.py class Solution (line 4) | class Solution: method divideString (line 5) | def divideString(self, s: str, k: int, fill: str) -> List[str]: FILE: Python/2139-detect-squares.py class DetectSquares (line 7) | class DetectSquares: method __init__ (line 9) | def __init__(self): method add (line 12) | def add(self, point: List[int]) -> None: method count (line 15) | def count(self, point: List[int]) -> int: FILE: Python/2139-minimum-moves-to-reach-target-score.py class Solution (line 3) | class Solution: method minMoves (line 4) | def minMoves(self, target: int, maxDoubles: int) -> int: FILE: Python/2140-solving-questions-with-brainpower.py class Solution (line 6) | class Solution: method mostPoints (line 7) | def mostPoints(self, questions: List[List[int]]) -> int: FILE: Python/2141-maximum-running-time-of-n-computers.py class Solution (line 4) | class Solution: method maxRunTime (line 5) | def maxRunTime(self, n: int, batteries: List[int]) -> int: FILE: Python/2145-count-the-hidden-sequences.py class Solution (line 4) | class Solution: method numberOfArrays (line 5) | def numberOfArrays(self, differences: List[int], lower: int, upper: in... FILE: Python/2147-number-of-ways-to-divide-a-long-corridor.py class Solution (line 3) | class Solution: method numberOfWays (line 4) | def numberOfWays(self, corridor: str) -> int: FILE: Python/2149-rearrange-array-elements-by-sign.py class Solution (line 6) | class Solution: method rearrangeArray (line 7) | def rearrangeArray(self, nums: List[int]) -> List[int]: FILE: Python/2150-find-all-lonely-numbers-in-the-array.py class Solution (line 6) | class Solution: method findLonely (line 7) | def findLonely(self, nums: List[int]) -> List[int]: FILE: Python/2154-keep-multiplying-found-values-by-two.py class Solution (line 4) | class Solution: method findFinalValue (line 5) | def findFinalValue(self, nums: List[int], original: int) -> int: FILE: Python/2155-all-divisions-with-the-highest-score-of-a-binary-array.py class Solution (line 6) | class Solution: method maxScoreIndices (line 7) | def maxScoreIndices(self, nums: List[int]) -> List[int]: FILE: Python/2161-partition-array-according-to-given-pivot.py class Solution (line 6) | class Solution: method pivotArray (line 7) | def pivotArray(self, nums: List[int], pivot: int) -> List[int]: FILE: Python/2163-minimum-difference-in-sums-after-removal-of-elements.py class Solution (line 7) | class Solution: method minimumDifference (line 8) | def minimumDifference(self, nums: List[int]) -> int: FILE: Python/2165-smallest-value-of-the-rearranged-number.py class Solution (line 3) | class Solution: method smallestNumber (line 4) | def smallestNumber(self, num: int) -> int: FILE: Python/2168-unique-substrings-with-equal-digit-frequency.py class Solution (line 3) | class Solution: class Trie (line 4) | class Trie: method __init__ (line 5) | def __init__(self): method equalDigitFrequency (line 9) | def equalDigitFrequency(self, s: str) -> int: FILE: Python/2169-count-operations-to-obtain-zero.py class Solution (line 3) | class Solution: method countOperations (line 4) | def countOperations(self, num1: int, num2: int) -> int: FILE: Python/2176-count-equal-and-divisible-pairs-in-an-array.py class Solution (line 6) | class Solution: method countPairs (line 7) | def countPairs(self, nums: List[int], k: int) -> int: FILE: Python/2177-find-three-consecutive-integers-that-sum-to-a-given-number.py class Solution (line 6) | class Solution: method sumOfThree (line 7) | def sumOfThree(self, num: int) -> List[int]: FILE: Python/2178-maximum-split-of-positive-even-integers.py class Solution (line 4) | class Solution: method maximumEvenSplit (line 5) | def maximumEvenSplit(self, finalSum: int) -> List[int]: FILE: Python/2179-count-good-triplets-in-an-array.py class FenwickTree (line 6) | class FenwickTree: method __init__ (line 7) | def __init__(self, size): method update (line 10) | def update(self, index, delta): method query (line 16) | def query(self, index): class Solution (line 25) | class Solution: method goodTriplets (line 26) | def goodTriplets(self, nums1: List[int], nums2: List[int]) -> int: FILE: Python/2181-merge-nodes-in-between-zeros.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method mergeNodes (line 13) | def mergeNodes(self, head: Optional[ListNode]) -> Optional[ListNode]: FILE: Python/2182-construct-string-with-repeat-limit.py class Solution (line 7) | class Solution: method repeatLimitedString (line 8) | def repeatLimitedString(self, s: str, repeatLimit: int) -> str: FILE: Python/2185-counting-words-with-a-given-prefix.py class Solution (line 6) | class Solution: method prefixCount (line 7) | def prefixCount(self, words: List[str], pref: str) -> int: FILE: Python/2186-minimum-number-of-steps-to-make-two-strings-anagram-ii.py class Solution (line 6) | class Solution: method minSteps (line 7) | def minSteps(self, s: str, t: str) -> int: FILE: Python/2191-sort-the-jumbled-numbers.py class Solution (line 6) | class Solution: method sortJumbled (line 7) | def sortJumbled(self, mapping: List[int], nums: List[int]) -> List[int]: FILE: Python/2192-all-ancestors-of-a-node-in-a-directed-acyclic-graph.py class Solution (line 6) | class Solution: method getAncestors (line 7) | def getAncestors(self, n: int, edges: List[List[int]]) -> List[List[in... method findChildren (line 29) | def findChildren(self, currentNode, adjacencyList, visitedNodes): FILE: Python/2193-minimum-number-of-moves-to-make-palindrome.py class Solution (line 3) | class Solution: method minMovesToMakePalindrome (line 4) | def minMovesToMakePalindrome(self, s: str) -> int: FILE: Python/2196-create-binary-tree-from-descriptions.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method traverse (line 14) | def traverse(self, node: Optional[TreeNode]): method createBinaryTree (line 21) | def createBinaryTree( FILE: Python/2197-replace-non-coprime-numbers-in-array.py class Solution (line 7) | class Solution: method replaceNonCoprimes (line 8) | def replaceNonCoprimes(self, nums: List[int]) -> List[int]: FILE: Python/2200-find-all-k-distant-indices-in-an-array.py class Solution (line 4) | class Solution: method findKDistantIndices (line 5) | def findKDistantIndices(self, nums: List[int], key: int, k: int) -> Li... FILE: Python/2201-zero-array-transformation-i.py class Solution (line 6) | class Solution: method isZeroArray (line 7) | def isZeroArray(self, nums: List[int], queries: List[List[int]]) -> bool: FILE: Python/2204-distance-to-a-cycle-in-undirected-graph.py class Solution (line 7) | class Solution: method distanceToCycle (line 8) | def distanceToCycle(self, n: int, edges: List[List[int]]) -> List[int]: FILE: Python/2206-divide-array-into-equal-pairs.py class Solution (line 6) | class Solution: method divideArray (line 7) | def divideArray(self, nums: List[int]) -> bool: FILE: Python/2207-maximize-number-of-subsequences-in-a-string.py class Solution (line 3) | class Solution: method maximumSubsequenceCount (line 4) | def maximumSubsequenceCount(self, text: str, pattern: str) -> int: FILE: Python/2208-minimum-operations-to-halve-array-sum.py class Solution (line 7) | class Solution: method halveArray (line 8) | def halveArray(self, nums: List[int]) -> int: FILE: Python/2210-count-hills-and-valleys-in-an-array.py class Solution (line 6) | class Solution: method countHillValley (line 7) | def countHillValley(self, nums: List[int]) -> int: FILE: Python/2211-count-collisions-on-a-road.py class Solution (line 3) | class Solution: method countCollisions (line 4) | def countCollisions(self, directions: str) -> int: FILE: Python/2214-minimum-health-to-beat-game.py class Solution (line 6) | class Solution: method minimumHealth (line 7) | def minimumHealth(self, damage: List[int], armor: int) -> int: FILE: Python/2215-find-the-difference-of-two-arrays.py class Solution (line 6) | class Solution: method findDifference (line 7) | def findDifference(self, nums1: List[int], nums2: List[int]) -> List[L... FILE: Python/2216-minimum-deletions-to-make-array-beautiful.py class Solution (line 6) | class Solution: method minDeletion (line 7) | def minDeletion(self, nums: List[int]) -> int: FILE: Python/2220-minimum-bit-flips-to-convert-number.py class Solution (line 4) | class Solution: method minBitFlips (line 5) | def minBitFlips(self, start: int, goal: int) -> int: FILE: Python/2221-find-triangular-sum-of-an-array.py class Solution (line 6) | class Solution: method triangularSum (line 7) | def triangularSum(self, nums: List[int]) -> int: FILE: Python/2225-find-players-with-zero-or-one-losses.py class Solution (line 6) | class Solution: method findWinners (line 7) | def findWinners(self, matches: List[List[int]]) -> List[List[int]]: FILE: Python/2226-maximum-candies-allocated-to-k-children.py class Solution (line 6) | class Solution: method maximumCandies (line 7) | def maximumCandies(self, candies: List[int], k: int) -> int: FILE: Python/2231-largest-number-after-digit-swaps-by-parity.py class Solution (line 6) | class Solution: method largestInteger (line 7) | def largestInteger(self, num: int) -> int: FILE: Python/2235-add-two-integers.py class Solution (line 3) | class Solution: method sum (line 4) | def sum(self, num1: int, num2: int) -> int: FILE: Python/2240-number-of-ways-to-buy-pens-and-pencils.py class Solution (line 3) | class Solution: method waysToBuyPensPencils (line 4) | def waysToBuyPensPencils(self, total: int, cost1: int, cost2: int) -> ... FILE: Python/2244-minimum-rounds-to-complete-all-tasks.py class Solution (line 6) | class Solution: method minimumRounds (line 7) | def minimumRounds(self, tasks: List[int]) -> int: FILE: Python/2246-longest-path-with-different-adjacent-characters.py class Solution (line 7) | class Solution: method longestPath (line 8) | def longestPath(self, parent: List[int], s: str) -> int: FILE: Python/2251-number-of-flowers-in-full-bloom.py class Solution (line 5) | class Solution: method fullBloomFlowers (line 6) | def fullBloomFlowers(self, flowers: List[List[int]], people: List[int]... FILE: Python/2256-minimum-average-difference.py class Solution (line 6) | class Solution: method minimumAverageDifference (line 7) | def minimumAverageDifference(self, nums: List[int]) -> int: FILE: Python/2257-count-unguarded-cells-in-the-grid.py class Solution (line 7) | class Solution: method countUnguarded (line 13) | def countUnguarded(self, m: int, n: int, guards: List[List[int]], wall... FILE: Python/2260-minimum-consecutive-cards-to-pick-up.py class Solution (line 7) | class Solution: method minimumCardPickup (line 8) | def minimumCardPickup(self, cards: List[int]) -> int: FILE: Python/2262-total-appeal-of-a-string.py class Solution (line 6) | class Solution: method appealSum (line 7) | def appealSum(self, s: str) -> int: FILE: Python/2264-largest-3-same-digit-number-in-string.py class Solution (line 3) | class Solution: method largestGoodInteger (line 4) | def largestGoodInteger(self, num): FILE: Python/2265-count-nodes-equal-to-average-of-subtree.py class TreeNode (line 4) | class TreeNode: method __init__ (line 5) | def __init__(self, val=0, left=None, right=None): class Solution (line 11) | class Solution: method averageOfSubtree (line 12) | def averageOfSubtree(self, root: TreeNode) -> int: FILE: Python/2270-number-of-ways-to-split-array.py class Solution (line 6) | class Solution: method waysToSplitArray (line 7) | def waysToSplitArray(self, nums: List[int]) -> int: FILE: Python/2273-find-resultant-array-after-removing-anagrams.py class Solution (line 6) | class Solution: method removeAnagrams (line 7) | def removeAnagrams(self, words: List[str]) -> List[str]: FILE: Python/2274-maximum-consecutive-floors-without-special-floors.py class Solution (line 6) | class Solution: method maxConsecutive (line 7) | def maxConsecutive(self, bottom: int, top: int, special: List[int]) ->... FILE: Python/2275-largest-combination-with-bitwise-and-greater-than-zero.py class Solution (line 6) | class Solution: method largestCombination (line 7) | def largestCombination(self, candidates: List[int]) -> int: FILE: Python/2279-maximum-bags-with-full-capacity-of-rocks.py class Solution (line 6) | class Solution: method maximumBags (line 7) | def maximumBags(self, capacity: List[int], rocks: List[int], additiona... FILE: Python/2284-sender-with-largest-word-count.py class Solution (line 7) | class Solution: method largestWordCount (line 8) | def largestWordCount(self, messages: List[str], senders: List[str]) ->... FILE: Python/2285-maximum-total-importance-of-roads.py class Solution (line 6) | class Solution: method maximumImportance (line 7) | def maximumImportance(self, n: int, roads: List[List[int]]) -> int: FILE: Python/2290-minimum-obstacle-removal-to-reach-corner.py class Solution (line 7) | class Solution: method minimumObstacles (line 8) | def minimumObstacles(self, grid: List[List[int]]) -> int: FILE: Python/2291-maximum-profit-from-trading-stocks.py class Solution (line 6) | class Solution: method maximumProfit (line 7) | def maximumProfit(self, present: List[int], future: List[int], budget:... FILE: Python/2294-partition-array-such-that-maximum-difference-is-k.py class Solution (line 6) | class Solution: method partitionArray (line 7) | def partitionArray(self, nums: List[int], maxDiff: int) -> int: FILE: Python/2295-replace-elements-in-an-array.py class Solution (line 7) | class Solution: method arrayChange (line 8) | def arrayChange(self, nums: List[int], operations: List[List[int]]) ->... FILE: Python/2300-successful-pairs-of-spells-and-potions.py class Solution (line 7) | class Solution: method successfulPairs (line 8) | def successfulPairs(self, spells: List[int], potions: List[int], succe... FILE: Python/2302-count-subarrays-with-score-less-than-k.py class Solution (line 6) | class Solution: method countSubarrays (line 7) | def countSubarrays(self, nums: List[int], k: int) -> int: FILE: Python/2303-calculate-amount-paid-in-taxes.py class Solution (line 6) | class Solution: method calculateTax (line 7) | def calculateTax(self, brackets: List[List[int]], income: int) -> float: FILE: Python/2310-sum-of-numbers-with-units-digit-k.py class Solution (line 3) | class Solution: method minimumNumbers (line 4) | def minimumNumbers(self, num: int, k: int) -> int: FILE: Python/2311-longest-binary-subsequence-less-than-or-equal-to-k.py class Solution (line 3) | class Solution: method longestSubsequence (line 4) | def longestSubsequence(self, s: str, k: int) -> int: FILE: Python/2322-minimum-score-after-removals-on-a-tree.py class Solution (line 6) | class Solution: method calc (line 7) | def calc(self, part1: int, part2: int, part3: int) -> int: method minimumScore (line 10) | def minimumScore(self, nums: List[int], edges: List[List[int]]) -> int: FILE: Python/2326-spiral-matrix-iv.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method spiralMatrix (line 13) | def spiralMatrix(self, m: int, n: int, head: Optional[ListNode]) -> Li... FILE: Python/2327-number-of-people-aware-of-a-secret.py class Solution (line 6) | class Solution: method peopleAwareOfSecret (line 7) | def peopleAwareOfSecret(self, n: int, delay: int, forget: int) -> int: FILE: Python/2331-evaluate-boolean-binary-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method evaluateTree (line 14) | def evaluateTree(self, root: Optional[TreeNode]) -> bool: FILE: Python/2334-subarray-with-elements-greater-than-varying-threshold.py class Solution (line 6) | class Solution: method validSubarraySize (line 7) | def validSubarraySize(self, nums: List[int], threshold: int) -> int: FILE: Python/2336-smallest-number-in-infinite-set.py class SmallestInfiniteSet (line 4) | class SmallestInfiniteSet: method __init__ (line 6) | def __init__(self): method popSmallest (line 10) | def popSmallest(self) -> int: method addBack (line 18) | def addBack(self, num: int) -> None: FILE: Python/2337-move-pieces-to-obtain-a-string.py class Solution (line 3) | class Solution: method canChange (line 4) | def canChange(self, start: str, target: str) -> bool: FILE: Python/2338-count-the-number-of-ideal-arrays.py class Solution (line 7) | class Solution: method idealArrays (line 8) | def idealArrays(self, n: int, maxValue: int) -> int: FILE: Python/2342-max-sum-of-a-pair-with-equal-sum-of-digits.py class Solution (line 7) | class Solution: method maximumSum (line 8) | def maximumSum(self, nums: List[int]) -> int: FILE: Python/2348-number-of-zero-filled-subarrays.py class Solution (line 6) | class Solution: method zeroFilledSubarray (line 7) | def zeroFilledSubarray(self, nums: List[int]) -> int: FILE: Python/2349-design-a-number-container-system.py class NumberContainers (line 7) | class NumberContainers: method __init__ (line 9) | def __init__(self): method change (line 13) | def change(self, index: int, number: int) -> None: method find (line 23) | def find(self, number: int) -> int: FILE: Python/2352-equal-row-and-column-pairs.py class Solution (line 6) | class Solution: method equalPairs (line 7) | def equalPairs(self, grid: List[List[int]]) -> int: FILE: Python/2353-design-a-food-rating-system.py class FoodRatings (line 5) | class FoodRatings: method __init__ (line 7) | def __init__(self, foods: List[str], cuisines: List[str], ratings: Lis... method changeRating (line 16) | def changeRating(self, food: str, newRating: int) -> None: method highestRated (line 22) | def highestRated(self, cuisine: str) -> str: FILE: Python/2355-maximum-number-of-books-you-can-take.py class Solution (line 4) | class Solution: method maximumBooks (line 5) | def maximumBooks(self, books: List[int]) -> int: FILE: Python/2357-make-array-zero-by-subtracting-equal-amounts.py class Solution (line 6) | class Solution: method minimumOperations (line 7) | def minimumOperations(self, nums: List[int]) -> int: FILE: Python/2358-maximum-number-of-groups-entering-a-competition.py class Solution (line 7) | class Solution: method maximumGroups (line 8) | def maximumGroups(self, grades: List[int]) -> int: FILE: Python/2359-find-closest-node-to-given-two-nodes.py class Solution (line 7) | class Solution: method closestMeetingNode (line 8) | def closestMeetingNode(self, edges: List[int], node1: int, node2: int)... FILE: Python/2361-minimum-costs-using-the-train-line.py class Solution (line 4) | class Solution: method solve (line 5) | def solve(self, i: int, lane: int, dp: List[List[int]], regular: List[... method minimumCosts (line 17) | def minimumCosts(self, regular: List[int], express: List[int], express... FILE: Python/2364-count-number-of-bad-pairs.py class Solution (line 7) | class Solution: method countBadPairs (line 8) | def countBadPairs(self, nums: List[int]) -> int: FILE: Python/2366-minimum-replacements-to-sort-the-array.py class Solution (line 4) | class Solution: method minimumReplacement (line 5) | def minimumReplacement(self, nums: List[int]) -> int: FILE: Python/2368-reachable-nodes-with-restrictions.py class Solution (line 7) | class Solution: method reachableNodes (line 8) | def reachableNodes(self, n: int, edges: List[List[int]], restricted: L... FILE: Python/2369-check-if-there-is-a-valid-partition-for-the-array.py class Solution (line 1) | class Solution: method validPartition (line 2) | def validPartition(self, nums: List[int]) -> bool: FILE: Python/2370-longest-ideal-subsequence.py class Solution (line 3) | class Solution: method longestIdealString (line 4) | def longestIdealString(self, s: str, k: int) -> int: FILE: Python/2371-minimize-maximum-value-in-a-grid.py class Solution (line 6) | class Solution: method minScore (line 7) | def minScore(self, grid: List[List[int]]) -> List[List[int]]: FILE: Python/2373-largest-local-values-in-a-matrix.py class Solution (line 6) | class Solution: method findMaxValue (line 7) | def findMaxValue(self, grid: List[List[int]], i: int, j: int) -> int: method largestLocal (line 14) | def largestLocal(self, grid: List[List[int]]) -> List[List[int]]: FILE: Python/2374-node-with-highest-edge-score.py class Solution (line 7) | class Solution: method edgeScore (line 8) | def edgeScore(self, edges: List[int]) -> int: FILE: Python/2375-construct-smallest-number-from-di-string.py class Solution (line 3) | class Solution: method smallestNumber (line 4) | def smallestNumber(self, pattern: str) -> str: FILE: Python/2379-minimum-recolors-to-get-k-consecutive-black-blocks.py class Solution (line 3) | class Solution: method minimumRecolors (line 4) | def minimumRecolors(self, blocks: str, k: int) -> int: FILE: Python/2380-time-needed-to-rearrange-a-binary-string.py class Solution (line 3) | class Solution: method secondsToRemoveOccurrences (line 4) | def secondsToRemoveOccurrences(self, s: str) -> int: FILE: Python/2381-shifting-letters-ii.py class Solution (line 6) | class Solution: method shiftingLetters (line 7) | def shiftingLetters(self, s: str, shifts: List[List[int]]) -> str: FILE: Python/2384-largest-palindromic-number.py class Solution (line 6) | class Solution: method largestPalindromic (line 7) | def largestPalindromic(self, num: str) -> str: FILE: Python/2385-amount-of-time-for-binary-tree-to-be-infected.py class TreeNode (line 8) | class TreeNode: method __init__ (line 9) | def __init__(self, val=0, left=None, right=None): class Solution (line 15) | class Solution: method convertTreeToGraph (line 16) | def convertTreeToGraph(self, current: TreeNode, parent: int, treeMap: ... method amountOfTime (line 31) | def amountOfTime(self, root: Optional[TreeNode], start: int) -> int: FILE: Python/2389-longest-subsequence-with-limited-sum.py class Solution (line 6) | class Solution: method answerQueries (line 7) | def answerQueries(self, nums: List[int], queries: List[int]) -> List[i... FILE: Python/2390-removing-stars-from-a-string.py class Solution (line 3) | class Solution: method removeStars (line 4) | def removeStars(self, s: str) -> str: FILE: Python/2391-minimum-amount-of-time-to-collect-garbage.py class Solution (line 6) | class Solution: method garbageCollection (line 7) | def garbageCollection(self, garbage: List[str], travel: List[int]) -> ... FILE: Python/2392-build-a-matrix-with-conditions.py class Solution (line 7) | class Solution: method buildMatrix (line 8) | def buildMatrix(self, k: int, rowConditions: List[List[int]], colCondi... method dfs (line 24) | def dfs(self, node: int, adj: defaultdict, visited: List[int], order: ... method topoSort (line 37) | def topoSort(self, edges: List[List[int]], n: int) -> List[int]: FILE: Python/2393-count-strictly-increasing-subarrays.py class Solution (line 4) | class Solution: method countSubarrays (line 5) | def countSubarrays(self, nums: List[int]) -> int: FILE: Python/2396-strictly-palindromic-number.py class Solution (line 4) | class Solution: method isStrictlyPalindromic (line 5) | def isStrictlyPalindromic(self, n: int) -> bool: FILE: Python/2401-longest-nice-subarray.py class Solution (line 6) | class Solution: method longestNiceSubarray (line 7) | def longestNiceSubarray(self, nums: List[int]) -> int: FILE: Python/2402-meeting-rooms-iii.py class Solution (line 7) | class Solution: method mostBooked (line 8) | def mostBooked(self, n: int, meetings: List[List[int]]) -> int: FILE: Python/2405-optimal-partition-of-string.py class Solution (line 4) | class Solution: method partitionString (line 5) | def partitionString(self, s: str) -> int: FILE: Python/2406-divide-intervals-into-minimum-number-of-groups.py class Solution (line 7) | class Solution: method minGroups (line 8) | def minGroups(self, intervals: List[List[int]]) -> int: FILE: Python/2408-design-sql.py class TableNode (line 4) | class TableNode(): method __init__ (line 5) | def __init__(self, columns): class SQL (line 11) | class SQL: method __init__ (line 12) | def __init__(self, names: List[str], columns: List[int]): method ins (line 18) | def ins(self, name: str, row: List[str]) -> bool: method rmv (line 28) | def rmv(self, name: str, rowId: int) -> None: method sel (line 34) | def sel(self, name: str, rowId: int, columnId: int) -> str: method exp (line 43) | def exp(self, name: str) -> List[str]: FILE: Python/2410-maximum-matching-of-players-with-trainers.py class Solution (line 7) | class Solution: method matchPlayersAndTrainers (line 8) | def matchPlayersAndTrainers(self, players: List[int], trainers: List[i... FILE: Python/2411-smallest-subarrays-with-maximum-bitwise-or.py class Solution (line 6) | class Solution: method smallestSubarrays (line 7) | def smallestSubarrays(self, nums: List[int]) -> List[int]: FILE: Python/2414-length-of-the-longest-alphabetical-continuous-substring.py class Solution (line 3) | class Solution: method longestContinuousSubstring (line 4) | def longestContinuousSubstring(self, s: str) -> int: FILE: Python/2415-reverse-odd-levels-of-binary-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method reverseOddLevels (line 14) | def reverseOddLevels(self, root: Optional[TreeNode]) -> Optional[TreeN... FILE: Python/2416-sum-of-prefix-scores-of-strings.py class trie_node (line 6) | class trie_node: method __init__ (line 7) | def __init__(self): class Solution (line 12) | class Solution: method __init__ (line 13) | def __init__(self): method insert (line 16) | def insert(self, word): method count (line 24) | def count(self, s): method sumPrefixScores (line 32) | def sumPrefixScores(self, words: List[str]) -> List[int]: FILE: Python/2418-sort-the-people.py class Solution (line 6) | class Solution: method sortPeople (line 7) | def sortPeople(self, names: List[str], heights: List[int]) -> List[str]: FILE: Python/2419-longest-subarray-with-maximum-bitwise-and.py class Solution (line 6) | class Solution: method longestSubarray (line 7) | def longestSubarray(self, nums: List[int]) -> int: FILE: Python/2425-bitwise-xor-of-all-pairings.py class Solution (line 6) | class Solution: method xorAllNums (line 7) | def xorAllNums(self, nums1: List[int], nums2: List[int]) -> int: FILE: Python/2428-maximum-sum-of-an-hourglass.py class Solution (line 6) | class Solution: method maxSum (line 7) | def maxSum(self, grid: List[List[int]]) -> int: FILE: Python/2429-minimize-xor.py class Solution (line 3) | class Solution: method minimizeXor (line 4) | def minimizeXor(self, num1: int, num2: int) -> int: method isSet (line 26) | def isSet(self, x: int, bit: int) -> bool: method setBit (line 29) | def setBit(self, x: int, bit: int): method unsetBit (line 32) | def unsetBit(self, x: int, bit: int): FILE: Python/2433-find-the-original-array-of-prefix-xor.py class Solution (line 4) | class Solution: method findArray (line 5) | def findArray(self, pref: List[int]) -> List[int]: FILE: Python/2434-using-a-robot-to-print-the-lexicographically-smallest-string.py class Solution (line 6) | class Solution: method robotWithString (line 7) | def robotWithString(self, s: str) -> str: FILE: Python/2435-paths-in-matrix-whose-sum-is-divisible-by-k.py class Solution (line 6) | class Solution: method numberOfPaths (line 7) | def numberOfPaths(self, grid: List[List[int]], k: int) -> int: FILE: Python/2438-range-product-queries-of-powers.py class Solution (line 6) | class Solution: method productQueries (line 7) | def productQueries(self, n: int, queries: List[List[int]]) -> List[int]: FILE: Python/2439-minimize-maximum-of-array.py class Solution (line 7) | class Solution: method minimizeArrayValue (line 8) | def minimizeArrayValue(self, nums: List[int]) -> int: FILE: Python/2441-largest-positive-integer-that-exists-with-its-negative.py class Solution (line 6) | class Solution: method findMaxK (line 7) | def findMaxK(self, nums: List[int]) -> int: FILE: Python/2442-count-number-of-distinct-integers-after-reverse-operations.py class Solution (line 6) | class Solution: method countDistinctIntegers (line 7) | def countDistinctIntegers(self, nums: List[int]) -> int: FILE: Python/2443-sum-of-number-and-its-reverse.py class Solution (line 3) | class Solution: method sumOfNumberAndReverse (line 4) | def sumOfNumberAndReverse(self, num: int) -> bool: FILE: Python/2444-count-subarrays-with-fixed-bounds.py class Solution (line 6) | class Solution: method countSubarrays (line 7) | def countSubarrays(self, nums: List[int], minK: int, maxK: int) -> int: FILE: Python/2452-words-within-two-edits-of-dictionary.py class Solution (line 6) | class Solution: method twoEditWords (line 7) | def twoEditWords(self, queries: List[str], dictionary: List[str]) -> L... FILE: Python/2456-most-popular-video-creator.py class Solution (line 7) | class Solution: method mostPopularCreator (line 8) | def mostPopularCreator(self, creators: List[str], ids: List[str], view... FILE: Python/2458-height-of-binary-tree-after-subtree-removal-queries.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method treeQueries (line 15) | def treeQueries( method treeQueries (line 57) | def treeQueries(self, root: Optional[TreeNode], queries: List[int]) ->... class Solution (line 56) | class Solution: method treeQueries (line 15) | def treeQueries( method treeQueries (line 57) | def treeQueries(self, root: Optional[TreeNode], queries: List[int]) ->... FILE: Python/2460-apply-operations-to-an-array.py class Solution (line 6) | class Solution: method applyOperations (line 7) | def applyOperations(self, nums: List[int]) -> List[int]: FILE: Python/2461-maximum-sum-of-distinct-subarrays-with-length-k.py class Solution (line 7) | class Solution: method maximumSubarraySum (line 8) | def maximumSubarraySum(self, nums: List[int], k: int) -> int: FILE: Python/2462-total-cost-to-hire-k-workers.py class Solution (line 7) | class Solution: method totalCost (line 8) | def totalCost(self, costs: List[int], k: int, candidates: int) -> int: FILE: Python/2463-minimum-total-distance-traveled.py class Solution (line 6) | class Solution: method minimumTotalDistance (line 7) | def minimumTotalDistance( FILE: Python/2464-minimum-subarrays-in-a-valid-split.py class Solution (line 7) | class Solution: method validSubarraySplit (line 8) | def validSubarraySplit(self, nums: List[int]) -> int: FILE: Python/2466-count-ways-to-build-good-strings.py class Solution (line 3) | class Solution: method countGoodStrings (line 4) | def countGoodStrings(self, low: int, high: int, zero: int, one: int) -... FILE: Python/2467-most-profitable-path-in-a-tree.py class Solution (line 7) | class Solution: method __init__ (line 8) | def __init__(self): method mostProfitablePath (line 13) | def mostProfitablePath(self, edges: List[List[int]], bob: int, amount:... method findBobPath (line 51) | def findBobPath(self, currNode, time): FILE: Python/2470-number-of-subarrays-with-lcm-equal-to-k.py class Solution (line 6) | class Solution: method subarrayLCM (line 7) | def subarrayLCM(self, nums: List[int], k: int) -> int: FILE: Python/2471-minimum-number-of-operations-to-sort-a-binary-tree-by-level.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, val=0, left=None, right=None): class Solution (line 14) | class Solution: method minimumOperations (line 15) | def minimumOperations(self, root: Optional[TreeNode]) -> int: method getMinSwaps (line 31) | def getMinSwaps(self, original: list) -> int: FILE: Python/2473-minimum-cost-to-buy-apples.py class Solution (line 8) | class Solution: method minCost (line 9) | def minCost(self, n: int, roads: List[List[int]], appleCost: List[int]... FILE: Python/2482-difference-between-ones-and-zeros-in-row-and-column.py class Solution (line 4) | class Solution(object): method onesMinusZeros (line 5) | def onesMinusZeros(self, grid): FILE: Python/2483-minimum-penalty-for-a-shop.py class Solution (line 2) | class Solution: method bestClosingTime (line 3) | def bestClosingTime(self, customers: str) -> int: FILE: Python/2485-find-the-pivot-integer.py class Solution (line 3) | class Solution: method pivotInteger (line 4) | def pivotInteger(self, n: int) -> int: FILE: Python/2486-append-characters-to-string-to-make-subsequence.py class Solution (line 3) | class Solution: method appendCharacters (line 4) | def appendCharacters(self, s: str, t: str) -> int: FILE: Python/2487-remove-nodes-from-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method removeNodes (line 13) | def removeNodes(self, head: Optional[ListNode]) -> Optional[ListNode]: FILE: Python/2490-circular-sentence.py class Solution (line 3) | class Solution: method isCircularSentence (line 4) | def isCircularSentence(self, sentence: str) -> bool: FILE: Python/2491-divide-players-into-teams-of-equal-skill.py class Solution (line 6) | class Solution: method dividePlayers (line 7) | def dividePlayers(self, skill: List[int]) -> int: FILE: Python/2492-minimum-score-of-a-path-between-two-cities.py class Solution (line 7) | class Solution: method minScore (line 8) | def minScore(self, n: int, roads: List[List[int]]) -> int: FILE: Python/2493-divide-nodes-into-the-maximum-number-of-groups.py class Solution (line 7) | class Solution: method magnificentSets (line 8) | def magnificentSets(self, n: int, edges: List[List[int]]) -> int: method getNumberOfGroups (line 29) | def getNumberOfGroups(self, adjList, src_node, n): method find (line 52) | def find(self, node, parent): method union (line 57) | def union(self, node1, node2, parent, depth): FILE: Python/2501-longest-square-streak-in-an-array.py class Solution (line 6) | class Solution: method longestSquareStreak (line 7) | def longestSquareStreak(self, nums: List[int]) -> int: FILE: Python/2503-maximum-number-of-points-from-grid-queries.py class Solution (line 7) | class Solution: method maxPoints (line 8) | def maxPoints(self, grid: List[List[int]], queries: List[int]) -> List... FILE: Python/2505-bitwise-or-of-all-subsequence-sums.py class Solution (line 6) | class Solution: method subsequenceSumOr (line 7) | def subsequenceSumOr(self, nums: List[int]) -> int: FILE: Python/2507-smallest-value-after-replacing-with-sum-of-prime-factors.py class Solution (line 3) | class Solution: method smallestValue (line 4) | def smallestValue(self, n: int) -> int: FILE: Python/2516-take-k-of-each-character-from-left-and-right.py class Solution (line 3) | class Solution: method takeCharacters (line 4) | def takeCharacters(self, s: str, k: int) -> int: FILE: Python/2521-distinct-prime-factors-of-product-of-array.py class Solution (line 7) | class Solution: method distinctPrimeFactors (line 8) | def distinctPrimeFactors(self, nums: List[int]) -> int: FILE: Python/2523-closest-prime-numbers-in-range.py class Solution (line 6) | class Solution: method seive (line 7) | def seive(self, upperBound): method closestPrimes (line 16) | def closestPrimes(self, left: int, right: int) -> List[int]: FILE: Python/2526-find-consecutive-integers-from-a-data-stream.py class DataStream (line 3) | class DataStream: method __init__ (line 4) | def __init__(self, value: int, k: int): method consec (line 9) | def consec(self, num: int) -> bool: FILE: Python/2527-find-xor-beauty-of-array.py class Solution (line 4) | class Solution: method xorBeauty (line 5) | def xorBeauty(self, nums: List[int]) -> int: FILE: Python/2528-maximize-the-minimum-powered-city.py class Solution (line 6) | class Solution: method maxPower (line 7) | def maxPower(self, stations: List[int], r: int, k: int) -> int: FILE: Python/2529-maximum-count-of-positive-integer-and-negative-integer.py class Solution (line 7) | class Solution: method maximumCount (line 8) | def maximumCount(self, nums: List[int]) -> int: FILE: Python/2530-maximal-score-after-applying-k-operations.py class Solution (line 8) | class Solution: method maxKelements (line 9) | def maxKelements(self, nums: List[int], k: int) -> int: FILE: Python/2536-increment-submatrices-by-one.py class Solution (line 6) | class Solution: method rangeAddQueries (line 7) | def rangeAddQueries(self, n: int, queries: List[List[int]]) -> List[Li... FILE: Python/2537-count-the-number-of-good-subarrays.py class Solution (line 7) | class Solution: method countGood (line 8) | def countGood(self, nums: List[int], k: int) -> int: FILE: Python/2539-count-the-number-of-good-subsequences.py class Solution (line 6) | class Solution: method countGoodSubsequences (line 7) | def countGoodSubsequences(self, s: str) -> int: FILE: Python/2540-minimum-common-value.py class Solution (line 6) | class Solution: method getCommon (line 7) | def getCommon(self, nums1: List[int], nums2: List[int]) -> int: FILE: Python/2542-maximum-subsequence-score.py class Solution (line 7) | class Solution: method maxScore (line 8) | def maxScore(self, nums1: List[int], nums2: List[int], k: int) -> int: FILE: Python/2545-sort-the-students-by-their-kth-score.py class Solution (line 6) | class Solution: method sortTheStudents (line 7) | def sortTheStudents(self, score: List[List[int]], k: int) -> List[List... FILE: Python/2551-put-marbles-in-bags.py class Solution (line 6) | class Solution: method putMarbles (line 7) | def putMarbles(self, weights: List[int], k: int) -> int: FILE: Python/2554-maximum-number-of-integers-to-choose-from-a-range-i.py class Solution (line 6) | class Solution: method maxCount (line 7) | def maxCount(self, banned: List[int], n: int, maxSum: int) -> int: FILE: Python/2558-take-gifts-from-the-richest-pile.py class Solution (line 8) | class Solution: method pickGifts (line 9) | def pickGifts(self, gifts: List[int], k: int) -> int: FILE: Python/2559-count-vowel-strings-in-ranges.py class Solution (line 4) | class Solution: method vowelStrings (line 5) | def vowelStrings(self, words: List[str], queries: List[List[int]]) -> ... FILE: Python/2560-house-robber-iv.py class Solution (line 6) | class Solution: method minCapability (line 7) | def minCapability(self, nums: List[int], k: int) -> int: FILE: Python/2561-rearranging-fruits.py class Solution (line 7) | class Solution: method minCost (line 8) | def minCost(self, basket1: List[int], basket2: List[int]) -> int: FILE: Python/2563-count-the-number-of-fair-pairs.py class Solution (line 6) | class Solution: method countFairPairs (line 7) | def countFairPairs(self, nums: List[int], lower: int, upper: int) -> int: method lowerBound (line 11) | def lowerBound(self, nums: List[int], value: int) -> int: FILE: Python/2566-maximum-difference-by-remapping-a-digit.py class Solution (line 3) | class Solution: method minMaxDifference (line 4) | def minMaxDifference(self, num: int) -> int: FILE: Python/2570-merge-two-2d-arrays-by-summing-values.py class Solution (line 7) | class Solution: method mergeArrays (line 8) | def mergeArrays(self, nums1: List[List[int]], nums2: List[List[int]]) ... FILE: Python/2575-find-the-divisibility-array-of-a-string.py class Solution (line 6) | class Solution: method divisibilityArray (line 7) | def divisibilityArray(self, word: str, m: int) -> List[int]: FILE: Python/2577-minimum-time-to-visit-a-cell-in-a-grid.py class Solution (line 7) | class Solution: method minimumTime (line 8) | def minimumTime(self, grid: List[List[int]]) -> int: FILE: Python/2579-count-total-number-of-colored-cells.py class Solution (line 3) | class Solution: method coloredCells (line 4) | def coloredCells(self, n: int) -> int: FILE: Python/2582-pass-the-pillow.py class Solution (line 3) | class Solution: method passThePillow (line 4) | def passThePillow(self, n, time): FILE: Python/2583-kth-largest-sum-in-a-binary-tree.py class TreeNode (line 5) | class TreeNode: method __init__ (line 6) | def __init__(self, val=0, left=None, right=None): class Solution (line 12) | class Solution: method kthLargestLevelSum (line 13) | def kthLargestLevelSum(self, root: Optional[TreeNode], k: int) -> int: FILE: Python/2587-rearrange-array-to-maximize-prefix-score.py class Solution (line 6) | class Solution: method maxScore (line 7) | def maxScore(self, nums: List[int]) -> int: FILE: Python/2592-maximize-greatness-of-an-array.py class Solution (line 6) | class Solution: method maximizeGreatness (line 7) | def maximizeGreatness(self, nums: List[int]) -> int: FILE: Python/2593-find-score-of-an-array-after-marking-all-elements.py class Solution (line 7) | class Solution: method findScore (line 8) | def findScore(self, nums: List[int]) -> int: FILE: Python/2594-minimum-time-to-repair-cars.py class Solution (line 7) | class Solution: method repairCars (line 8) | def repairCars(self, ranks: List[int], cars: int) -> int: FILE: Python/2596-check-knight-tour-configuration.py class Solution (line 6) | class Solution: method checkValidGrid (line 7) | def checkValidGrid(self, grid: List[List[int]]) -> bool: FILE: Python/2597-the-number-of-beautiful-subsets.py class Solution (line 7) | class Solution: method dfs (line 8) | def dfs(self, nums: List[int], idx: int, k: int, mp: defaultdict) -> int: method beautifulSubsets (line 19) | def beautifulSubsets(self, nums: List[int], k: int) -> int: FILE: Python/2598-smallest-missing-non-negative-integer-after-operations.py class Solution (line 6) | class Solution: method findSmallestInteger (line 7) | def findSmallestInteger(self, nums: List[int], value: int) -> int: FILE: Python/2599-make-the-prefix-sum-non-negative.py class Solution (line 7) | class Solution: method makePrefSumNonNegative (line 8) | def makePrefSumNonNegative(self, nums: List[int]) -> int: FILE: Python/2601-prime-subtraction-operation.py class Solution (line 7) | class Solution: method isprime (line 8) | def isprime(self, n): method primeSubOperation (line 14) | def primeSubOperation(self, nums: List[int]) -> bool: FILE: Python/2602-minimum-operations-to-make-all-array-elements-equal.py class Solution (line 6) | class Solution: method minOperations (line 7) | def minOperations(self, nums: List[int], queries: List[int]) -> List[i... FILE: Python/2606-find-the-substring-with-maximum-cost.py class Solution (line 7) | class Solution: method maximumCostSubstring (line 8) | def maximumCostSubstring(self, s: str, chars: str, vals: List[int]) ->... FILE: Python/2610-convert-an-array-into-a-2d-array-with-conditions.py class Solution (line 5) | class Solution: method findMatrix (line 6) | def findMatrix(self, nums: List[int]) -> List[List[int]]: FILE: Python/2616-minimize-the-maximum-difference-of-pairs.py class Solution (line 6) | class Solution: method minimizeMax (line 7) | def minimizeMax(self, nums: List[int], p: int) -> int: FILE: Python/2640-find-the-score-of-all-prefixes-of-an-array.py class Solution (line 6) | class Solution: method findPrefixScore (line 7) | def findPrefixScore(self, nums: List[int]) -> List[int]: FILE: Python/2641-cousins-in-binary-tree-ii.py class TreeNode (line 4) | class TreeNode: method __init__ (line 5) | def __init__(self, val=0, left=None, right=None): class Solution (line 11) | class Solution: method __init__ (line 12) | def __init__(self): method replaceValueInTree (line 15) | def replaceValueInTree(self, root): method calculateLevelSum (line 20) | def calculateLevelSum(self, node, level): method replaceValueInTreeInternal (line 27) | def replaceValueInTreeInternal(self, node, siblingSum, level): FILE: Python/2642-design-graph-with-shortest-path-calculator.py class Graph (line 8) | class Graph: method __init__ (line 10) | def __init__(self, n: int, edges: List[List[int]]): method addEdge (line 15) | def addEdge(self, edge: List[int]) -> None: method shortestPath (line 19) | def shortestPath(self, node1: int, node2: int) -> int: FILE: Python/2645-minimum-additions-to-make-valid-string.py class Solution (line 3) | class Solution: method addMinimum (line 4) | def addMinimum(self, word: str) -> int: FILE: Python/2654-minimum-number-of-operations-to-make-all-array-elements-equal-to-1.py class Solution (line 7) | class Solution: method minOperations (line 8) | def minOperations(self, nums: List[int]) -> int: FILE: Python/2657-find-the-prefix-common-array-of-two-arrays.py class Solution (line 6) | class Solution: method findThePrefixCommonArray (line 7) | def findThePrefixCommonArray(self, A: List[int], B: List[int]) -> List... FILE: Python/2658-maximum-number-of-fish-in-a-grid.py class Solution (line 7) | class Solution: method findMaxFish (line 8) | def findMaxFish(self, grid: List[List[int]]) -> int: FILE: Python/2661-first-completely-painted-row-or-column.py class Solution (line 6) | class Solution: method firstCompleteIndex (line 7) | def firstCompleteIndex(self, arr: List[int], mat: List[List[int]]) -> ... FILE: Python/2664-the-knights-tour.py class Solution (line 4) | class Solution: method tourOfKnight (line 5) | def tourOfKnight(self, m, n, r, c): FILE: Python/2671-frequency-tracker.py class FrequencyTracker (line 6) | class FrequencyTracker: method __init__ (line 7) | def __init__(self): method add (line 11) | def add(self, number: int) -> None: method deleteOne (line 19) | def deleteOne(self, number: int) -> None: method hasFrequency (line 32) | def hasFrequency(self, frequency: int) -> bool: FILE: Python/2674-split-a-circular-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method splitCircularLinkedList (line 13) | def splitCircularLinkedList(self, list: Optional[ListNode]) -> List[Op... FILE: Python/2678-number-of-senior-citizens.py class Solution (line 6) | class Solution: method countSeniors (line 7) | def countSeniors(self, details: List[str]) -> int: FILE: Python/2679-sum-in-a-matrix.py class Solution (line 6) | class Solution: method matrixSum (line 7) | def matrixSum(self, nums: List[List[int]]) -> int: FILE: Python/2683-neighboring-bitwise-xor.py class Solution (line 6) | class Solution: method doesValidArrayExist (line 7) | def doesValidArrayExist(self, derived: List[int]) -> bool: FILE: Python/2684-maximum-number-of-moves-in-a-grid.py class Solution (line 7) | class Solution: method maxMoves (line 8) | def maxMoves(self, grid: List[List[int]]) -> int: FILE: Python/2685-count-the-number-of-complete-components.py class UnionFind (line 7) | class UnionFind: method __init__ (line 8) | def __init__(self, size): method find (line 12) | def find(self, node): method union (line 18) | def union(self, x, y): class Solution (line 33) | class Solution: method countCompleteComponents (line 34) | def countCompleteComponents(self, n: int, edges: List[List[int]]) -> int: FILE: Python/2696-minimum-string-length-after-removing-substrings.py class Solution (line 3) | class Solution: method minLength (line 4) | def minLength(self, s: str) -> int: FILE: Python/2698-find-the-punishment-number-of-an-integer.py class Solution (line 3) | class Solution: method punishmentNumber (line 4) | def punishmentNumber(self, n: int) -> int: FILE: Python/2699-modify-graph-edge-weights.py class Solution (line 8) | class Solution: method modifiedGraphEdges (line 9) | def modifiedGraphEdges( method dijkstra (line 51) | def dijkstra( FILE: Python/2706-buy-two-chocolates.py class Solution (line 6) | class Solution: method buyChoco (line 7) | def buyChoco(self, prices: List[int], money: int) -> int: FILE: Python/2707-extra-characters-in-a-string.py class Solution (line 7) | class Solution: method minExtraChar (line 8) | def minExtraChar(self, s: str, dictionary: List[str]) -> int: FILE: Python/2708-maximum-strength-of-a-group.py class Solution (line 7) | class Solution: method maxStrength (line 8) | def maxStrength(self, nums: List[int]) -> int: FILE: Python/2709-greatest-common-divisor-traversal.py class Solution (line 7) | class Solution: method dfs (line 8) | def dfs(self, index, visitedIndex, visitedPrime): method canTraverseAllPairs (line 22) | def canTraverseAllPairs(self, nums: List[int]) -> bool: FILE: Python/2711-difference-of-number-of-distinct-values-on-diagonals.py class Solution (line 7) | class Solution: method differenceOfDistinctValues (line 8) | def differenceOfDistinctValues(self, grid: List[List[int]]) -> List[Li... FILE: Python/2730-find-the-longest-semi-repetitive-substring.py class Solution (line 3) | class Solution: method longestSemiRepetitiveSubstring (line 4) | def longestSemiRepetitiveSubstring(self, s: str) -> int: FILE: Python/2734-lexicographically-smallest-string-after-substring-operation.py class Solution (line 3) | class Solution: method smallestString (line 4) | def smallestString(self, s: str) -> str: FILE: Python/2737-find-the-closest-marked-node.py class Solution (line 8) | class Solution: method minimumDistance (line 9) | def minimumDistance(self, n: int, edges: List[List[int]], s: int, mark... FILE: Python/2740-find-the-value-of-the-partition.py class Solution (line 6) | class Solution: method findValueOfPartition (line 7) | def findValueOfPartition(self, nums: List[int]) -> int: FILE: Python/2742-painting-the-walls.py class Solution (line 6) | class Solution: method paintWalls (line 7) | def paintWalls(self, cost: List[int], time: List[int]) -> int: FILE: Python/2743-count-substrings-without-repeating-character.py class Solution (line 3) | class Solution: method numberOfSpecialSubstrings (line 4) | def numberOfSpecialSubstrings(self, s: str) -> int: FILE: Python/2749-minimum-operations-to-make-the-integer-zero.py class Solution (line 3) | class Solution: method makeTheIntegerZero (line 4) | def makeTheIntegerZero(self, num1: int, num2: int) -> int: FILE: Python/2751-robot-collisions.py class Solution (line 6) | class Solution: method survivedRobotsHealths (line 7) | def survivedRobotsHealths(self, positions: List[int], healths: List[in... FILE: Python/2761-prime-pairs-with-target-sum.py class Solution (line 14) | class Solution(object): method findPrimePairs (line 15) | def findPrimePairs(self, n): FILE: Python/2762-continuous-subarrays.py class Solution (line 7) | class Solution: method continuousSubarrays (line 8) | def continuousSubarrays(self, nums: List[int]) -> int: FILE: Python/2770-maximum-number-of-jumps-to-reach-the-last-index.py class Solution (line 6) | class Solution: method maximumJumps (line 7) | def maximumJumps(self, nums: List[int], target: int) -> int: FILE: Python/2771-longest-non-decreasing-subarray-from-two-arrays.py class Solution (line 7) | class Solution: method maxNonDecreasingLength (line 8) | def maxNonDecreasingLength(self, nums1: List[int], nums2: List[int]) -... FILE: Python/2772-apply-operations-to-make-all-array-elements-equal-to-zero.py class Solution (line 6) | class Solution: method checkArray (line 7) | def checkArray(self, nums: List[int], k: int) -> bool: FILE: Python/2778-sum-of-squares-of-special-elements.py class Solution (line 1) | class Solution: method sumOfSquares (line 2) | def sumOfSquares(self, nums: List[int]) -> int: FILE: Python/2779-maximum-beauty-of-an-array-after-applying-operation.py class Solution (line 6) | class Solution: method maximumBeauty (line 7) | def maximumBeauty(self, nums: List[int], k: int) -> int: FILE: Python/2780-minimum-index-of-a-valid-split.py class Solution (line 7) | class Solution: method minimumIndex (line 8) | def minimumIndex(self, nums: List[int]) -> int: FILE: Python/2784-check-if-array-is-good.py class Solution (line 1) | class Solution: method isGood (line 2) | def isGood(self, nums: List[int]) -> bool: FILE: Python/2785-sort-vowels-in-a-string.py class Solution (line 6) | class Solution: method sortVowels (line 7) | def sortVowels(self, s: str) -> str: FILE: Python/2787-ways-to-express-an-integer-as-sum-of-powers.py class Solution (line 3) | class Solution: method numberOfWays (line 4) | def numberOfWays(self, n: int, x: int) -> int: FILE: Python/2788-split-strings-by-separator.py class Solution (line 1) | class Solution: method splitWordsBySeparator (line 2) | def splitWordsBySeparator(self, words: List[str], separator: str) -> L... FILE: Python/2789-largest-element-in-an-array-after-merge-operations.py class Solution (line 1) | class Solution: method maxArrayValue (line 2) | def maxArrayValue(self, nums: List[int]) -> int: FILE: Python/2798-number-of-employees-who-met-the-target.py class Solution (line 4) | class Solution: method numberOfEmployeesWhoMetTarget (line 5) | def numberOfEmployeesWhoMetTarget(self, hours: List[int], target: int)... FILE: Python/2799-count-complete-subarrays-in-an-array.py class Solution (line 6) | class Solution: method countCompleteSubarrays (line 7) | def countCompleteSubarrays(self, nums: List[int]) -> int: FILE: Python/2802-find-the-k-th-lucky-number.py class Solution (line 3) | class Solution: method kthLuckyNumber (line 4) | def kthLuckyNumber(self, k: int) -> str: FILE: Python/2806-account-balance-after-rounded-purchase.py class Solution (line 1) | class Solution: method accountBalanceAfterPurchase (line 2) | def accountBalanceAfterPurchase(self, purchaseAmount: int) -> int: FILE: Python/2807-insert-greatest-common-divisors-in-linked-list.py class Solution (line 6) | class Solution: method gcd (line 7) | def gcd(self, a: int, b: int) -> int: method insertGreatestCommonDivisors (line 12) | def insertGreatestCommonDivisors(self, head: Optional[ListNode]) -> Op... FILE: Python/2810-faulty-keyboard.py class Solution (line 1) | class Solution: method finalString (line 2) | def finalString(self, s: str) -> str: FILE: Python/2811-check-if-it-is-possible-to-split-array.py class Solution (line 4) | class Solution: method canSplitArray (line 5) | def canSplitArray(self, nums: List[int], m: int) -> bool: FILE: Python/2812-find-the-safest-path-in-a-grid.py class Solution (line 7) | class Solution: method maximumSafenessFactor (line 11) | def maximumSafenessFactor(self, grid: List[List[int]]) -> int: method isValidCell (line 45) | def isValidCell(self, grid, i, j) -> bool: method isValidSafeness (line 49) | def isValidSafeness(self, grid, minSafeness) -> bool: FILE: Python/2814-minimum-time-takes-to-reach-destination-without-drowning.py class Solution (line 7) | class Solution: method minimumSeconds (line 8) | def minimumSeconds(self, land: List[List[str]]) -> int: FILE: Python/2816-double-a-number-represented-as-a-linked-list.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method doubleIt (line 13) | def doubleIt(self, head: Optional[ListNode]) -> Optional[ListNode]: FILE: Python/2818-apply-operations-to-maximize-score.py class Solution (line 8) | class Solution: method maximumScore (line 11) | def maximumScore(self, nums: List[int], k: int) -> int: FILE: Python/2824-count-pairs-whose-sum-is-less-than-target.py class Solution (line 6) | class Solution: method countPairs (line 7) | def countPairs(self, nums: List[int], target: int) -> int: FILE: Python/2825-make-string-a-subsequence-using-cyclic-increments.py class Solution (line 3) | class Solution: method canMakeSubsequence (line 4) | def canMakeSubsequence(self, str1: str, str2: str) -> bool: FILE: Python/2829-determine-the-minimum-sum-of-a-k-avoiding-array.py class Solution (line 3) | class Solution: method minimumSum (line 4) | def minimumSum(self, n: int, k: int) -> int: FILE: Python/2832-maximal-range-that-each-element-is-maximum-in-it.py class Solution (line 6) | class Solution: method maximumLengthOfRanges (line 7) | def maximumLengthOfRanges(self, nums: List[int]) -> List[int]: FILE: Python/2833-furthest-point-from-origin.py class Solution (line 1) | class Solution: method furthestDistanceFromOrigin (line 2) | def furthestDistanceFromOrigin(self, moves: str) -> int: FILE: Python/2834-find-the-minimum-possible-sum-of-a-beautiful-array.py class Solution (line 1) | class Solution: method minimumPossibleSum (line 2) | def minimumPossibleSum(self, n: int, target: int) -> int: FILE: Python/2838-maximum-coins-heroes-can-collect.py class Solution (line 6) | class Solution: method maximumCoins (line 7) | def maximumCoins(self, heroes: List[int], monsters: List[int], coins: ... FILE: Python/2840-check-if-strings-can-be-made-equal-with-operations-ii.py class Solution (line 1) | class Solution: method checkStrings (line 2) | def checkStrings(self, s1: str, s2: str) -> bool: FILE: Python/2841-maximum-sum-of-almost-unique-subarray.py class Solution (line 5) | class Solution: method maxSum (line 6) | def maxSum(self, nums: List[int], m: int, k: int) -> int: FILE: Python/2843-count-symmetric-integers.py class Solution (line 1) | class Solution: method countSymmetricIntegers (line 2) | def countSymmetricIntegers(self, low: int, high: int) -> int: FILE: Python/2845-count-of-interesting-subarrays.py class Solution (line 6) | class Solution: method countInterestingSubarrays (line 7) | def countInterestingSubarrays(self, nums: List[int], modulo: int, k: i... FILE: Python/2849-determine-if-a-cell-is-reachable-at-a-given-time.py class Solution (line 4) | class Solution: method isReachableAtTime (line 5) | def isReachableAtTime(self, sx: int, sy: int, fx: int, fy: int, t: int... FILE: Python/2850-minimum-moves-to-spread-stones-over-grid.py class Solution (line 6) | class Solution: method minimumMoves (line 7) | def minimumMoves(self, grid: List[List[int]]) -> int: FILE: Python/2852-sum-of-remoteness-of-all-cells.py class Solution (line 7) | class Solution: method sumRemoteness (line 8) | def sumRemoteness(self, grid: List[List[int]]) -> int: FILE: Python/2856-minimum-array-length-after-pair-removals.py class Solution (line 6) | class Solution: method minLengthAfterRemovals (line 7) | def minLengthAfterRemovals(self, nums: List[int]) -> int: FILE: Python/2864-maximum-odd-binary-number.py class Solution (line 3) | class Solution: method maximumOddBinaryNumber (line 4) | def maximumOddBinaryNumber(self, s: str) -> str: FILE: Python/2865-beautiful-towers-i.py class Solution (line 6) | class Solution: method maximumSumOfHeights (line 7) | def maximumSumOfHeights(self, heights: List[int]) -> int: FILE: Python/2870-minimum-number-of-operations-to-make-array-empty.py class Solution (line 8) | class Solution: method minOperations (line 9) | def minOperations(self, nums: List[int]) -> int: FILE: Python/2872-maximum-number-of-k-divisible-components.py class Solution (line 6) | class Solution: method maxKDivisibleComponents (line 7) | def maxKDivisibleComponents(self, n: int, edges: List[List[int]], valu... method dfs (line 18) | def dfs(self, currNode: int, parentNode: int, adjList: List[List[int]], FILE: Python/2873-maximum-value-of-an-ordered-triplet-i.py class Solution (line 6) | class Solution: method maximumTripletValue (line 7) | def maximumTripletValue(self, nums: List[int]) -> int: FILE: Python/2874-maximum-value-of-an-ordered-triplet-ii.py class Solution (line 6) | class Solution: method maximumTripletValue (line 7) | def maximumTripletValue(self, nums: List[int]) -> int: FILE: Python/2877-create-a-dataframe-from-list.py function createDataframe (line 5) | def createDataframe(studentData: List[List[int]]) -> pd.DataFrame: FILE: Python/2878-get-the-size-of-a-dataframe.py function getDataframeSize (line 5) | def getDataframeSize(players: pd.DataFrame) -> List[int]: FILE: Python/2879-display-the-first-three-rows.py function selectFirstRows (line 3) | def selectFirstRows(employees: pd.DataFrame) -> pd.DataFrame: FILE: Python/2880-select-data.py function selectData (line 4) | def selectData(students: pd.DataFrame) -> pd.DataFrame: FILE: Python/2881-create-a-new-column.py function createBonusColumn (line 3) | def createBonusColumn(employees: pd.DataFrame) -> pd.DataFrame: FILE: Python/2882-drop-duplicate-rows.py function dropDuplicateEmails (line 3) | def dropDuplicateEmails(customers: pd.DataFrame) -> pd.DataFrame: FILE: Python/2883-drop-missing-data.py function dropMissingData (line 4) | def dropMissingData(students: pd.DataFrame) -> pd.DataFrame: FILE: Python/2884-modify-columns.py function modifySalaryColumn (line 3) | def modifySalaryColumn(employees: pd.DataFrame) -> pd.DataFrame: FILE: Python/2885-rename-columns.py function renameColumns (line 4) | def renameColumns(students: pd.DataFrame) -> pd.DataFrame: FILE: Python/2886-change-data-type.py function changeDatatype (line 4) | def changeDatatype(students: pd.DataFrame) -> pd.DataFrame: FILE: Python/2887-fill-missing-data.py function fillMissingValues (line 3) | def fillMissingValues(products: pd.DataFrame) -> pd.DataFrame: FILE: Python/2888-reshape-data-concatenate.py function concatenateTables (line 3) | def concatenateTables(df1: pd.DataFrame, df2: pd.DataFrame) -> pd.DataFr... FILE: Python/2889-reshape-data-pivot.py function pivotTable (line 4) | def pivotTable(weather: pd.DataFrame) -> pd.DataFrame: FILE: Python/2890-reshape-data-melt.py function meltTable (line 4) | def meltTable(report: pd.DataFrame) -> pd.DataFrame: FILE: Python/2891-method-chaining.py function findHeavyAnimals (line 4) | def findHeavyAnimals(animals: pd.DataFrame) -> pd.DataFrame: FILE: Python/2894-divisible-and-non-divisible-sums-difference.py class Solution (line 3) | class Solution: method differenceOfSums (line 4) | def differenceOfSums(self, n: int, m: int) -> int: FILE: Python/2895-minimum-processing-time.py class Solution (line 6) | class Solution: method minProcessingTime (line 7) | def minProcessingTime(self, processorTime: List[int], tasks: List[int]... FILE: Python/2900-longest-unequal-adjacent-groups-subsequence-i.py class Solution (line 6) | class Solution: method getLongestSubsequence (line 7) | def getLongestSubsequence(self, words: List[str], groups: List[int]) -... FILE: Python/2901-longest-unequal-adjacent-groups-subsequence-ii.py class Solution (line 6) | class Solution: method getWordsInLongestSubsequence (line 7) | def getWordsInLongestSubsequence(self, words: List[str], groups: List[... method check (line 33) | def check(self, s1: str, s2: str) -> bool: FILE: Python/2904-shortest-and-lexicographically-smallest-beautiful-string.py class Solution (line 3) | class Solution: method shortestBeautifulSubstring (line 4) | def shortestBeautifulSubstring(self, s: str, k: int) -> str: FILE: Python/2909-minimum-sum-of-mountain-triplets-ii.py class Solution (line 4) | class Solution: method minimumSum (line 5) | def minimumSum(self, nums: List[int]) -> int: FILE: Python/2914-minimum-number-of-changes-to-make-binary-string-beautiful.py class Solution (line 3) | class Solution: method minChanges (line 4) | def minChanges(self, s: str) -> int: FILE: Python/2918-minimum-equal-sum-of-two-arrays-after-replacing-zeros.py class Solution (line 6) | class Solution: method minSum (line 7) | def minSum(self, nums1: List[int], nums2: List[int]) -> int: FILE: Python/2923-find-champion-i.py class Solution (line 6) | class Solution: method findChampion (line 7) | def findChampion(self, grid: List[List[int]]) -> int: FILE: Python/2924-find-champion-ii.py class Solution (line 7) | class Solution: method findChampion (line 8) | def findChampion(self, n: int, edges: List[List[int]]) -> int: FILE: Python/2927-distribute-candies-among-children-iii.py class Solution (line 3) | class Solution: method distributeCandies (line 4) | def distributeCandies(self, n: int, limit: int) -> int: FILE: Python/2929-distribute-candies-among-children-ii.py class Solution (line 3) | class Solution: method distributeCandies (line 4) | def distributeCandies(self, n: int, limit: int) -> int: FILE: Python/2933-high-access-employees.py class Solution (line 7) | class Solution: method findHighAccessEmployees (line 8) | def findHighAccessEmployees(self, accessTimes: List[List[str]]) -> Lis... FILE: Python/2938-separate-black-and-white-balls.py class Solution (line 3) | class Solution: method minimumSteps (line 4) | def minimumSteps(self, s: str) -> int: FILE: Python/2940-find-building-where-alice-and-bob-can-meet.py class Solution (line 7) | class Solution: method leftmostBuildingQueries (line 8) | def leftmostBuildingQueries(self, heights: List[int], queries: List[Li... FILE: Python/2942-find-words-containing-character.py class Solution (line 6) | class Solution: method findWordsContaining (line 7) | def findWordsContaining(self, words: List[str], x: str) -> List[int]: FILE: Python/2943-maximize-area-of-square-hole-in-grid.py class Solution (line 6) | class Solution: method maximizeSquareHoleArea (line 7) | def maximizeSquareHoleArea( FILE: Python/2947-count-beautiful-substrings-i.py class Solution (line 3) | class Solution: method beautifulSubstrings (line 4) | def beautifulSubstrings(self, s: str, k: int) -> int: FILE: Python/2948-make-lexicographically-smallest-array-by-swapping-elements.py class Solution (line 7) | class Solution: method lexicographicallySmallestArray (line 8) | def lexicographicallySmallestArray(self, nums: List[int], limit: int) ... FILE: Python/2955-number-of-same-end-substrings.py class Solution (line 6) | class Solution: method sameEndSubstringCount (line 7) | def sameEndSubstringCount( FILE: Python/2957-remove-adjacent-almost-equal-characters.py class Solution (line 3) | class Solution: method removeAlmostEqualCharacters (line 4) | def removeAlmostEqualCharacters(self, word: str) -> int: FILE: Python/2958-length-of-longest-subarray-with-at-most-k-frequency.py class Solution (line 7) | class Solution: method maxSubarrayLength (line 8) | def maxSubarrayLength(self, nums: List[int], k: int) -> int: FILE: Python/2961-double-modular-exponentiation.py class Solution (line 6) | class Solution: method getGoodIndices (line 7) | def getGoodIndices(self, variables: List[List[int]], target: int) -> L... FILE: Python/2962-count-subarrays-where-max-element-appears-at-least-k-times.py class Solution (line 6) | class Solution: method countSubarrays (line 7) | def countSubarrays(self, nums: List[int], k: int) -> int: FILE: Python/2965-find-missing-and-repeated-values.py class Solution (line 7) | class Solution: method findMissingAndRepeatedValues (line 8) | def findMissingAndRepeatedValues(self, grid: List[List[int]]) -> List[... FILE: Python/2966-divide-array-into-arrays-with-max-difference.py class Solution (line 4) | class Solution: method divideArray (line 5) | def divideArray(self, nums: List[int], k: int) -> List[List[int]]: FILE: Python/2971-find-polygon-with-the-largest-perimeter.py class Solution (line 6) | class Solution: method largestPerimeter (line 7) | def largestPerimeter(self, nums: List[int]) -> int: FILE: Python/2975-maximum-square-area-by-removing-fences-from-a-field.py class Solution (line 6) | class Solution: method getEdges (line 7) | def getEdges(self, fences: List[int], border: int) -> set: method maximizeSquareArea (line 15) | def maximizeSquareArea( FILE: Python/2976-minimum-cost-to-convert-string-i.py class Solution (line 7) | class Solution: method minimumCost (line 8) | def minimumCost(self, source: str, target: str, method dijkstra (line 28) | def dijkstra( FILE: Python/2977-minimum-cost-to-convert-string-ii.py class Solution (line 8) | class Solution: method minimumCost (line 9) | def minimumCost(self, source: str, target: str, original: List[str], c... FILE: Python/2981-find-longest-special-substring-that-occurs-thrice-i.py class Solution (line 3) | class Solution: method maximumLength (line 4) | def maximumLength(self, s: str) -> int: FILE: Python/2997-minimum-number-of-operations-to-make-array-xor-equal-to-k.py class Solution (line 6) | class Solution: method minOperations (line 7) | def minOperations(self, nums: List[int], k: int) -> int: FILE: Python/2999-count-the-number-of-powerful-integers.py class Solution (line 3) | class Solution: method numberOfPowerfulInt (line 4) | def numberOfPowerfulInt( method calculate (line 11) | def calculate(self, x: str, s: str, limit: int) -> int: FILE: Python/3000-maximum-area-of-longest-diagonal-rectangle.py class Solution (line 7) | class Solution: method areaOfMaxDiagonal (line 8) | def areaOfMaxDiagonal(self, dimensions: List[List[int]]) -> int: FILE: Python/3003-maximize-the-number-of-partitions-after-operations.py class Solution (line 3) | class Solution: method maxPartitionsAfterOperations (line 4) | def maxPartitionsAfterOperations(self, s: str, k: int) -> int: FILE: Python/3005-count-elements-with-maximum-frequency.py class Solution (line 7) | class Solution: method maxFrequencyElements (line 8) | def maxFrequencyElements(self, nums: List[int]) -> int: FILE: Python/3006-find-beautiful-indices-in-the-given-array-i.py class Solution (line 7) | class Solution: method beautifulIndices (line 8) | def beautifulIndices(self, s: str, a: str, b: str, k: int) -> List[int]: FILE: Python/3010-divide-an-array-into-subarrays-with-minimum-cost-i.py class Solution (line 6) | class Solution: method minimumCost (line 7) | def minimumCost(self, nums: List[int]) -> int: FILE: Python/3011-find-if-array-can-be-sorted.py class Solution (line 6) | class Solution: method canSortArray (line 7) | def canSortArray(self, nums: List[int]) -> bool: FILE: Python/3013-divide-an-array-into-subarrays-with-minimum-cost-ii.py class Container (line 7) | class Container: method __init__ (line 8) | def __init__(self, k: int): method adjust (line 14) | def adjust(self): method add (line 27) | def add(self, x: int): method erase (line 35) | def erase(self, x: int): method sum (line 43) | def sum(self) -> int: class Solution (line 47) | class Solution: method minimumCost (line 48) | def minimumCost(self, nums: List[int], k: int, dist: int) -> int: FILE: Python/3016-minimum-number-of-pushes-to-type-word-ii.py class Solution (line 6) | class Solution: method minimumPushes (line 7) | def minimumPushes(self, words: str) -> int: FILE: Python/3020-find-the-maximum-number-of-elements-in-subset.py class Solution (line 7) | class Solution: method maximumLength (line 8) | def maximumLength(self, nums: List[int]) -> int: FILE: Python/3021-alice-and-bob-playing-flower-game.py class Solution (line 3) | class Solution: method flowerGame (line 4) | def flowerGame(self, n: int, m: int) -> int: FILE: Python/3024-type-of-triangle.py class Solution (line 6) | class Solution: method triangleType (line 7) | def triangleType(self, nums: List[int]) -> str: FILE: Python/3025-find-the-number-of-ways-to-place-people-i.py class Solution (line 6) | class Solution: method numberOfPairs (line 7) | def numberOfPairs(self, points: List[List[int]]) -> int: FILE: Python/3026-maximum-good-subarray-sum.py class Solution (line 7) | class Solution: method maximumSubarraySum (line 8) | def maximumSubarraySum(self, nums: List[int], k: int) -> int: FILE: Python/3027-find-the-number-of-ways-to-place-people-ii.py class Solution (line 6) | class Solution: method numberOfPairs (line 7) | def numberOfPairs(self, points: List[List[int]]) -> int: FILE: Python/3034-number-of-subarrays-that-match-a-pattern-i.py class Solution (line 4) | class Solution: method countMatchingSubarrays (line 5) | def countMatchingSubarrays(self, nums: List[int], pattern: List[int]) ... FILE: Python/3039-apply-operations-to-make-string-empty.py class Solution (line 6) | class Solution: method lastNonEmptyString (line 7) | def lastNonEmptyString(self, s: str) -> str: FILE: Python/3042-count-prefix-and-suffix-pairs-i.py class Solution (line 6) | class Solution: method countPrefixSuffixPairs (line 7) | def countPrefixSuffixPairs(self, words: List[str]) -> int: FILE: Python/3043-find-the-length-of-the-longest-common-prefix.py class Solution (line 6) | class Solution: method longestCommonPrefix (line 7) | def longestCommonPrefix(self, arr1: List[int], arr2: List[int]) -> int: FILE: Python/3047-find-the-largest-area-of-square-inside-two-rectangles.py class Solution (line 7) | class Solution: method largestSquareArea (line 8) | def largestSquareArea(self, bottomLeft: List[List[int]], topRight: Lis... FILE: Python/3062-winner-of-the-linked-list-game.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method gameResult (line 13) | def gameResult(self, head: Optional[ListNode]) -> str: FILE: Python/3063-linked-list-frequency.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method frequenciesOfElements (line 13) | def frequenciesOfElements(self, head: Optional[ListNode]) -> Optional[... FILE: Python/3066-minimum-operations-to-exceed-threshold-value-ii.py class Solution (line 7) | class Solution: method minOperations (line 8) | def minOperations(self, nums: List[int], k: int) -> int: FILE: Python/3068-find-the-maximum-sum-of-node-values.py class Solution (line 6) | class Solution: method maximumValueSum (line 7) | def maximumValueSum(self, nums: List[int], k: int, edges: List[List[in... FILE: Python/3070-count-submatrices-with-top-left-element-and-sum-less-than-k.py class Solution (line 6) | class Solution: method countSubmatrices (line 7) | def countSubmatrices(self, grid: List[List[int]], k: int) -> int: FILE: Python/3074-apple-redistribution-into-boxes.py class Solution (line 6) | class Solution: method minimumBoxes (line 7) | def minimumBoxes(self, apple: List[int], capacity: List[int]) -> int: FILE: Python/3075-maximize-happiness-of-selected-children.py class Solution (line 6) | class Solution: method maximumHappinessSum (line 7) | def maximumHappinessSum(self, happiness: List[int], k: int) -> int: FILE: Python/3084-count-substrings-starting-and-ending-with-given-character.py class Solution (line 3) | class Solution: method countSubstrings (line 4) | def countSubstrings(self, s: str, c: str) -> int: FILE: Python/3085-minimum-deletions-to-make-string-k-special.py class Solution (line 6) | class Solution: method minimumDeletions (line 7) | def minimumDeletions(self, word: str, k: int) -> int: FILE: Python/3091-apply-operations-to-make-sum-of-array-greater-than-or-equal-to-k.py class Solution (line 6) | class Solution: method minOperations (line 7) | def minOperations(self, k: int) -> int: FILE: Python/3095-shortest-subarray-with-or-at-least-k-i.py class Solution (line 6) | class Solution: method minimumSubarrayLength (line 7) | def minimumSubarrayLength(self, nums: List[int], k: int) -> int: FILE: Python/3096-minimum-levels-to-gain-more-points.py class Solution (line 6) | class Solution: method minimumLevels (line 7) | def minimumLevels(self, possible: List[int]) -> int: FILE: Python/3097-shortest-subarray-with-or-at-least-k-ii.py class Solution (line 6) | class Solution: method minimumSubarrayLength (line 7) | def minimumSubarrayLength(self, nums: List[int], k: int) -> int: method updateBitCounts (line 22) | def updateBitCounts(self, bitCounts: list, number: int, delta: int) ->... method converBitsToNum (line 27) | def converBitsToNum(self, bitCounts: list): FILE: Python/3100-water-bottles-ii.py class Solution (line 3) | class Solution: method maxBottlesDrunk (line 4) | def maxBottlesDrunk(self, numBottles: int, numExchange: int) -> int: FILE: Python/3101-count-alternating-subarrays.py class Solution (line 6) | class Solution: method countAlternatingSubarrays (line 7) | def countAlternatingSubarrays(self, nums: List[int]) -> int: FILE: Python/3105-longest-strictly-increasing-or-strictly-decreasing-subarray.py class Solution (line 6) | class Solution: method longestMonotonicSubarray (line 7) | def longestMonotonicSubarray(self, nums: List[int]) -> int: FILE: Python/3106-lexicographically-smallest-string-after-operations-with-constraint.py class Solution (line 3) | class Solution: method getSmallestString (line 4) | def getSmallestString(self, s: str, k: int) -> str: FILE: Python/3108-minimum-cost-walk-in-weighted-graph.py class Solution (line 6) | class Solution: method minimumCost (line 7) | def minimumCost(self, n: int, edges: List[List[int]], query: List[List... FILE: Python/3110-score-of-a-string.py class Solution (line 3) | class Solution: method scoreOfString (line 4) | def scoreOfString(self, s: str) -> int: FILE: Python/3111-minimum-rectangles-to-cover-points.py class Solution (line 7) | class Solution: method minRectanglesToCoverPoints (line 8) | def minRectanglesToCoverPoints(self, points: List[List[int]], w: int) ... FILE: Python/3115-maximum-prime-difference.py class Solution (line 6) | class Solution: method maximumPrimeDifference (line 7) | def maximumPrimeDifference(self, nums: List[int]) -> int: FILE: Python/3121-count-the-number-of-special-characters-ii.py class Solution (line 6) | class Solution: method numberOfSpecialChars (line 7) | def numberOfSpecialChars(self, word: str) -> int: FILE: Python/3128-right-triangles.py class Solution (line 7) | class Solution: method numberOfRightTriangles (line 8) | def numberOfRightTriangles(self, grid: List[List[int]]) -> int: FILE: Python/3133-minimum-array-end.py class Solution (line 3) | class Solution: method minEnd (line 4) | def minEnd(self, n: int, x: int) -> int: FILE: Python/3136-valid-word.py class Solution (line 3) | class Solution: method isValid (line 4) | def isValid(self, word: str) -> bool: FILE: Python/3137-minimum-number-of-operations-to-make-word-k-periodic.py class Solution (line 6) | class Solution: method minimumOperationsToMakeKPeriodic (line 7) | def minimumOperationsToMakeKPeriodic(self, word: str, k: int) -> int: FILE: Python/3147-taking-maximum-energy-from-the-mystic-dungeon.py class Solution (line 6) | class Solution: method maximumEnergy (line 7) | def maximumEnergy(self, energy: List[int], k: int) -> int: FILE: Python/3151-special-array-i.py class Solution (line 6) | class Solution: method isArraySpecial (line 7) | def isArraySpecial(self, nums: List[int]) -> bool: FILE: Python/3152-special-array-ii.py class Solution (line 6) | class Solution: method isArraySpecial (line 7) | def isArraySpecial(self, nums: List[int], queries: List[List[int]]) ->... FILE: Python/3155-maximum-number-of-upgradable-servers.py class Solution (line 6) | class Solution: method maxUpgrades (line 7) | def maxUpgrades(self, countList: List[int], upgradeList: List[int], se... FILE: Python/3159-find-occurrences-of-an-element-in-an-array.py class Solution (line 7) | class Solution: method occurrencesOfElement (line 8) | def occurrencesOfElement(self, nums: List[int], queries: List[int], x:... FILE: Python/3160-find-the-number-of-distinct-colors-among-the-balls.py class Solution (line 7) | class Solution: method queryResults (line 8) | def queryResults(self, limit: int, queries: List[List[int]]) -> List[i... FILE: Python/3163-string-compression-iii.py class Solution (line 3) | class Solution: method compressedString (line 4) | def compressedString(self, word: str) -> str: FILE: Python/3169-count-days-without-meetings.py class Solution (line 6) | class Solution: method countDays (line 7) | def countDays(self, days: int, meetings: List[List[int]]) -> int: FILE: Python/3170-lexicographically-minimum-string-after-removing-stars.py class Solution (line 6) | class Solution: method clearStars (line 7) | def clearStars(self, s: str) -> str: FILE: Python/3174-clear-digits.py class Solution (line 3) | class Solution: method clearDigits (line 4) | def clearDigits(self, s: str) -> str: FILE: Python/3175-find-the-first-player-to-win-k-games-in-a-row.py class Solution (line 6) | class Solution: method findWinningPlayer (line 7) | def findWinningPlayer(self, skills: List[int], k: int) -> int: FILE: Python/3176-find-the-maximum-length-of-a-good-subsequence-i.py class Solution (line 6) | class Solution: method maximumLength (line 7) | def maximumLength(self, nums: List[int], k: int) -> int: FILE: Python/3177-find-the-maximum-length-of-a-good-subsequence-ii.py class Solution (line 6) | class Solution: method maximumLength (line 7) | def maximumLength(self, nums: List[int], k: int) -> int: FILE: Python/3179-find-the-n-th-value-after-k-seconds.py class Solution (line 3) | class Solution: method valueAfterKSeconds (line 4) | def valueAfterKSeconds(self, n: int, k: int) -> int: FILE: Python/3186-maximum-total-damage-with-spell-casting.py class Solution (line 6) | class Solution: method maximumTotalDamage (line 7) | def maximumTotalDamage(self, power: List[int]) -> int: FILE: Python/3189-minimum-moves-to-get-a-peaceful-board.py class Solution (line 6) | class Solution: method minMoves (line 7) | def minMoves(self, rooks: List[List[int]]) -> int: FILE: Python/3190-find-minimum-operations-to-make-all-elements-divisible-by-three.py class Solution (line 4) | class Solution: method minimumOperations (line 5) | def minimumOperations(self, nums: List[int]) -> int: FILE: Python/3191-minimum-operations-to-make-binary-array-elements-equal-to-one-i.py class Solution (line 6) | class Solution: method minOperations (line 7) | def minOperations(self, nums: List[int]) -> int: FILE: Python/3192-minimum-operations-to-make-binary-array-elements-equal-to-one-ii.py class Solution (line 6) | class Solution: method minOperations (line 7) | def minOperations(self, nums: List[int]) -> int: FILE: Python/3195-find-the-minimum-area-to-cover-all-ones-i.py class Solution (line 6) | class Solution: method minimumArea (line 7) | def minimumArea(self, grid: List[List[int]]) -> int: FILE: Python/3197-find-the-minimum-area-to-cover-all-ones-ii.py class Solution (line 7) | class Solution: method minimumSum2 (line 8) | def minimumSum2( method rotate (line 30) | def rotate(self, vec: List[List[int]]) -> List[List[int]]: method solve (line 41) | def solve(self, grid: List[List[int]]) -> int: method minimumSum (line 73) | def minimumSum(self, grid: List[List[int]]) -> int: FILE: Python/3201-find-the-maximum-length-of-valid-subsequence-i.py class Solution (line 6) | class Solution: method maximumLength (line 7) | def maximumLength(self, nums: List[int]) -> int: FILE: Python/3202-find-the-maximum-length-of-valid-subsequence-ii.py class Solution (line 6) | class Solution: method maximumLength (line 7) | def maximumLength(self, nums: List[int], k: int) -> int: FILE: Python/3203-find-minimum-diameter-after-merging-two-trees.py class Solution (line 8) | class Solution: method minimumDiameterAfterMerge (line 9) | def minimumDiameterAfterMerge(self, edges1: List[List[int]], edges2: L... method buildAdjList (line 24) | def buildAdjList(self, size, edges): method findDiameter (line 31) | def findDiameter(self, n, adjList): method findFarthestNode (line 37) | def findFarthestNode(self, n, adjList, sourceNode): FILE: Python/3208-alternating-groups-ii.py class Solution (line 6) | class Solution: method numberOfAlternatingGroups (line 7) | def numberOfAlternatingGroups(self, colors: List[int], k: int) -> int: FILE: Python/3211-generate-binary-strings-without-adjacent-zeros.py class Solution (line 6) | class Solution: method validStrings (line 7) | def validStrings(self, n: int) -> List[str]: FILE: Python/3217-delete-nodes-from-linked-list-present-in-array.py class ListNode (line 6) | class ListNode: method __init__ (line 7) | def __init__(self, val=0, next=None): class Solution (line 12) | class Solution: method modifiedList (line 13) | def modifiedList(self, nums: List[int], head: Optional[ListNode]) -> O... FILE: Python/3223-minimum-length-of-string-after-operations.py class Solution (line 6) | class Solution: method minimumLength (line 7) | def minimumLength(self, s: str) -> int: FILE: Python/3227-vowels-game-in-a-string.py class Solution (line 3) | class Solution: method doesAliceWin (line 4) | def doesAliceWin(self, s: str) -> bool: FILE: Python/3228-maximum-number-of-operations-to-move-ones-to-the-end.py class Solution (line 4) | class Solution: method maxOperations (line 5) | def maxOperations(self, s: str) -> int: FILE: Python/3233-find-the-count-of-numbers-which-are-not-special.py class Solution (line 6) | class Solution: method nonSpecialCount (line 7) | def nonSpecialCount(self, l: int, r: int) -> int: FILE: Python/3234-count-the-number-of-substrings-with-dominant-ones.py class Solution (line 3) | class Solution: method numberOfSubstrings (line 4) | def numberOfSubstrings(self, s: str) -> int: FILE: Python/3239-minimum-number-of-flips-to-make-binary-grid-palindromic-i.py class Solution (line 6) | class Solution: method minFlips (line 7) | def minFlips(self, grid: List[List[int]]) -> int: FILE: Python/3243-shortest-distance-after-road-addition-queries-i.py class Solution (line 7) | class Solution: method bfs (line 9) | def bfs(self, n: int, adj_list: List[List[int]]) -> int: method shortestDistanceAfterQueries (line 46) | def shortestDistanceAfterQueries( FILE: Python/3249-count-the-number-of-good-nodes.py class Solution (line 7) | class Solution: method countGoodNodes (line 8) | def countGoodNodes(self, edges: List[List[int]]) -> int: FILE: Python/3254-find-the-power-of-k-size-subarrays-i.py class Solution (line 6) | class Solution: method resultsArray (line 7) | def resultsArray(self, nums: List[int], k: int) -> List[int]: FILE: Python/3259-maximum-energy-boost-from-two-drinks.py class Solution (line 1) | class Solution: method maxEnergyBoost (line 2) | def maxEnergyBoost(self, energyDrinkA: List[int], energyDrinkB: List[i... method maxEnergyBoost (line 9) | def maxEnergyBoost(self, energyDrinkA: List[int], energyDrinkB: List[i... class Solution (line 8) | class Solution: method maxEnergyBoost (line 2) | def maxEnergyBoost(self, energyDrinkA: List[int], energyDrinkB: List[i... method maxEnergyBoost (line 9) | def maxEnergyBoost(self, energyDrinkA: List[int], energyDrinkB: List[i... FILE: Python/3264-final-array-state-after-k-multiplication-operations-i.py class Solution (line 6) | class Solution: method getFinalState (line 7) | def getFinalState(self, nums: List[int], k: int, multiplier: int) -> L... FILE: Python/3271-hash-divided-string.py class Solution (line 3) | class Solution: method stringHash (line 4) | def stringHash(self, s: str, k: int) -> str: FILE: Python/3272-find-the-count-of-good-integers.py class Solution (line 6) | class Solution: method countGoodIntegers (line 7) | def countGoodIntegers(self, n: int, k: int) -> int: FILE: Python/3275-k-th-nearest-obstacle-queries.py class Solution (line 7) | class Solution: method resultsArray (line 8) | def resultsArray(self, queries: List[List[int]], k: int) -> List[int]: FILE: Python/3280-convert-date-to-binary.py class Solution (line 1) | class Solution: method convertDateToBinary (line 2) | def convertDateToBinary(self, date: str) -> str: FILE: Python/3281-maximize-score-of-numbers-in-ranges.py class Solution (line 6) | class Solution: method maxPossibleScore (line 7) | def maxPossibleScore(self, start: List[int], d: int) -> int: FILE: Python/3282-reach-end-of-array-with-max-score.py class Solution (line 6) | class Solution: method findMaximumScore (line 7) | def findMaximumScore(self, nums: List[int]) -> int: FILE: Python/3285-find-indices-of-stable-mountains.py class Solution (line 6) | class Solution: method stableMountains (line 7) | def stableMountains(self, height: List[int], threshold: int) -> List[i... FILE: Python/3286-find-a-safe-walk-through-a-grid.py class Solution (line 7) | class Solution: method findSafeWalk (line 8) | def findSafeWalk(self, grid: List[List[int]], health: int) -> bool: FILE: Python/3289-the-two-sneaky-numbers-of-digitville.py class Solution (line 6) | class Solution: method getSneakyNumbers (line 7) | def getSneakyNumbers(self, nums: List[int]) -> List[int]: FILE: Python/3290-maximum-multiplication-score.py class Solution (line 6) | class Solution: method maxScore (line 7) | def maxScore(self, a: List[int], b: List[int]) -> int: FILE: Python/3295-report-spam-message.py class Solution (line 6) | class Solution: method reportSpam (line 7) | def reportSpam(self, message: List[str], bannedWords: List[str]) -> bool: FILE: Python/3296-minimum-number-of-seconds-to-make-mountain-height-zero.py class Solution (line 6) | class Solution: method minNumberOfSeconds (line 7) | def minNumberOfSeconds(self, mountainHeight: int, workerTimes: List[in... FILE: Python/3300-minimum-element-after-replacement-with-digit-sum.py class Solution (line 6) | class Solution: method findSum (line 7) | def findSum(self, num: int): method minElement (line 12) | def minElement(self, nums: List[int]) -> int: FILE: Python/3301-maximize-the-total-height-of-unique-towers.py class Solution (line 6) | class Solution: method maximumTotalSum (line 7) | def maximumTotalSum(self, maximumHeight: List[int]): FILE: Python/3304-find-the-k-th-character-in-string-game-i.py class Solution (line 3) | class Solution: method kthCharacter (line 4) | def kthCharacter(self, k: int) -> str: FILE: Python/3305-count-of-substrings-containing-every-vowel-and-k-consonants-i.py class Solution (line 3) | class Solution: method countOfSubstrings (line 4) | def countOfSubstrings(self, word: str, k: int) -> int: FILE: Python/3306-count-of-substrings-containing-every-vowel-and-k-consonants-ii.py class Solution (line 6) | class Solution: method countOfSubstrings (line 7) | def countOfSubstrings(self, word: str, k: int) -> int: FILE: Python/3307-find-the-k-th-character-in-string-game-ii.py class Solution (line 6) | class Solution: method kthCharacter (line 7) | def kthCharacter(self, i: int, operations: List[int]) -> str: FILE: Python/3309-maximum-possible-number-by-binary-concatenation.py class Solution (line 6) | class Solution: method maxGoodNumber (line 7) | def maxGoodNumber(self, nums: List[int]) -> int: FILE: Python/3310-remove-methods-from-project.py class Solution (line 7) | class Solution: method remainingMethods (line 8) | def remainingMethods(self, n: int, k: int, invocations: List[List[int]... FILE: Python/3314-construct-the-minimum-bitwise-array-i.py class Solution (line 6) | class Solution: method minBitwiseArray (line 7) | def minBitwiseArray(self, nums: List[int]): FILE: Python/3315-construct-the-minimum-bitwise-array-ii.py class Solution (line 6) | class Solution: method minBitwiseArray (line 7) | def minBitwiseArray(self, nums: List[int]) -> List[int]: FILE: Python/3318-find-x-sum-of-all-k-long-subarrays-i.py class Solution (line 6) | class Solution: method findXSum (line 7) | def findXSum(self, nums: List[int], k: int, x: int) -> List[int]: FILE: Python/3319-k-th-largest-perfect-subtree-size-in-binary-tree.py class TreeNode (line 6) | class TreeNode: method __init__ (line 7) | def __init__(self, val=0, left=None, right=None): class Solution (line 13) | class Solution: method kthLargestPerfectSubtree (line 14) | def kthLargestPerfectSubtree(self, root: Optional[TreeNode], k: int) -... FILE: Python/3321-find-x-sum-of-all-k-long-subarrays-ii.py class Helper (line 8) | class Helper: method __init__ (line 9) | def __init__(self, x): method insert (line 16) | def insert(self, num): method remove (line 22) | def remove(self, num): method get (line 28) | def get(self): method internalInsert (line 31) | def internalInsert(self, p): method internalRemove (line 43) | def internalRemove(self, p): class Solution (line 56) | class Solution: method findXSum (line 57) | def findXSum(self, nums: List[int], k: int, x: int) -> List[int]: FILE: Python/3324-find-the-sequence-of-strings-appeared-on-the-screen.py class Solution (line 6) | class Solution: method stringSequence (line 7) | def stringSequence(self, target: str) -> List[str]: FILE: Python/3325-count-substrings-with-k-frequency-characters-i.py class Solution (line 6) | class Solution: method numberOfSubstrings (line 7) | def numberOfSubstrings(self, s: str, k: int) -> int: FILE: Python/3330-find-the-original-typed-string-i.py class Solution (line 4) | class Solution: method possibleStringCount (line 5) | def possibleStringCount(self, word: str) -> int: FILE: Python/3331-find-subtree-sizes-after-changes.py class Solution (line 7) | class Solution: method findSubtreeSizes (line 8) | def findSubtreeSizes(self, parent: List[int], s: str) -> List[int]: FILE: Python/3333-find-the-original-typed-string-ii.py class Solution (line 3) | class Solution: method possibleStringCount (line 4) | def possibleStringCount(self, word: str, k: int) -> int: FILE: Python/3334-find-the-maximum-factor-score-of-array.py function gcdList (line 8) | def gcdList(nums): function lcmList (line 12) | def lcmList(nums): class Solution (line 16) | class Solution: method maxScore (line 18) | def maxScore(self, nums: List[int]) -> int: FILE: Python/3335-total-characters-in-string-after-transformations-i.py class Solution (line 4) | class Solution: method lengthAfterTransformations (line 5) | def lengthAfterTransformations(self, s: str, t: int) -> int: FILE: Python/3337-total-characters-in-string-after-transformations-ii.py class Mat (line 11) | class Mat: method __init__ (line 12) | def __init__(self, copyFrom: "Mat" = None) -> None: method __mul__ (line 19) | def __mul__(self, other: "Mat") -> "Mat": function I (line 30) | def I() -> Mat: function quickmul (line 37) | def quickmul(x: Mat, y: int) -> Mat: class Solution (line 48) | class Solution: method lengthAfterTransformations (line 49) | def lengthAfterTransformations( FILE: Python/3340-check-balanced-string.py class Solution (line 3) | class Solution: method isBalanced (line 4) | def isBalanced(self, num: str) -> bool: FILE: Python/3341-find-minimum-time-to-reach-last-room-i.py class Solution (line 7) | class Solution: method minTimeToReach (line 8) | def minTimeToReach(self, moveTime: List[List[int]]) -> int: FILE: Python/3342-find-minimum-time-to-reach-last-room-ii.py class Solution (line 7) | class Solution: method minTimeToReach (line 8) | def minTimeToReach(self, moveTime: List[List[int]]) -> int: FILE: Python/3343-count-number-of-balanced-permutations.py class Solution (line 6) | class Solution: method countBalancedPermutations (line 7) | def countBalancedPermutations(self, num: str) -> int: FILE: Python/3345-smallest-divisible-digit-product-i.py class Solution (line 3) | class Solution: method smallestNumber (line 4) | def smallestNumber(self, n: int, t: int) -> int: FILE: Python/3346-maximum-frequency-of-an-element-after-performing-operations-i.py class Solution (line 7) | class Solution: method maxFrequency (line 8) | def maxFrequency(self, nums: List[int], k: int, numOperations: int) ->... FILE: Python/3347-maximum-frequency-of-an-element-after-performing-operations-ii.py class Solution (line 8) | class Solution: method maxFrequency (line 9) | def maxFrequency(self, nums: List[int], k: int, numOperations: int) ->... FILE: Python/3349-adjacent-increasing-subarrays-detection-i.py class Solution (line 6) | class Solution: method hasIncreasingSubarrays (line 7) | def hasIncreasingSubarrays(self, nums: List[int], k: int) -> bool: FILE: Python/3350-adjacent-increasing-subarrays-detection-ii.py class Solution (line 7) | class Solution: method maxIncreasingSubarrays (line 8) | def maxIncreasingSubarrays(self, nums: List[int]) -> int: FILE: Python/3354-make-array-elements-equal-to-zero.py class Solution (line 6) | class Solution: method countValidSelections (line 7) | def countValidSelections(self, nums: List[int]) -> int: FILE: Python/3355-zero-array-transformation-i.py class Solution (line 6) | class Solution: method isZeroArray (line 7) | def isZeroArray(self, nums: List[int], queries: List[List[int]]) -> bool: FILE: Python/3356-zero-array-transformation-ii.py class Solution (line 6) | class Solution: method minZeroArray (line 7) | def minZeroArray(self, nums: List[int], queries: List[List[int]]) -> int: method canFormZeroArray (line 21) | def canFormZeroArray(self, nums: List[int], queries: List[List[int]], ... FILE: Python/3360-stone-removal-game.py class Solution (line 3) | class Solution: method canAliceWin (line 4) | def canAliceWin(self, n: int) -> bool: FILE: Python/3361-shift-distance-between-two-strings.py class Solution (line 6) | class Solution: method shiftDistance (line 7) | def shiftDistance(self, s: str, t: str, nextCost: List[int], previousC... FILE: Python/3362-zero-array-transformation-iii.py class Solution (line 8) | class Solution: method maxRemoval (line 9) | def maxRemoval(self, nums: List[int], queries: List[List[int]]) -> int: FILE: Python/3363-find-the-maximum-number-of-fruits-collected.py class Solution (line 6) | class Solution: method maxCollectedFruits (line 7) | def maxCollectedFruits(self, fruits: List[List[int]]) -> int: FILE: Python/3364-minimum-positive-sum-subarray.py class Solution (line 6) | class Solution: method minimumSumSubarray (line 7) | def minimumSumSubarray(self, nums: List[int], l: int, r: int) -> int: FILE: Python/3365-rearrange-k-substrings-to-form-target-string.py class Solution (line 6) | class Solution: method isPossibleToRearrange (line 7) | def isPossibleToRearrange(self, s: str, t: str, k: int) -> bool: FILE: Python/3370-smallest-number-with-all-set-bits.py class Solution (line 3) | class Solution: method smallestNumber (line 4) | def smallestNumber(self, n: int) -> int: FILE: Python/3371-identify-the-largest-outlier-in-an-array.py class Solution (line 7) | class Solution: method getLargestOutlier (line 8) | def getLargestOutlier(self, nums: List[int]) -> int: FILE: Python/3372-maximize-the-number-of-target-nodes-after-connecting-trees-i.py class Solution (line 7) | class Solution: method maxTargetNodes (line 8) | def maxTargetNodes(self, edges1: List[List[int]], edges2: List[List[in... FILE: Python/3373-maximize-the-number-of-target-nodes-after-connecting-trees-ii.py class Solution (line 6) | class Solution: method maxTargetNodes (line 7) | def maxTargetNodes(self, edges1: List[List[int]], edges2: List[List[in... FILE: Python/3375-minimum-operations-to-make-array-values-equal-to-k.py class Solution (line 6) | class Solution: method minOperations (line 7) | def minOperations(self, nums: List[int], k: int) -> int: FILE: Python/3379-transformed-array.py class Solution (line 6) | class Solution: method constructTransformedArray (line 7) | def constructTransformedArray(self, nums: List[int]) -> List[int]: FILE: Python/3380-maximum-area-rectangle-with-point-constraints-i.py class Solution (line 7) | class Solution: method maxRectangleArea (line 8) | def maxRectangleArea(self, points: List[List[int]]) -> int: FILE: Python/3381-maximum-subarray-sum-with-length-divisible-by-k.py class Solution (line 6) | class Solution: method maxSubarraySum (line 7) | def maxSubarraySum(self, nums: List[int], k: int) -> int: FILE: Python/3386-button-with-longest-push-time.py class Solution (line 6) | class Solution: method buttonWithLongestTime (line 7) | def buttonWithLongestTime(self, events: List[List[int]]) -> int: FILE: Python/3387-maximize-amount-after-two-days-of-conversions.py class Solution (line 7) | class Solution: method maxAmount (line 8) | def maxAmount(self, initialCurrency: str, pairs1: List[List[str]], rat... FILE: Python/3392-count-subarrays-of-length-three-with-a-condition.py class Solution (line 6) | class Solution: method countSubarrays (line 7) | def countSubarrays(self, nums: List[int]) -> int: FILE: Python/3393-count-paths-with-the-given-xor-value.py class Solution (line 6) | class Solution: method countPathsWithXorValue (line 7) | def countPathsWithXorValue(self, grid: List[List[int]], k: int) -> int: FILE: Python/3394-check-if-grid-can-be-cut-into-sections.py class Solution (line 6) | class Solution: method checkValidCuts (line 7) | def checkValidCuts(self, n: int, rectangles: List[List[int]]) -> bool: FILE: Python/3396-minimum-number-of-operations-to-make-elements-in-array-distinct.py class Solution (line 7) | class Solution: method minimumOperations (line 8) | def minimumOperations(self, nums: List[int]) -> int: FILE: Python/3397-maximum-number-of-distinct-elements-after-operations.py class Solution (line 6) | class Solution: method maxDistinctElements (line 7) | def maxDistinctElements(self, nums: List[int], k: int) -> int: FILE: Python/3402-minimum-operations-to-make-columns-strictly-increasing.py class Solution (line 6) | class Solution: method minimumOperations (line 7) | def minimumOperations(self, grid: List[List[int]]) -> int: FILE: Python/3403-find-the-lexicographically-largest-string-from-the-box-i.py class Solution (line 3) | class Solution: method answerString (line 4) | def answerString(self, word: str, numFriends: int) -> str: FILE: Python/3405-count-the-number-of-arrays-with-k-matching-adjacent-elements.py function qpow (line 10) | def qpow(x, n): function init (line 20) | def init(): function comb (line 31) | def comb(n, m): class Solution (line 35) | class Solution: method countGoodArrays (line 36) | def countGoodArrays(self, n: int, m: int, k: int) -> int: FILE: Python/3407-substring-matching-pattern.py class Solution (line 3) | class Solution: method hasMatch (line 4) | def hasMatch(self, s: str, p: str) -> bool: FILE: Python/3408-design-task-manager.py class TaskManager (line 12) | class TaskManager: method __init__ (line 13) | def __init__(self, tasks: List[List[int]]): method add (line 20) | def add(self, userId: int, taskId: int, priority: int) -> None: method edit (line 25) | def edit(self, taskId: int, newPriority: int) -> None: method rmv (line 30) | def rmv(self, taskId: int) -> None: method execTop (line 37) | def execTop(self) -> int: FILE: Python/3411-maximum-subarray-with-equal-products.py class Solution (line 7) | class Solution: method maxLength (line 8) | def maxLength(self, nums: List[int]) -> int: FILE: Python/3412-find-mirror-score-of-a-string.py class Solution (line 6) | class Solution: method calculateScore (line 7) | def calculateScore(self, s: str) -> int: FILE: Python/3417-zigzag-grid-traversal-with-skip.py class Solution (line 6) | class Solution: method zigzagTraversal (line 7) | def zigzagTraversal(self, grid: List[List[int]]) -> List[int]: FILE: Python/3418-maximum-amount-of-money-robot-can-earn.py class Solution (line 6) | class Solution: method maximumAmount (line 7) | def maximumAmount(self, coins: List[List[int]]) -> int: FILE: Python/3423-maximum-difference-between-adjacent-elements-in-a-circular-array.py class Solution (line 6) | class Solution: method maxAdjacentDistance (line 7) | def maxAdjacentDistance(self, nums: List[int]) -> int: FILE: Python/3424-minimum-cost-to-make-arrays-identical.py class Solution (line 6) | class Solution: method minCost (line 7) | def minCost(self, arr: List[int], brr: List[int], k: int) -> int: FILE: Python/3427-sum-of-variable-length-subarrays.py class Solution (line 6) | class Solution: method subarraySum (line 7) | def subarraySum(self, nums: List[int]) -> int: FILE: Python/3428-maximum-and-minimum-sums-of-at-most-size-k-subsequences.py class Solution (line 8) | class Solution: method minMaxSums (line 9) | def minMaxSums(self, nums: List[int], k: int) -> int: FILE: Python/3432-count-partitions-with-even-sum-difference.py class Solution (line 6) | class Solution: method countPartitions (line 7) | def countPartitions(self, nums: List[int]) -> int: FILE: Python/3433-count-mentions-per-user.py class Solution (line 6) | class Solution: method countMentions (line 7) | def countMentions(self, numberOfUsers: int, events: List[List[str]]) -... FILE: Python/3434-maximum-frequency-after-subarray-operation.py class Solution (line 6) | class Solution: method maxFrequency (line 7) | def maxFrequency(self, nums: List[int], k: int) -> int: FILE: Python/3438-find-valid-pair-of-adjacent-digits-in-string.py class Solution (line 6) | class Solution: method findValidPair (line 7) | def findValidPair(self, s: str) -> str: FILE: Python/3439-reschedule-meetings-for-maximum-free-time-i.py class Solution (line 6) | class Solution: method maxFreeTime (line 7) | def maxFreeTime(self, eventTime: int, k: int, startTime: List[int], en... FILE: Python/3440-reschedule-meetings-for-maximum-free-time-i.py class Solution (line 6) | class Solution: method maxFreeTime (line 7) | def maxFreeTime(self, eventTime: int, k: int, startTime: List[int], en... FILE: Python/3442-maximum-difference-between-even-and-odd-frequency-i.py class Solution (line 6) | class Solution: method maxDifference (line 7) | def maxDifference(self, s: str) -> int: FILE: Python/3443-maximum-manhattan-distance-after-k-changes.py class Solution (line 3) | class Solution: method maxDistance (line 4) | def maxDistance(self, s: str, k: int) -> int: FILE: Python/3445-maximum-difference-between-even-and-odd-frequency-ii.py class Solution (line 3) | class Solution: method maxDifference (line 4) | def maxDifference(self, s: str, k: int) -> int: FILE: Python/3446-sort-matrix-by-diagonals.py class Solution (line 7) | class Solution: method sortMatrix (line 8) | def sortMatrix(self, grid: List[List[int]]) -> List[List[int]]: FILE: Python/3447-assign-elements-to-groups-with-constraints.py class Solution (line 7) | class Solution: method assignElements (line 8) | def assignElements(self, groups: List[int], elements: List[int]) -> Li... FILE: Python/3452-sum-of-good-numbers.py class Solution (line 6) | class Solution: method sumOfGoodNumbers (line 7) | def sumOfGoodNumbers(self, nums: List[int], k: int) -> int: FILE: Python/3453-separate-squares-i.py class Solution (line 6) | class Solution: method separateSquares (line 7) | def separateSquares(self, squares: List[List[int]]) -> float: FILE: Python/3454-separate-squares-ii.py class Solution (line 4) | class Solution: method separateSquares (line 5) | def separateSquares(self, squares: List[List[int]]) -> float: FILE: Python/3456-find-special-substring-of-length-k.py class Solution (line 3) | class Solution: method hasSpecialSubstring (line 4) | def hasSpecialSubstring(self, s: str, k: int) -> bool: FILE: Python/3457-eat-pizzas.py class Solution (line 7) | class Solution: method maxWeight (line 8) | def maxWeight(self, pizzas: List[int]) -> int: FILE: Python/3459-length-of-longest-v-shaped-diagonal-segment.py class Solution (line 7) | class Solution: method lenOfVDiagonal (line 8) | def lenOfVDiagonal(self, grid: List[List[int]]) -> int: FILE: Python/3461-check-if-digits-are-equal-in-string-after-operations-i.py class Solution (line 3) | class Solution: method hasSameDigits (line 4) | def hasSameDigits(self, s: str) -> bool: FILE: Python/3462-maximum-sum-with-at-most-k-elements.py class Solution (line 6) | class Solution: method maxSum (line 7) | def maxSum(self, grid: List[List[int]], limits: List[int], k: int) -> ... FILE: Python/3467-transform-array-by-parity.py class Solution (line 6) | class Solution: method transformArray (line 7) | def transformArray(self, nums: List[int]) -> List[int]: FILE: Python/3468-find-the-number-of-copy-arrays.py class Solution (line 6) | class Solution: method countArrays (line 7) | def countArrays(self, original: List[int], bounds: List[List[int]]) ->... FILE: Python/3471-find-the-largest-almost-missing-integer.py class Solution (line 7) | class Solution: method largestInteger (line 8) | def largestInteger(self, nums: List[int], k: int) -> int: FILE: Python/3473-sum-of-k-subarrays-with-length-at-least-m.py class Solution (line 6) | class Solution: method maxSum (line 7) | def maxSum(self, nums: List[int], k: int, m: int) -> int: FILE: Python/3477-fruits-into-baskets-ii.py class Solution (line 6) | class Solution: method numOfUnplacedFruits (line 7) | def numOfUnplacedFruits(self, fruits: List[int], baskets: List[int]) -... FILE: Python/3478-choose-k-elements-with-maximum-sum.py class Solution (line 7) | class Solution: method findMaxSum (line 8) | def findMaxSum(self, nums1: List[int], nums2: List[int], k: int) -> Li... FILE: Python/3479-fruits-into-baskets-iii.py class SegTree (line 6) | class SegTree: method __init__ (line 7) | def __init__(self, baskets): method maintain (line 13) | def maintain(self, currIdx): method build (line 16) | def build(self, arr, currIdx, left, right): method findAndUpdate (line 25) | def findAndUpdate(self, currIdx, left, right, target): class Solution (line 39) | class Solution: method numOfUnplacedFruits (line 40) | def numOfUnplacedFruits(self, fruits: List[int], baskets: List[int]) -... FILE: Python/3480-maximize-subarrays-after-removing-one-conflicting-pair.py class Solution (line 6) | class Solution: method maxSubarrays (line 7) | def maxSubarrays(self, n: int, conflictingPairs: List[List[int]]) -> int: FILE: Python/3483-unique-3-digit-even-numbers.py class Solution (line 7) | class Solution: method totalNumbers (line 8) | def totalNumbers(self, digits: List[int]) -> int: FILE: Python/3484-design-spreadsheet.py class Spreadsheet (line 4) | class Spreadsheet: method __init__ (line 5) | def __init__(self, rows: int): method setCell (line 8) | def setCell(self, cell: str, value: int) -> None: method resetCell (line 13) | def resetCell(self, cell: str) -> None: method getValue (line 18) | def getValue(self, formula: str) -> int: FILE: Python/3487-maximum-unique-subarray-sum-after-deletion.py class Solution (line 6) | class Solution: method maxSum (line 7) | def maxSum(self, nums: List[int]) -> int: FILE: Python/3488-closest-equal-element-queries.py class Solution (line 8) | class Solution: method solveQueries (line 9) | def solveQueries(self, nums: List[int], queries: List[int]) -> List[int]: FILE: Python/3489-zero-array-transformation-iv.py class Solution (line 6) | class Solution: method minZeroArray (line 7) | def minZeroArray(self, nums: List[int], queries: List[List[int]]) -> int: method hasSubsetSumDP (line 37) | def hasSubsetSumDP(self, nums, target): FILE: Python/3492-maximum-containers-on-a-ship.py class Solution (line 3) | class Solution: method maxContainers (line 4) | def maxContainers(self, n: int, w: int, maxWeight: int) -> int: FILE: Python/3493-properties-graph.py class UnionFind (line 6) | class UnionFind: method __init__ (line 7) | def __init__(self, size): method find (line 12) | def find(self, node): method union (line 18) | def union(self, x, y): method connected (line 31) | def connected(self, x, y): class Solution (line 35) | class Solution: method numberOfComponents (line 36) | def numberOfComponents(self, properties: List[List[int]], k: int) -> int: FILE: Python/3494-find-the-minimum-amount-of-time-to-brew-potions.py class Solution (line 6) | class Solution: method minTime (line 7) | def minTime(self, skill: List[int], mana: List[int]) -> int: FILE: Python/3495-minimum-operations-to-make-array-elements-zero.py class Solution (line 6) | class Solution: method get (line 7) | def get(self, num: int) -> int: method minOperations (line 17) | def minOperations(self, queries: List[List[int]]) -> int: FILE: Python/3498-reverse-degree-of-a-string.py class Solution (line 3) | class Solution: method reverseDegree (line 4) | def reverseDegree(self, s: str) -> int: FILE: Python/3499-maximize-active-section-with-trade-i.py class Solution (line 3) | class Solution: method maxActiveSectionsAfterTrade (line 4) | def maxActiveSectionsAfterTrade(self, s: str) -> int: FILE: Python/3502-minimum-cost-to-reach-every-position.py class Solution (line 6) | class Solution: method minCosts (line 7) | def minCosts(self, cost: List[int]) -> List[int]: FILE: Python/3503-longest-palindrome-after-substring-concatenation-i.py class Solution (line 3) | class Solution: method longestPalindrome (line 4) | def longestPalindrome(self, s: str, t: str) -> int: FILE: Python/3507-minimum-pair-removal-to-sort-array-i.py class Solution (line 6) | class Solution: method minimumPairRemoval (line 7) | def minimumPairRemoval(self, nums: List[int]) -> int: FILE: Python/3508-implement-router.py class Router (line 8) | class Router: method __init__ (line 10) | def __init__(self, memoryLimit: int): method addPacket (line 16) | def addPacket(self, source: int, destination: int, timestamp: int) -> ... method forwardPacket (line 35) | def forwardPacket(self) -> List[int]: method getCount (line 48) | def getCount(self, destination: int, startTime: int, endTime: int) -> ... FILE: Python/3510-minimum-pair-removal-to-sort-array-ii.py class Node (line 7) | class Node: method __init__ (line 8) | def __init__(self, value, left): class Solution (line 15) | class Solution: method minimumPairRemoval (line 16) | def minimumPairRemoval(self, nums: List[int]) -> int: FILE: Python/3512-minimum-operations-to-make-array-sum-divisible-by-k.py class Solution (line 6) | class Solution: method minOperations (line 7) | def minOperations(self, nums: List[int], k: int) -> int: FILE: Python/3513-number-of-unique-xor-triplets-i.py class Solution (line 7) | class Solution: method uniqueXorTriplets (line 8) | def uniqueXorTriplets(self, nums: List[int]) -> int: FILE: Python/3514-number-of-unique-xor-triplets-ii.py function transformXor (line 6) | def transformXor(a: List[int], invert: bool = False) -> None: function xorCalculate (line 22) | def xorCalculate(f: List[int], g: List[int]) -> List[int]: class Solution (line 37) | class Solution: method uniqueXorTriplets (line 38) | def uniqueXorTriplets(self, nums: List[int]) -> int: FILE: Python/3516-find-closest-person.py class Solution (line 3) | class Solution: method findClosest (line 4) | def findClosest(self, x: int, y: int, z: int) -> int: FILE: Python/3517-smallest-palindromic-rearrangement-i.py class Solution (line 3) | class Solution: method smallestPalindrome (line 4) | def smallestPalindrome(self, s: str) -> str: FILE: Python/3519-count-numbers-with-non-decreasing-digits.py class Solution (line 6) | class Solution: method countNumbers (line 7) | def countNumbers(self, l: str, r: str, b: int) -> int: FILE: Python/3522-calculate-score-after-performing-instructions.py class Solution (line 6) | class Solution: method calculateScore (line 7) | def calculateScore(self, instructions: List[str], values: List[int]) -... FILE: Python/3523-make-array-non-decreasing.py class Solution (line 6) | class Solution: method maximumPossibleSize (line 7) | def maximumPossibleSize(self, nums: List[int]) -> int: FILE: Python/3524-find-x-value-of-array-i.py class Solution (line 6) | class Solution: method resultArray (line 7) | def resultArray(self, nums: List[int], k: int) -> List[int]: FILE: Python/3527-find-the-most-common-response.py class Solution (line 7) | class Solution: method findCommonResponse (line 8) | def findCommonResponse(self, responses: List[List[str]]) -> str: FILE: Python/3528-unit-conversion-i.py class Solution (line 7) | class Solution: method baseUnitConversions (line 8) | def baseUnitConversions(self, conversions: List[List[int]]) -> List[int]: FILE: Python/3531-count-covered-buildings.py class Solution (line 8) | class Solution: method countCoveredBuildings (line 9) | def countCoveredBuildings(self, n: int, buildings: List[List[int]]) ->... FILE: Python/3532-path-existence-queries-in-a-graph-i.py class Solution (line 6) | class Solution: method pathExistenceQueries (line 7) | def pathExistenceQueries(self, n: int, nums: List[int], maxDiff: int, ... FILE: Python/3536-maximum-product-of-two-digits.py class Solution (line 6) | class Solution: method maxProduct (line 7) | def maxProduct(self, n: int) -> int: FILE: Python/3537-fill-a-special-grid.py class Solution (line 6) | class Solution: method specialGrid (line 7) | def specialGrid(self, N: int) -> List[List[int]]: FILE: Python/3539-find-sum-of-array-product-of-magical-sequences.py class Solution (line 6) | class Solution: method quickmul (line 7) | def quickmul(self, x: int, y: int, mod: int) -> int: method magicalSum (line 16) | def magicalSum(self, m: int, k: int, nums: List[int]) -> int: FILE: Python/3541-find-most-frequent-vowel-and-consonant.py class Solution (line 6) | class Solution: method maxFreqSum (line 7) | def maxFreqSum(self, s: str) -> int: FILE: Python/3542-minimum-operations-to-convert-all-elements-to-zero.py class Solution (line 6) | class Solution: method minOperations (line 7) | def minOperations(self, nums: List[int]) -> int: FILE: Python/3545-minimum-deletions-for-at-most-k-distinct-characters.py class Solution (line 3) | class Solution: method minDeletion (line 4) | def minDeletion(self, s: str, k: int) -> int: FILE: Python/3546-equal-sum-grid-partition-i.py class Solution (line 6) | class Solution: method canPartitionGrid (line 7) | def canPartitionGrid(self, grid: List[List[int]]) -> bool: FILE: Python/3550-minimum-swaps-to-sort-by-digit-sum.py class Solution (line 6) | class Solution: method minSwaps (line 7) | def minSwaps(self, nums: List[int]) -> int: FILE: Python/3551-smallest-index-with-digit-sum-equal-to-index.py class Solution (line 6) | class Solution: method smallestIndex (line 7) | def smallestIndex(self, nums: List[int]) -> int: FILE: Python/3556-sum-of-largest-prime-substrings.py class Solution (line 6) | class Solution: method sumOfLargestPrimes (line 7) | def sumOfLargestPrimes(self, s: str) -> int: FILE: Python/3558-number-of-ways-to-assign-edge-weights-i.py class Solution (line 7) | class Solution: method assignEdgeWeights (line 8) | def assignEdgeWeights(self, edges: List[List[int]]) -> int: FILE: Python/3560-find-minimum-log-transportation-cost.py class Solution (line 3) | class Solution: method minCuttingCost (line 4) | def minCuttingCost(self, n: int, m: int, k: int) -> int: FILE: Python/3561-resulting-string-after-adjacent-removals.py class Solution (line 6) | class Solution: method resultingString (line 7) | def resultingString(self, s: str) -> str: FILE: Python/3562-maximum-profit-from-trading-stocks-with-discounts.py class Solution (line 6) | class Solution: method maxProfit (line 7) | def maxProfit( FILE: Python/3566-partition-array-into-two-equal-product-subsets.py class Solution (line 6) | class Solution: method checkEqualPartitions (line 7) | def checkEqualPartitions(self, nums: List[int], target: int) -> bool: FILE: Python/3567-minimum-moves-to-clean-the-classroom.py class Solution (line 7) | class Solution: method minMoves (line 8) | def minMoves(self, classroom: List[str], energy: int) -> int: FILE: Python/3568-maximize-count-of-distinct-primes-after-split.py class SegmentTree (line 8) | class SegmentTree: method __init__ (line 9) | def __init__(self, N: int): method _apply (line 17) | def _apply(self, idx: int, left: int, right: int, val: int): method _pushDown (line 21) | def _pushDown(self, idx: int, left: int, mid: int, right: int): method _updateRange (line 27) | def _updateRange(self, idx: int, left: int, right: int, method updateRange (line 40) | def updateRange(self, l: int, r: int, val: int): method queryMax (line 45) | def queryMax(self) -> int: class Solution (line 49) | class Solution: method maximumCount (line 50) | def maximumCount(self, nums: List[int], queries: List[List[int]]) -> L... FILE: Python/3569-minimum-absolute-difference-in-sliding-submatrix.py class Solution (line 6) | class Solution: method minAbsDiff (line 7) | def minAbsDiff(self, grid: List[List[int]], k: int) -> List[List[int]]: FILE: Python/3573-best-time-to-buy-and-sell-stock-v.py class Solution (line 6) | class Solution: method maximumProfit (line 7) | def maximumProfit(self, prices: List[int], k: int) -> int: FILE: Python/3574-maximize-ysum-by-picking-a-triplet-of-distinct-xvalues.py class Solution (line 6) | class Solution: method maxSumDistinctTriplet (line 7) | def maxSumDistinctTriplet(self, x: List[int], y: List[int]) -> int: FILE: Python/3576-transform-array-to-all-equal-elements.py class Solution (line 6) | class Solution: method canMakeEqual (line 7) | def canMakeEqual(self, nums: List[int], k: int) -> bool: FILE: Python/3577-count-the-number-of-computer-unlocking-permutations.py class Solution (line 6) | class Solution: method countPermutations (line 7) | def countPermutations(self, complexity: List[int]) -> int: FILE: Python/3578-count-partitions-with-max-min-difference-at-most-k.py class Solution (line 7) | class Solution: method countPartitions (line 8) | def countPartitions(self, nums: List[int], k: int) -> int: FILE: Python/3582-generate-tag-for-video-caption.py class Solution (line 6) | class Solution: method generateTag (line 7) | def generateTag(self, caption: str) -> str: FILE: Python/3583-count-special-triplets.py class Solution (line 9) | class Solution: method specialTriplets (line 10) | def specialTriplets(self, nums: List[int]) -> int: FILE: Python/3584-maximum-product-of-first-and-last-elements-of-a-subsequence.py class Solution (line 6) | class Solution: method maximumProduct (line 7) | def maximumProduct(self, nums: List[int], m: int) -> int: FILE: Python/3587-minimum-adjacent-swaps-to-alternate-parity.py class Solution (line 6) | class Solution: method minSwaps (line 7) | def minSwaps(self, nums: List[int]) -> int: FILE: Python/3588-find-maximum-area-of-a-triangle.py class Solution (line 7) | class Solution: method maxArea (line 8) | def maxArea(self, coords: List[List[int]]) -> int: FILE: Python/3591-check-if-any-element-has-prime-frequency.py class Solution (line 6) | class Solution: method checkPrimeFrequency (line 7) | def checkPrimeFrequency(self, nums: List[int]) -> bool: FILE: Python/3592-inverse-coin-change.py class Solution (line 6) | class Solution: method findCoins (line 7) | def findCoins(self, numWays: List[int]) -> List[int]: FILE: Python/3593-minimum-increments-to-equalize-leaf-paths.py class Solution (line 8) | class Solution: method minIncrease (line 9) | def minIncrease(self, n: int, edges: List[List[int]], cost: List[int])... FILE: Python/3597-partition-string.py class Solution (line 6) | class Solution: method partitionString (line 7) | def partitionString(self, s: str) -> List[str]: FILE: Python/3599-partition-array-to-minimize-xor.py class Solution (line 7) | class Solution: method minXor (line 8) | def minXor(self, nums: List[int], k: int) -> int: FILE: Python/3602-hexadecimal-and-hexatrigesimal-conversion.py class Solution (line 3) | class Solution: method concatHex36 (line 4) | def concatHex36(self, n: int) -> str: FILE: Python/3603-minimum-cost-path-with-alternating-directions-ii.py class Solution (line 7) | class Solution: method minCost (line 8) | def minCost(self, m: int, n: int, waitCost: List[List[int]]) -> int: FILE: Python/3604-minimum-time-to-reach-destination-in-directed-graph.py class Solution (line 8) | class Solution: method minTime (line 9) | def minTime(self, n: int, edges: List[List[int]]) -> int: FILE: Python/3606-coupon-code-validator.py class Solution (line 7) | class Solution: method validateCoupons (line 8) | def validateCoupons(self, code: List[str], businessLine: List[str], is... FILE: Python/3607-power-grid-maintenance.py class Solution (line 7) | class Solution: method processQueries (line 8) | def processQueries(self, c: int, connections: List[List[int]], queries... FILE: Python/3608-minimum-time-for-k-connected-components.py class UnionFind (line 6) | class UnionFind: method __init__ (line 7) | def __init__(self, size): method find (line 12) | def find(self, x): method union (line 17) | def union(self, x, y): class Solution (line 31) | class Solution: method minTime (line 32) | def minTime(self, n: int, edges: List[List[int]], k: int) -> int: FILE: Python/3612-process-string-with-special-operations-i.py class Solution (line 3) | class Solution: method processStr (line 4) | def processStr(self, s: str) -> str: FILE: Python/3613-minimize-maximum-component-cost.py class UnionFind (line 6) | class UnionFind: method __init__ (line 7) | def __init__(self, n): method find (line 10) | def find(self, node): method union (line 15) | def union(self, nodeX, nodeY): class Solution (line 23) | class Solution: method minCost (line 24) | def minCost(self, n: int, edges: List[List[int]], k: int) -> int: FILE: Python/3614-process-string-with-special-operations-ii.py class Solution (line 3) | class Solution: method processStr (line 4) | def processStr(self, s: str, k: int) -> str: FILE: Python/3622-check-divisibility-by-digit-sum-and-product.py class Solution (line 3) | class Solution: method checkDivisibility (line 4) | def checkDivisibility(self, n: int) -> bool: FILE: Python/3623-count-number-of-trapezoids-i.py class Solution (line 10) | class Solution: method countTrapezoids (line 11) | def countTrapezoids(self, points: List[List[int]]) -> int: FILE: Python/3624-number-of-integers-with-popcount-depth-equal-to-k-ii.py class SegmentTree (line 6) | class SegmentTree: method __init__ (line 7) | def __init__(self, size): method update (line 11) | def update(self, i, delta): method query (line 17) | def query(self, i): method rangeQuery (line 25) | def rangeQuery(self, l, r): class Solution (line 29) | class Solution: method popcount_depth (line 30) | def popcount_depth(self, x: int) -> int: method popcountDepth (line 37) | def popcountDepth(self, nums: List[int], queries: List[List[int]]) -> ... FILE: Python/3625-count-number-of-trapezoids-ii.py class Solution (line 7) | class Solution: method countTrapezoids (line 8) | def countTrapezoids(self, points: List[List[int]]) -> int: FILE: Python/3627-maximum-median-sum-of-subsequences-of-size-3.py class Solution (line 6) | class Solution: method maximumMedianSum (line 7) | def maximumMedianSum(self, nums: List[int]) -> int: FILE: Python/3628-maximum-number-of-subsequences-after-one-inserting.py class Solution (line 3) | class Solution: method numOfSubsequences (line 4) | def numOfSubsequences(self, s: str) -> int: FILE: Python/3633-earliest-finish-time-for-land-and-water-rides-i.py class Solution (line 6) | class Solution: method earliestFinishTime (line 7) | def earliestFinishTime(self, landStartTime: List[int], landDuration: L... FILE: Python/3634-minimum-removals-to-balance-array.py class Solution (line 6) | class Solution: method minRemoval (line 7) | def minRemoval(self, nums: List[int], k: int) -> int: FILE: Python/3635-earliest-finish-time-for-land-and-water-rides-ii.py class Solution (line 7) | class Solution: method earliestFinishTime (line 8) | def earliestFinishTime(self, landStartTime: List[int], landDuration: L... FILE: Python/3637-trionic-array-i.py class Solution (line 6) | class Solution: method isTrionic (line 7) | def isTrionic(self, nums: List[int]) -> bool: FILE: Python/3638-maximum-balanced-shipments.py class Solution (line 6) | class Solution: method maxBalancedShipments (line 7) | def maxBalancedShipments(self, weight: List[int]) -> int: FILE: Python/3640-trionic-array-ii.py class Solution (line 6) | class Solution: method maxSumTrionic (line 7) | def maxSumTrionic(self, nums: List[int]) -> int: FILE: Python/3643-flip-square-submatrix-vertically.py class Solution (line 6) | class Solution: method reverseSubmatrix (line 7) | def reverseSubmatrix(self, grid: List[List[int]], x: int, y: int, k: i... FILE: Python/3644-maximum-k-to-sort-a-permutation.py class Solution (line 6) | class Solution: method sortPermutation (line 7) | def sortPermutation(self, nums: List[int]) -> int: FILE: Python/3646-next-special-palindrome-number.py class Solution (line 6) | class Solution: method specialPalindrome (line 7) | def specialPalindrome(self, n: int) -> int: FILE: Python/3648-minimum-sensors-to-cover-grid.py class Solution (line 3) | class Solution: method minSensors (line 4) | def minSensors(self, n: int, m: int, k: int) -> int: FILE: Python/3649-number-of-perfect-pairs.py class Solution (line 7) | class Solution: method perfectPairs (line 8) | def perfectPairs(self, nums: List[int]) -> int: FILE: Python/3650-minimum-cost-path-with-edge-reversals.py class Solution (line 7) | class Solution: method minCost (line 8) | def minCost(self, n: int, edges: List[List[int]]) -> int: FILE: Python/3651-minimum-cost-path-with-teleportations.py class Solution (line 6) | class Solution: method minCost (line 7) | def minCost(self, grid: List[List[int]], k: int) -> int: FILE: Python/3652-best-time-to-buy-and-sell-stock-using-strategy.py class Solution (line 6) | class Solution: method maxProfit (line 7) | def maxProfit(self, prices: List[int], strategy: List[int], k: int) ->... FILE: Python/3653-xor-after-range-multiplication-queries-i.py class Solution (line 6) | class Solution: method xorAfterQueries (line 7) | def xorAfterQueries(self, nums: List[int], queries: List[List[int]]) -... FILE: Python/3654-minimum-sum-after-divisible-sum-deletions.py class Solution (line 6) | class Solution: method minArraySum (line 7) | def minArraySum(self, nums: List[int], k: int) -> int: FILE: Python/3658-gcd-of-odd-and-even-sums.py class Solution (line 6) | class Solution: method gcdOfOddEvenSums (line 7) | def gcdOfOddEvenSums(self, n: int) -> int: FILE: Python/3659-partition-array-into-k-distinct-groups.py class Solution (line 7) | class Solution: method partitionArray (line 8) | def partitionArray(self, nums: List[int], k: int) -> bool: FILE: Python/3663-find-the-least-frequent-digit.py class Solution (line 6) | class Solution: method getLeastFrequentDigit (line 7) | def getLeastFrequentDigit(self, n: int) -> int: FILE: Python/3665-twisted-mirror-path-count.py class Solution (line 9) | class Solution: method uniquePaths (line 10) | def uniquePaths(self, grid: List[List[int]]) -> int: FILE: Python/3668-restore-finishing-order.py class Solution (line 6) | class Solution: method recoverOrder (line 7) | def recoverOrder(self, order: List[int], friends: List[int]) -> List[i... FILE: Python/3669-balanced-k-factor-decomposition.py class Solution (line 6) | class Solution: method minDifference (line 7) | def minDifference(self, n: int, k: int) -> List[int]: FILE: Python/3674-minimum-operations-to-equalize-array.py class Solution (line 6) | class Solution: method minOperations (line 7) | def minOperations(self, nums: List[int]) -> int: FILE: Python/3675-minimum-operations-to-transform-string.py class Solution (line 3) | class Solution: method minOperations (line 4) | def minOperations(self, s: str) -> int: FILE: Python/3676-count-bowl-subarrays.py class Solution (line 6) | class Solution: method bowlSubarrays (line 7) | def bowlSubarrays(self, nums: List[int]) -> int: FILE: Python/3678-smallest-absent-positive-greater-than-average.py class Solution (line 7) | class Solution: method smallestAbsent (line 8) | def smallestAbsent(self, nums: List[int]) -> int: FILE: Python/3679-minimum-discards-to-balance-inventory.py class Solution (line 7) | class Solution: method minArrivalsToDiscard (line 8) | def minArrivalsToDiscard(self, arrivals: List[int], w: int, m: int) ->... FILE: Python/3681-maximum-xor-of-subsequences.py class Solution (line 6) | class Solution: method maxXorSubsequences (line 7) | def maxXorSubsequences(self, nums: List[int]) -> int: FILE: Python/3688-bitwise-or-of-even-numbers-in-an-array.py class Solution (line 6) | class Solution: method evenNumberBitwiseORs (line 7) | def evenNumberBitwiseORs(self, nums: List[int]) -> int: FILE: Python/3689-maximum-total-subarray-value-i.py class Solution (line 3) | class Solution: method maxTotalValue (line 4) | def maxTotalValue(self, nums: List[int], k: int) -> int: FILE: Python/3690-split-and-merge-array-transformation.py class Solution (line 7) | class Solution: method minSplitMerge (line 8) | def minSplitMerge(self, nums1: List[int], nums2: List[int]) -> int: FILE: Python/3692-majority-frequency-characters.py class Solution (line 6) | class Solution: method majorityFrequencyGroup (line 7) | def majorityFrequencyGroup(self, s: str) -> str: FILE: Python/3693-climbing-stairs-ii.py class Solution (line 6) | class Solution: method climbStairs (line 7) | def climbStairs(self, n: int, costs: List[int]) -> int: FILE: Python/3694-distinct-points-reachable-after-substring-removal.py class Solution (line 3) | class Solution: method distinctPoints (line 4) | def distinctPoints(self, s: str, k: int) -> int: FILE: Python/3697-compute-decimal-representation.py class Solution (line 6) | class Solution: method decimalRepresentation (line 7) | def decimalRepresentation(self, n: int) -> List[int]: FILE: Python/3698-split-array-with-minimum-difference.py class Solution (line 6) | class Solution: method splitArray (line 7) | def splitArray(self, nums: List[int]) -> int: FILE: Python/3701-compute-alternating-sum.py class Solution (line 6) | class Solution: method alternatingSum (line 7) | def alternatingSum(self, nums: List[int]) -> int: FILE: Python/3702-longest-subsequence-with-non-zero-bitwise-xor.py class Solution (line 6) | class Solution: method longestSubsequence (line 7) | def longestSubsequence(self, nums: List[int]) -> int: FILE: Python/3703-remove-k-balanced-substrings.py class Solution (line 3) | class Solution: method removeSubstring (line 4) | def removeSubstring(self, s: str, k: int) -> str: method checkRemoval (line 17) | def checkRemoval(self, stack: list, k: int): FILE: Python/3707-equal-score-substrings.py class Solution (line 3) | class Solution: method scoreBalance (line 4) | def scoreBalance(self, s: str) -> bool: FILE: Python/3708-longest-fibonacci-subarray.py class Solution (line 6) | class Solution: method longestSubarray (line 7) | def longestSubarray(self, nums: List[int]) -> int: FILE: Python/3709-design-exam-scores-tracker.py class ExamTracker (line 6) | class ExamTracker: method __init__ (line 8) | def __init__(self): method record (line 12) | def record(self, time: int, score: int) -> None: method totalScore (line 19) | def totalScore(self, startTime: int, endTime: int) -> int: FILE: Python/3712-sum-of-elements-with-frequency-divisible-by-k.py class Solution (line 6) | class Solution: method sumDivisibleByK (line 7) | def sumDivisibleByK(self, nums: List[int], k: int) -> int: FILE: Python/3713-longest-balanced-substring-i.py class Solution (line 3) | class Solution: method longestBalanced (line 4) | def longestBalanced(self, s: str) -> int: FILE: Python/3715-sum-of-perfect-square-ancestors.py class Solution (line 6) | class Solution: method sumOfAncestors (line 7) | def sumOfAncestors(self, n: int, edges: List[List[int]], nums: List[in... FILE: Python/3718-smallest-missing-multiple-of-k.py class Solution (line 6) | class Solution: method missingMultiple (line 7) | def missingMultiple(self, nums: List[int], k: int) -> int: FILE: Python/3719-longest-balanced-subarray-i.py class Solution (line 6) | class Solution: method longestBalanced (line 7) | def longestBalanced(self, nums: List[int]) -> int: FILE: Python/3720-lexicographically-smallest-permutation-greater-than-target.py class Solution (line 3) | class Solution: method lexGreaterPermutation (line 4) | def lexGreaterPermutation(self, s: str, target: str) -> str: FILE: Python/3721-longest-balanced-subarray-ii.py class LazyTag (line 7) | class LazyTag: method __init__ (line 8) | def __init__(self): method add (line 11) | def add(self, other): method has_tag (line 15) | def has_tag(self): method clear (line 18) | def clear(self): class SegmentTreeNode (line 22) | class SegmentTreeNode: method __init__ (line 23) | def __init__(self): class SegmentTree (line 29) | class SegmentTree: method __init__ (line 30) | def __init__(self, data): method add (line 35) | def add(self, l, r, val): method find_last (line 40) | def find_last(self, start, val): method _apply_tag (line 45) | def _apply_tag(self, i, tag): method _pushdown (line 50) | def _pushdown(self, i): method _pushup (line 58) | def _pushup(self, i): method _build (line 66) | def _build(self, data, l, r, i): method _update (line 77) | def _update(self, target_l, target_r, tag, l, r, i): method _find (line 90) | def _find(self, target_l, target_r, val, l, r, i): class Solution (line 111) | class Solution: method longestBalanced (line 112) | def longestBalanced(self, nums: List[int]) -> int: FILE: Python/373-find-k-pairs-with-smallest-sums.py class Solution (line 7) | class Solution: method kSmallestPairs (line 8) | def kSmallestPairs(self, nums1: List[int], nums2: List[int], k: int) -... FILE: Python/3731-find-missing-elements.py class Solution (line 6) | class Solution: method findMissingElements (line 7) | def findMissingElements(self, nums: List[int]) -> List[int]: FILE: Python/3732-maximum-product-of-three-elements-after-one-replacement.py class Solution (line 6) | class Solution: method maxProduct (line 7) | def maxProduct(self, nums: List[int]) -> int: FILE: Python/3733-minimum-time-to-complete-all-deliveries.py class Solution (line 7) | class Solution: method minimumTime (line 8) | def minimumTime(self, d: List[int], r: List[int]) -> int: FILE: Python/3740-minimum-distance-between-three-equal-elements-i.py class Solution (line 6) | class Solution: method minimumDistance (line 7) | def minimumDistance(self, nums: List[int]) -> int: FILE: Python/3741-minimum-distance-between-three-equal-elements-ii.py class Solution (line 6) | class Solution: method minimumDistance (line 7) | def minimumDistance(self, nums: List[int]) -> int: FILE: Python/3742-maximum-path-score-in-a-grid.py class Solution (line 6) | class Solution: method maxPathScore (line 7) | def maxPathScore(self, grid: List[List[int]], k: int) -> int: FILE: Python/3745-maximize-expression-of-three-elements.py class Solution (line 6) | class Solution: method maximizeExpressionOfThree (line 7) | def maximizeExpressionOfThree(self, nums: List[int]) -> int: FILE: Python/3746-minimum-string-length-after-balanced-removals.py class Solution (line 3) | class Solution: method minLengthAfterRemovals (line 4) | def minLengthAfterRemovals(self, s: str) -> int: FILE: Python/3747-count-distinct-integers-after-removing-zeros.py class Solution (line 3) | class Solution: method countDistinct (line 4) | def countDistinct(self, n: int) -> int: FILE: Python/3748-sort-matrix-by-diagonals.py class Solution (line 7) | class Solution: method sortMatrix (line 8) | def sortMatrix(self, grid: List[List[int]]) -> List[List[int]]: FILE: Python/3750-minimum-number-of-flips-to-reverse-binary-string.py class Solution (line 3) | class Solution: method minimumFlips (line 4) | def minimumFlips(self, n: int) -> int: FILE: Python/3751-total-waviness-of-numbers-in-range-i.py class Solution (line 3) | class Solution: method totalWaviness (line 4) | def totalWaviness(self, num1: int, num2: int) -> int: FILE: Python/3752-lexicographically-smallest-negated-permutation-that-sums-to-target.py class Solution (line 6) | class Solution: method lexSmallestNegatedPerm (line 7) | def lexSmallestNegatedPerm(self, n: int, target: int) -> List[int]: FILE: Python/3765-complete-prime-number.py class Solution (line 3) | class Solution: method completePrime (line 4) | def completePrime(self, num: int) -> bool: FILE: Python/3766-minimum-operations-to-make-binary-palindrome.py class Solution (line 7) | class Solution: method minOperations (line 8) | def minOperations(self, nums: List[int]) -> List[int]: FILE: Python/3767-maximize-points-after-choosing-k-tasks.py class Solution (line 6) | class Solution: method maxPoints (line 7) | def maxPoints(self, technique1: List[int], technique2: List[int], k: i... FILE: Python/3769-sort-integers-by-binary-reflection.py class Solution (line 6) | class Solution: method sortByReflection (line 7) | def sortByReflection(self, nums: List[int]) -> List[int]: FILE: Python/3770-largest-prime-from-consecutive-prime-sum.py class Solution (line 3) | class Solution: method largestPrime (line 4) | def largestPrime(self, n: int) -> int: FILE: Python/3771-total-score-of-dungeon-runs.py class Solution (line 7) | class Solution: method totalScore (line 8) | def totalScore(self, hp: int, damage: List[int], requirement: List[int... FILE: Python/3774-absolute-difference-between-maximum-and-minimum-k-elements.py class Solution (line 6) | class Solution: method absDifference (line 7) | def absDifference(self, nums: List[int], k: int) -> int: FILE: Python/3775-reverse-words-with-same-vowel-count.py class Solution (line 3) | class Solution: method reverseWords (line 4) | def reverseWords(self, s: str) -> str: FILE: Python/3776-minimum-moves-to-balance-circular-array.py class Solution (line 6) | class Solution: method minMoves (line 7) | def minMoves(self, balance: List[int]) -> int: FILE: Python/3779-minimum-number-of-operations-to-have-distinct-elements.py class Solution (line 7) | class Solution: method minOperations (line 8) | def minOperations(self, nums: List[int]) -> int: FILE: Python/3780-maximum-sum-of-three-numbers-divisible-by-three.py class Solution (line 6) | class Solution: method maximumSum (line 7) | def maximumSum(self, nums: List[int]) -> int: FILE: Python/3781-maximum-score-after-binary-swaps.py class Solution (line 7) | class Solution: method maximumScore (line 8) | def maximumScore(self, nums: List[int], s: str) -> int: FILE: Python/3783-mirror-distance-of-an-integer.py class Solution (line 3) | class Solution: method mirrorDistance (line 4) | def mirrorDistance(self, n: int) -> int: FILE: Python/3784-minimum-deletion-cost-to-make-all-characters-equal.py class Solution (line 6) | class Solution: method minCost (line 7) | def minCost(self, s: str, cost: List[int]) -> int: FILE: Python/3785-minimum-swaps-to-avoid-forbidden-values.py class Solution (line 6) | class Solution: method minSwaps (line 7) | def minSwaps(self, nums: List[int], forbidden: List[int]) -> int: FILE: Python/401-binary-watch.py class Solution (line 6) | class Solution: method readBinaryWatch (line 7) | def readBinaryWatch(self, turnedOn: int) -> List[str]: FILE: Python/480-sliding-window-median.py class Solution (line 8) | class Solution: method medianSlidingWindow (line 9) | def medianSlidingWindow(self, nums: List[int], k: int) -> List[float]: FILE: Python/661-49-group-anagrams.py class Solution (line 7) | class Solution: method groupAnagrams (line 8) | def groupAnagrams(self, strs: List[str]) -> List[List[str]]: FILE: TypeScript/0001-two-sum.ts function twoSum (line 1) | function twoSum(nums: number[], target: number): number[] { FILE: TypeScript/2618-check-if-object-instance-of-class.ts function checkIfInstanceOf (line 1) | function checkIfInstanceOf(obj: any, classFunction: any): boolean { class Animal (line 22) | class Animal {} class Dog (line 23) | class Dog extends Animal {} FILE: TypeScript/2619-array-prototype-last.ts type Array (line 2) | interface Array { FILE: TypeScript/2620-counter.ts function createCounter (line 1) | function createCounter(n: number): () => number { FILE: TypeScript/2621-sleep.ts function sleep (line 1) | async function sleep(millis: number): Promise { FILE: TypeScript/2622-cache-with-time-limit.ts type MapEntry (line 1) | type MapEntry = { class TimeLimitedCache (line 6) | class TimeLimitedCache { method set (line 8) | set(key: number, value: number, duration: number): boolean { method get (line 20) | get(key: number): number { method count (line 25) | count(): number { FILE: TypeScript/2623-memoize.ts type Fn (line 1) | type Fn = (...params: any) => any; function memoize (line 3) | function memoize(fn: Fn): Fn { FILE: TypeScript/2624-snail-traversal.ts type Array (line 2) | interface Array { FILE: TypeScript/2625-flatten-deeply-nested-array.ts type MultiDimensionalArray (line 1) | type MultiDimensionalArray = (number | MultiDimensionalArray)[]; FILE: TypeScript/2626-array-reduce-transformation.ts type FnCus (line 1) | type FnCus = (accum: number, curr: number) => number; function reduce (line 3) | function reduce(nums: number[], fn: FnCus, init: number): number { FILE: TypeScript/2627-debounce.ts type F (line 1) | type F = (...p: any[]) => any; function debounce (line 3) | function debounce(fn: F, t: number): F { FILE: TypeScript/2628-json-deep-equal.ts function areDeeplyEqual (line 1) | function areDeeplyEqual(o1: any, o2: any): boolean { FILE: TypeScript/2629-function-composition.ts type Func (line 1) | type Func = (x: number) => number; function compose (line 3) | function compose(functions: Func[]): Func { FILE: TypeScript/2630-memoize-ii.ts type FnMemoII (line 1) | type FnMemoII = (...params: any) => any; function createKeyGenerator (line 3) | function createKeyGenerator() { function memoize (line 13) | function memoize(fn: FnMemoII): FnMemoII { FILE: TypeScript/2631-group-by.ts type Array (line 2) | interface Array { FILE: TypeScript/2632-curry.ts function curry (line 1) | function curry(fn: Function): Function { function sum (line 12) | function sum(a: number, b: number) { FILE: TypeScript/2633-convert-object-to-json-string.ts function jsonStringify (line 1) | function jsonStringify(object: any): string { FILE: TypeScript/2634-filter-elements-from-array.ts function filter (line 1) | function filter(arr: number[], fn: (n: number, i: number) => any): numbe... FILE: TypeScript/2635-apply-transform-over-each-element-in-array.ts function map (line 1) | function map(arr: number[], fn: (n: number, i: number) => number): numbe... FILE: TypeScript/2636-promise-pool.ts type F (line 1) | type F = () => Promise; function promisePool (line 3) | function promisePool(functions: F[], n: number): Promise { FILE: TypeScript/2637-promise-time-limit.ts type Fn (line 1) | type Fn = (...params: any[]) => Promise; function timeLimit (line 3) | function timeLimit(fn: Fn, t: number): Fn { FILE: TypeScript/2649-nested-array-generator.ts type MultidimensionalArray (line 1) | type MultidimensionalArray = (MultidimensionalArray | number)[]; FILE: TypeScript/2650-design-cancellable-function.ts function cancellable (line 1) | function cancellable(generator: Generator, T, unknown>):... FILE: TypeScript/2665-counter-ii.ts type ReturnObj (line 1) | type ReturnObj = { function createCounter (line 7) | function createCounter(init: number): ReturnObj { FILE: TypeScript/2666-allow-one-function-call.ts type Fn1 (line 1) | type Fn1 = (...args: any[]) => any function once (line 3) | function once(fn: Fn1): Fn1 { FILE: TypeScript/2667-create-hello-world-function.ts function createHelloWorld (line 1) | function createHelloWorld() { FILE: TypeScript/2675-array-of-objects-to-matrix.ts function jsonToMatrix (line 1) | function jsonToMatrix(arr: any[]): (string | number | boolean | null)[][] { FILE: TypeScript/2676-throttle.ts type F1 (line 1) | type F1 = (...args: any[]) => void; function throttle (line 3) | function throttle(fn: F1, t: number): F1 { FILE: TypeScript/2677-chunk-array.ts function chunk (line 1) | function chunk(arr: any[], size: number): any[][] { FILE: TypeScript/2690-infinite-method-object.ts function createInfiniteObject (line 1) | function createInfiniteObject(): Record string> { FILE: TypeScript/2692-make-object-immutable.ts type Obj (line 1) | type Obj = Array | Record; function dfs (line 8) | function dfs(obj: Obj): Obj { FILE: organize.py function process_test_md (line 3) | def process_test_md(input_file, output_file):