SYMBOL INDEX (2360 symbols across 724 files) FILE: selected_coding_interview/codes/cpp/include/ListNode.hpp type ListNode (line 17) | struct ListNode { method ListNode (line 20) | ListNode(int x) : val(x), next(nullptr) { function ListNode (line 30) | ListNode *vectorToLinkedList(vector list) { method ListNode (line 20) | ListNode(int x) : val(x), next(nullptr) { function ListNode (line 47) | ListNode *getListNode(ListNode *head, int val) { method ListNode (line 20) | ListNode(int x) : val(x), next(nullptr) { class Node (line 58) | class Node { method Node (line 64) | Node(int _val) { FILE: selected_coding_interview/codes/cpp/include/PrintUtil.hpp class PrintUtil (line 16) | class PrintUtil { method vecFind (line 26) | static int vecFind(const vector &vec, T ele) { method string (line 44) | static string strJoin(const string &delim, const T &vec) { method string (line 62) | static string strRepeat(string str, int n) { method string (line 76) | static string getVectorString(vector &list) { method printVector (line 86) | static void printVector(vector &list) { method printVectorMatrix (line 96) | static void printVectorMatrix(vector> &matrix) { method printLinkedList (line 108) | static void printLinkedList(ListNode *head) { type Trunk (line 122) | struct Trunk { method Trunk (line 125) | Trunk(Trunk *prev, string str) { method showTrunks (line 136) | static void showTrunks(Trunk *p) { method printTree (line 150) | static void printTree(TreeNode *root) { method printTree (line 161) | static void printTree(TreeNode *root, Trunk *prev, bool isLeft) { FILE: selected_coding_interview/codes/cpp/include/TreeNode.hpp type TreeNode (line 18) | struct TreeNode { method TreeNode (line 22) | TreeNode(int x) : val(x), left(nullptr), right(nullptr) { function TreeNode (line 32) | TreeNode *vectorToTree(vector list) { method TreeNode (line 22) | TreeNode(int x) : val(x), left(nullptr), right(nullptr) { function TreeNode (line 62) | TreeNode *getTreeNode(TreeNode *root, int val) { method TreeNode (line 22) | TreeNode(int x) : val(x), left(nullptr), right(nullptr) { FILE: selected_coding_interview/codes/cpp/lc_101_symmetric_tree/lc_101_symmetric_tree_s1.cpp class Solution (line 10) | class Solution { method isSymmetric (line 12) | bool isSymmetric(TreeNode* root) { method recur (line 16) | bool recur(TreeNode* L, TreeNode* R) { function main (line 23) | int main() { FILE: selected_coding_interview/codes/cpp/lc_102_binary_tree_level_order_traversal/lc_102_binary_tree_level_order_traversal_s1.cpp class Solution (line 10) | class Solution { method levelOrder (line 12) | vector> levelOrder(TreeNode* root) { function main (line 31) | int main() { FILE: selected_coding_interview/codes/cpp/lc_103_binary_tree_zigzag_level_order_traversal/lc_103_binary_tree_zigzag_level_order_traversal_s1.cpp class Solution (line 10) | class Solution { method zigzagLevelOrder (line 12) | vector> zigzagLevelOrder(TreeNode* root) { function main (line 47) | int main() { FILE: selected_coding_interview/codes/cpp/lc_103_binary_tree_zigzag_level_order_traversal/lc_103_binary_tree_zigzag_level_order_traversal_s2.cpp class Solution (line 10) | class Solution { method zigzagLevelOrder (line 12) | vector> zigzagLevelOrder(TreeNode* root) { function main (line 32) | int main() { FILE: selected_coding_interview/codes/cpp/lc_104_maximum_depth_of_binary_tree/lc_104_maximum_depth_of_binary_tree_s1.cpp class Solution (line 10) | class Solution { method maxDepth (line 12) | int maxDepth(TreeNode* root) { function main (line 18) | int main() { FILE: selected_coding_interview/codes/cpp/lc_104_maximum_depth_of_binary_tree/lc_104_maximum_depth_of_binary_tree_s2.cpp class Solution (line 10) | class Solution { method maxDepth (line 12) | int maxDepth(TreeNode* root) { function main (line 30) | int main() { FILE: selected_coding_interview/codes/cpp/lc_105_construct_binary_tree_from_preorder_and_inorder_traversal/lc_105_construct_binary_tree_from_preorder_and_inorder_traversal_s1.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode* buildTree(vector& preorder, vector& inorder) { method TreeNode (line 21) | TreeNode* recur(int root, int left, int right) { function main (line 31) | int main() { FILE: selected_coding_interview/codes/cpp/lc_10_regular_expression_matching/lc_10_regular_expression_matching_s1.cpp class Solution (line 10) | class Solution { method isMatch (line 12) | bool isMatch(string s, string p) { function main (line 29) | int main() { FILE: selected_coding_interview/codes/cpp/lc_10_regular_expression_matching/lc_10_regular_expression_matching_s2.cpp class Solution (line 10) | class Solution { method isMatch (line 12) | bool isMatch(string s, string p) { function main (line 36) | int main() { FILE: selected_coding_interview/codes/cpp/lc_110_balanced_binary_tree/lc_110_balanced_binary_tree_s1.cpp class Solution (line 10) | class Solution { method isBalanced (line 12) | bool isBalanced(TreeNode* root) { method recur (line 16) | int recur(TreeNode* root) { function main (line 26) | int main() { FILE: selected_coding_interview/codes/cpp/lc_110_balanced_binary_tree/lc_110_balanced_binary_tree_s2.cpp class Solution (line 10) | class Solution { method isBalanced (line 12) | bool isBalanced(TreeNode* root) { method depth (line 17) | int depth(TreeNode* root) { function main (line 23) | int main() { FILE: selected_coding_interview/codes/cpp/lc_113_path_sum_ii/lc_113_path_sum_ii_s1.cpp class Solution (line 10) | class Solution { method pathSum (line 12) | vector> pathSum(TreeNode* root, int targetSum) { method recur (line 19) | void recur(TreeNode* root, int tar) { function main (line 31) | int main() { FILE: selected_coding_interview/codes/cpp/lc_11_container_with_most_water/lc_11_container_with_most_water_s1.cpp class Solution (line 10) | class Solution { method maxArea (line 12) | int maxArea(vector& height) { function main (line 23) | int main() { FILE: selected_coding_interview/codes/cpp/lc_121_best_time_to_buy_and_sell_stock/lc_121_best_time_to_buy_and_sell_stock_s1.cpp class Solution (line 10) | class Solution { method maxProfit (line 12) | int maxProfit(vector& prices) { function main (line 22) | int main() { FILE: selected_coding_interview/codes/cpp/lc_136_single_number/lc_136_single_number_s1.cpp class Solution (line 10) | class Solution { method singleNumber (line 12) | int singleNumber(vector& nums) { function main (line 20) | int main() { FILE: selected_coding_interview/codes/cpp/lc_138_copy_list_with_random_pointer/lc_138_copy_list_with_random_pointer_s1.cpp class Node (line 11) | class Node { method Node (line 15) | Node(int _val) { function main (line 21) | int main() { FILE: selected_coding_interview/codes/cpp/lc_138_copy_list_with_random_pointer/lc_138_copy_list_with_random_pointer_s2.cpp class Node (line 11) | class Node { method Node (line 16) | Node(int _val) { function main (line 23) | int main() { FILE: selected_coding_interview/codes/cpp/lc_138_copy_list_with_random_pointer/lc_138_copy_list_with_random_pointer_s3.cpp class Solution (line 10) | class Solution { method Node (line 12) | Node* copyRandomList(Node* head) { function main (line 26) | int main() { FILE: selected_coding_interview/codes/cpp/lc_138_copy_list_with_random_pointer/lc_138_copy_list_with_random_pointer_s4.cpp class Solution (line 10) | class Solution { method Node (line 12) | Node* copyRandomList(Node* head) { function main (line 33) | int main() { FILE: selected_coding_interview/codes/cpp/lc_138_copy_list_with_random_pointer/lc_138_copy_list_with_random_pointer_s5.cpp class Solution (line 10) | class Solution { method Node (line 12) | Node* copyRandomList(Node* head) { function main (line 43) | int main() { FILE: selected_coding_interview/codes/cpp/lc_1480_running_sum_of_1d_array/lc_1480_running_sum_of_1d_array_s1.cpp class Solution (line 10) | class Solution { method runningSum (line 12) | vector runningSum(vector& nums) { function main (line 22) | int main() { FILE: selected_coding_interview/codes/cpp/lc_154_find_minimum_in_rotated_sorted_array_ii/lc_154_find_minimum_in_rotated_sorted_array_ii_s1.cpp class Solution (line 10) | class Solution { method findMin (line 12) | int findMin(vector& nums) { function main (line 24) | int main() { FILE: selected_coding_interview/codes/cpp/lc_154_find_minimum_in_rotated_sorted_array_ii/lc_154_find_minimum_in_rotated_sorted_array_ii_s2.cpp class Solution (line 10) | class Solution { method findMin (line 12) | int findMin(vector& nums) { function main (line 30) | int main() { FILE: selected_coding_interview/codes/cpp/lc_160_intersection_of_two_linked_lists/lc_160_intersection_of_two_linked_lists_s1.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { function main (line 22) | int main() { FILE: selected_coding_interview/codes/cpp/lc_167_two_sum_ii_input_array_is_sorted/lc_167_two_sum_ii_input_array_is_sorted_s1.cpp class Solution (line 10) | class Solution { method twoSum (line 12) | vector twoSum(vector& numbers, int target) { function main (line 24) | int main() { FILE: selected_coding_interview/codes/cpp/lc_169_majority_element/lc_169_majority_element_s1.cpp class Solution (line 10) | class Solution { method majorityElement (line 12) | int majorityElement(vector& nums) { function main (line 22) | int main() { FILE: selected_coding_interview/codes/cpp/lc_169_majority_element/lc_169_majority_element_s2.cpp class Solution (line 10) | class Solution { method majorityElement (line 12) | int majorityElement(vector& nums) { function main (line 25) | int main() { FILE: selected_coding_interview/codes/cpp/lc_179_largest_number/lc_179_largest_number_s1.cpp class Solution (line 10) | class Solution { method string (line 12) | string largestNumber(vector& nums) { function main (line 26) | int main() { FILE: selected_coding_interview/codes/cpp/lc_179_largest_number/lc_179_largest_number_s2.cpp class Solution (line 10) | class Solution { method string (line 12) | string largestNumber(vector& nums) { method quickSort (line 25) | void quickSort(vector& strs, int l, int r) { function main (line 39) | int main() { FILE: selected_coding_interview/codes/cpp/lc_1823_find_the_winner_of_the_circular_game/lc_1823_find_the_winner_of_the_circular_game_s1.cpp class Solution (line 10) | class Solution { method findTheWinner (line 12) | int findTheWinner(int n, int k) { function main (line 21) | int main() { FILE: selected_coding_interview/codes/cpp/lc_191_number_of_1_bits/lc_191_number_of_1_bits_s1.cpp class Solution (line 10) | class Solution { method hammingWeight (line 12) | int hammingWeight(uint32_t n) { function main (line 22) | int main() { FILE: selected_coding_interview/codes/cpp/lc_191_number_of_1_bits/lc_191_number_of_1_bits_s2.cpp class Solution (line 10) | class Solution { method hammingWeight (line 12) | int hammingWeight(uint32_t n) { function main (line 22) | int main() { FILE: selected_coding_interview/codes/cpp/lc_205_isomorphic_strings/lc_205_isomorphic_strings_s1.cpp class Solution (line 10) | class Solution { method isIsomorphic (line 12) | bool isIsomorphic(string s, string t) { function main (line 29) | int main() { FILE: selected_coding_interview/codes/cpp/lc_206_reverse_linked_list/lc_206_reverse_linked_list_s1.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode* reverseList(ListNode* head) { function main (line 24) | int main() { FILE: selected_coding_interview/codes/cpp/lc_206_reverse_linked_list/lc_206_reverse_linked_list_s2.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode* reverseList(ListNode* head) { method ListNode (line 16) | ListNode* recur(ListNode* cur, ListNode* pre) { function main (line 24) | int main() { FILE: selected_coding_interview/codes/cpp/lc_215_kth_largest_element_in_an_array/lc_215_kth_largest_element_in_an_array_s1.cpp class Solution (line 10) | class Solution { method findKthLargest (line 12) | int findKthLargest(vector& nums, int k) { method quickSort (line 17) | void quickSort(vector& nums, int l, int r) { function main (line 34) | int main() { FILE: selected_coding_interview/codes/cpp/lc_215_kth_largest_element_in_an_array/lc_215_kth_largest_element_in_an_array_s2.cpp class Solution (line 10) | class Solution { method findKthLargest (line 12) | int findKthLargest(vector& nums, int k) { method quickSort (line 16) | int quickSort(vector& nums, int k, int l, int r) { function main (line 31) | int main() { FILE: selected_coding_interview/codes/cpp/lc_21_merge_two_sorted_lists/lc_21_merge_two_sorted_lists_s1.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode* mergeTwoLists(ListNode* list1, ListNode* list2) { function main (line 31) | int main() { FILE: selected_coding_interview/codes/cpp/lc_226_invert_binary_tree/lc_226_invert_binary_tree_s1.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode* invertTree(TreeNode* root) { function main (line 21) | int main() { FILE: selected_coding_interview/codes/cpp/lc_226_invert_binary_tree/lc_226_invert_binary_tree_s2.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode* invertTree(TreeNode* root) { function main (line 30) | int main() { FILE: selected_coding_interview/codes/cpp/lc_230_kth_smallest_element_in_a_bst/lc_230_kth_smallest_element_in_a_bst_s1.cpp class Solution (line 10) | class Solution { method kthSmallest (line 12) | int kthSmallest(TreeNode* root, int k) { method dfs (line 19) | void dfs(TreeNode* root) { function main (line 28) | int main() { FILE: selected_coding_interview/codes/cpp/lc_232_implement_queue_using_stacks/lc_232_implement_queue_using_stacks_s1.cpp class MyQueue (line 10) | class MyQueue { method MyQueue (line 15) | MyQueue() {} method push (line 17) | void push(int x) { method pop (line 21) | int pop() { method peek (line 27) | int peek() { method empty (line 37) | bool empty() { function main (line 42) | int main() { FILE: selected_coding_interview/codes/cpp/lc_233_number_of_digit_one/lc_233_number_of_digit_one_s1.cpp function main (line 15) | int main() { FILE: selected_coding_interview/codes/cpp/lc_233_number_of_digit_one/lc_233_number_of_digit_one_s2.cpp function main (line 17) | int main() { FILE: selected_coding_interview/codes/cpp/lc_233_number_of_digit_one/lc_233_number_of_digit_one_s3.cpp class Solution (line 10) | class Solution { method countDigitOne (line 12) | int countDigitOne(int n) { function main (line 28) | int main() { FILE: selected_coding_interview/codes/cpp/lc_235_lowest_common_ancestor_of_a_binary_search_tree/lc_235_lowest_common_ancestor_of_a_binary_search_tree_s1.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* ... function main (line 24) | int main() { FILE: selected_coding_interview/codes/cpp/lc_235_lowest_common_ancestor_of_a_binary_search_tree/lc_235_lowest_common_ancestor_of_a_binary_search_tree_s2.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* ... function main (line 26) | int main() { FILE: selected_coding_interview/codes/cpp/lc_235_lowest_common_ancestor_of_a_binary_search_tree/lc_235_lowest_common_ancestor_of_a_binary_search_tree_s3.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* ... function main (line 21) | int main() { FILE: selected_coding_interview/codes/cpp/lc_236_lowest_common_ancestor_of_a_binary_tree/lc_236_lowest_common_ancestor_of_a_binary_tree_s1.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* ... function main (line 22) | int main() { FILE: selected_coding_interview/codes/cpp/lc_236_lowest_common_ancestor_of_a_binary_tree/lc_236_lowest_common_ancestor_of_a_binary_tree_s2.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* ... function main (line 23) | int main() { FILE: selected_coding_interview/codes/cpp/lc_237_delete_node_in_a_linked_list/lc_237_delete_node_in_a_linked_list_s1.cpp class Solution (line 10) | class Solution { method deleteNode (line 12) | void deleteNode(ListNode* node) { function main (line 18) | int main() { FILE: selected_coding_interview/codes/cpp/lc_237_delete_node_in_a_linked_list/lc_237_delete_node_in_a_linked_list_s2.cpp class Solution (line 10) | class Solution { method deleteNode (line 12) | void deleteNode(ListNode* node) { function main (line 20) | int main() { FILE: selected_coding_interview/codes/cpp/lc_238_product_of_array_except_self/lc_238_product_of_array_except_self_s1.cpp class Solution (line 10) | class Solution { method productExceptSelf (line 12) | vector productExceptSelf(vector& nums) { function main (line 29) | int main() { FILE: selected_coding_interview/codes/cpp/lc_239_sliding_window_maximum/lc_239_sliding_window_maximum_s1.cpp class Solution (line 10) | class Solution { method maxSlidingWindow (line 12) | vector maxSlidingWindow(vector& nums, int k) { function main (line 33) | int main() { FILE: selected_coding_interview/codes/cpp/lc_239_sliding_window_maximum/lc_239_sliding_window_maximum_s2.cpp class Solution (line 10) | class Solution { method maxSlidingWindow (line 12) | vector maxSlidingWindow(vector& nums, int k) { function main (line 36) | int main() { FILE: selected_coding_interview/codes/cpp/lc_240_search_a_2d_matrix_ii/lc_240_search_a_2d_matrix_ii_s1.cpp class Solution (line 10) | class Solution { method searchMatrix (line 12) | bool searchMatrix(vector>& matrix, int target) { function main (line 24) | int main() { FILE: selected_coding_interview/codes/cpp/lc_242_valid_anagram/lc_242_valid_anagram_s1.cpp class Solution (line 10) | class Solution { method isAnagram (line 12) | bool isAnagram(string s, string t) { function main (line 30) | int main() { FILE: selected_coding_interview/codes/cpp/lc_242_valid_anagram/lc_242_valid_anagram_s2.cpp class Solution (line 10) | class Solution { method isAnagram (line 12) | bool isAnagram(string s, string t) { function main (line 37) | int main() { FILE: selected_coding_interview/codes/cpp/lc_264_ugly_number_ii/lc_264_ugly_number_ii_s1.cpp class Solution (line 10) | class Solution { method nthUglyNumber (line 12) | int nthUglyNumber(int n) { function main (line 27) | int main() { FILE: selected_coding_interview/codes/cpp/lc_266_palindrome_permutation/lc_266_palindrome_permutation_s1.cpp class Solution (line 10) | class Solution { method canPermutePalindrome (line 12) | bool canPermutePalindrome(string s) { function main (line 28) | int main() { FILE: selected_coding_interview/codes/cpp/lc_266_palindrome_permutation/lc_266_palindrome_permutation_s2.cpp class Solution (line 10) | class Solution { method canPermutePalindrome (line 12) | bool canPermutePalindrome(string s) { function main (line 33) | int main() { FILE: selected_coding_interview/codes/cpp/lc_278_first_bad_version/lc_278_first_bad_version_s1.cpp class Solution (line 10) | class Solution { method firstBadVersion (line 12) | int firstBadVersion(int n) { function main (line 27) | int main() { FILE: selected_coding_interview/codes/cpp/lc_287_find_the_duplicate_number/lc_287_find_the_duplicate_number_s1.cpp class Solution (line 10) | class Solution { method findDuplicate (line 12) | int findDuplicate(vector& nums) { function main (line 22) | int main() { FILE: selected_coding_interview/codes/cpp/lc_287_find_the_duplicate_number/lc_287_find_the_duplicate_number_s2.cpp class Solution (line 10) | class Solution { method findDuplicate (line 12) | int findDuplicate(vector& nums) { function main (line 27) | int main() { FILE: selected_coding_interview/codes/cpp/lc_287_find_the_duplicate_number/lc_287_find_the_duplicate_number_s3.cpp class Solution (line 10) | class Solution { method next (line 13) | int next(int index) { method findDuplicate (line 17) | int findDuplicate(vector& nums) { function main (line 36) | int main() { FILE: selected_coding_interview/codes/cpp/lc_295_find_median_from_data_stream/lc_295_find_median_from_data_stream_s1.cpp class MedianFinder (line 10) | class MedianFinder { method MedianFinder (line 14) | MedianFinder() { } method addNum (line 15) | void addNum(int num) { method findMedian (line 26) | double findMedian() { function main (line 31) | int main() { FILE: selected_coding_interview/codes/cpp/lc_371_sum_of_two_integers/lc_371_sum_of_two_integers_s1.cpp class Solution (line 10) | class Solution { method getSum (line 12) | int getSum(int a, int b) { function main (line 23) | int main() { FILE: selected_coding_interview/codes/cpp/lc_387_first_unique_character_in_a_string/lc_387_first_unique_character_in_a_string_s1.cpp class Solution (line 10) | class Solution { method firstUniqChar (line 12) | int firstUniqChar(string s) { function main (line 22) | int main() { FILE: selected_coding_interview/codes/cpp/lc_392_is_subsequence/lc_392_is_subsequence_s1.cpp class Solution (line 10) | class Solution { method isSubsequence (line 12) | bool isSubsequence(string s, string t) { function main (line 25) | int main() { FILE: selected_coding_interview/codes/cpp/lc_3_longest_substring_without_repeating_characters/lc_3_longest_substring_without_repeating_characters_s1.cpp class Solution (line 10) | class Solution { method lengthOfLongestSubstring (line 12) | int lengthOfLongestSubstring(string s) { function main (line 25) | int main() { FILE: selected_coding_interview/codes/cpp/lc_3_longest_substring_without_repeating_characters/lc_3_longest_substring_without_repeating_characters_s2.cpp class Solution (line 10) | class Solution { method lengthOfLongestSubstring (line 12) | int lengthOfLongestSubstring(string s) { function main (line 26) | int main() { FILE: selected_coding_interview/codes/cpp/lc_400_nth_digit/lc_400_nth_digit_s1.cpp function main (line 20) | int main() { FILE: selected_coding_interview/codes/cpp/lc_400_nth_digit/lc_400_nth_digit_s2.cpp function main (line 12) | int main() { FILE: selected_coding_interview/codes/cpp/lc_400_nth_digit/lc_400_nth_digit_s3.cpp function main (line 13) | int main() { FILE: selected_coding_interview/codes/cpp/lc_400_nth_digit/lc_400_nth_digit_s4.cpp class Solution (line 10) | class Solution { method findNthDigit (line 12) | int findNthDigit(int n) { function main (line 27) | int main() { FILE: selected_coding_interview/codes/cpp/lc_409_longest_palindrome/lc_409_longest_palindrome_s1.cpp class Solution (line 10) | class Solution { method longestPalindrome (line 12) | int longestPalindrome(string s) { function main (line 31) | int main() { FILE: selected_coding_interview/codes/cpp/lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list/lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list_s1.cpp function dfs (line 11) | void dfs(Node* root) { function main (line 18) | int main() { FILE: selected_coding_interview/codes/cpp/lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list/lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list_s2.cpp class Solution (line 10) | class Solution { method Node (line 12) | Node* treeToDoublyList(Node* root) { method dfs (line 22) | void dfs(Node* cur) { function main (line 33) | int main() { FILE: selected_coding_interview/codes/cpp/lc_46_permutations/lc_46_permutations_s1.cpp class Solution (line 10) | class Solution { method permute (line 12) | vector> permute(vector& nums) { method dfs (line 18) | void dfs(vector nums, int x) { function main (line 31) | int main() { FILE: selected_coding_interview/codes/cpp/lc_47_permutations_ii/lc_47_permutations_ii_s1.cpp class Solution (line 10) | class Solution { method permuteUnique (line 12) | vector> permuteUnique(vector& nums) { method dfs (line 18) | void dfs(vector nums, int x) { function main (line 35) | int main() { FILE: selected_coding_interview/codes/cpp/lc_48_rotate_image/lc_48_rotate_image_s1.cpp class Solution (line 10) | class Solution { method rotate (line 12) | void rotate(vector>& matrix) { function main (line 25) | int main() { FILE: selected_coding_interview/codes/cpp/lc_48_rotate_image/lc_48_rotate_image_s2.cpp class Solution (line 10) | class Solution { method rotate (line 12) | void rotate(vector>& matrix) { function main (line 26) | int main() { FILE: selected_coding_interview/codes/cpp/lc_48_rotate_image/lc_48_rotate_image_s3.cpp class Solution (line 10) | class Solution { method rotate (line 12) | void rotate(vector>& matrix) { function main (line 31) | int main() { FILE: selected_coding_interview/codes/cpp/lc_509_fibonacci_number/lc_509_fibonacci_number_s1.cpp class Solution (line 10) | class Solution { method fib (line 12) | int fib(int n) { function main (line 23) | int main() { FILE: selected_coding_interview/codes/cpp/lc_53_maximum_subarray/lc_53_maximum_subarray_s1.cpp class Solution (line 10) | class Solution { method maxSubArray (line 12) | int maxSubArray(vector& nums) { function main (line 22) | int main() { FILE: selected_coding_interview/codes/cpp/lc_54_spiral_matrix/lc_54_spiral_matrix_s1.cpp class Solution (line 10) | class Solution { method spiralOrder (line 12) | vector spiralOrder(vector>& matrix) { function main (line 30) | int main() { FILE: selected_coding_interview/codes/cpp/lc_65_valid_number/lc_65_valid_number_s1.cpp class Solution (line 10) | class Solution { method isNumber (line 12) | bool isNumber(string s) { function main (line 41) | int main() { FILE: selected_coding_interview/codes/cpp/lc_6_zigzag_conversion/lc_6_zigzag_conversion_s1.cpp class Solution (line 10) | class Solution { method string (line 12) | string convert(string s, int numRows) { function main (line 30) | int main() { FILE: selected_coding_interview/codes/cpp/lc_704_binary_search/lc_704_binary_search_s1.cpp class Solution (line 10) | class Solution { method search (line 12) | int search(vector& nums, int target) { function main (line 24) | int main() { FILE: selected_coding_interview/codes/cpp/lc_70_climbing_stairs/lc_70_climbing_stairs_s1.cpp class Solution (line 10) | class Solution { method climbStairs (line 12) | int climbStairs(int n) { function main (line 23) | int main() { FILE: selected_coding_interview/codes/cpp/lc_724_find_pivot_index/lc_724_find_pivot_index_s1.cpp class Solution (line 10) | class Solution { method pivotIndex (line 12) | int pivotIndex(vector& nums) { function main (line 25) | int main() { FILE: selected_coding_interview/codes/cpp/lc_796_rotate_string/lc_796_rotate_string_s1.cpp class Solution (line 10) | class Solution { method rotateString (line 12) | bool rotateString(string s, string goal) { function main (line 17) | int main() { FILE: selected_coding_interview/codes/cpp/lc_79_word_search/lc_79_word_search_s1.cpp class Solution (line 10) | class Solution { method exist (line 12) | bool exist(vector>& board, string word) { method dfs (line 24) | bool dfs(vector>& board, string word, int i, int j, int k) { function main (line 35) | int main() { FILE: selected_coding_interview/codes/cpp/lc_86_partition_list/lc_86_partition_list_s1.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode* partition(ListNode* head, int x) { function main (line 31) | int main() { FILE: selected_coding_interview/codes/cpp/lc_86_partition_list/lc_86_partition_list_s2.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode* partition(ListNode* head, int x) { function main (line 36) | int main() { FILE: selected_coding_interview/codes/cpp/lc_876_middle_of_the_linked_list/lc_876_middle_of_the_linked_list_s1.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode* middleNode(ListNode* head) { function main (line 22) | int main() { FILE: selected_coding_interview/codes/cpp/lc_8_string_to_integer_atoi/lc_8_string_to_integer_atoi_s1.cpp class Solution (line 10) | class Solution { method myAtoi (line 12) | int myAtoi(string s) { function main (line 30) | int main() { FILE: selected_coding_interview/codes/cpp/lc_946_validate_stack_sequences/lc_946_validate_stack_sequences_s1.cpp class Solution (line 10) | class Solution { method validateStackSequences (line 12) | bool validateStackSequences(vector& pushed, vector& popped) { function main (line 26) | int main() { FILE: selected_coding_interview/codes/java/include/ListNode.java class ListNode (line 8) | public class ListNode { method ListNode (line 12) | public ListNode(int x) { method arrToLinkedList (line 22) | public static ListNode arrToLinkedList(int[] arr) { method getListNode (line 39) | public static ListNode getListNode(ListNode head, int val) { FILE: selected_coding_interview/codes/java/include/PrintUtil.java class Trunk (line 5) | class Trunk { method Trunk (line 9) | Trunk(Trunk prev, String str) { class PrintUtil (line 15) | public class PrintUtil { method printLinkedList (line 21) | public static void printLinkedList(ListNode head) { method printTree (line 37) | public static void printTree(TreeNode root) { method printTree (line 48) | public static void printTree(TreeNode root, Trunk prev, boolean isLeft) { method showTrunks (line 79) | public static void showTrunks(Trunk p) { FILE: selected_coding_interview/codes/java/include/TreeNode.java class TreeNode (line 8) | public class TreeNode { method TreeNode (line 13) | public TreeNode(int x) { method arrToTree (line 23) | public static TreeNode arrToTree(Integer[] arr) { method treeToList (line 53) | public static List treeToList(TreeNode root) { method getTreeNode (line 82) | public static TreeNode getTreeNode(TreeNode root, int val) { FILE: selected_coding_interview/codes/java/lc_101_symmetric_tree/lc_101_symmetric_tree.java class Solution (line 13) | class Solution { method isSymmetric (line 14) | public boolean isSymmetric(TreeNode root) { method recur (line 17) | boolean recur(TreeNode L, TreeNode R) { class lc_101_symmetric_tree (line 24) | public class lc_101_symmetric_tree { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_102_binary_tree_level_order_traversal/lc_102_binary_tree_level_order_traversal.java class Solution (line 13) | class Solution { method levelOrder (line 14) | public List> levelOrder(TreeNode root) { class lc_102_binary_tree_level_order_traversal (line 32) | public class lc_102_binary_tree_level_order_traversal { method main (line 33) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_103_binary_tree_zigzag_level_order_traversal/lc_103_binary_tree_zigzag_level_order_traversal_s1.java class Solution (line 13) | class Solution { method zigzagLevelOrder (line 14) | public List> zigzagLevelOrder(TreeNode root) { class lc_103_binary_tree_zigzag_level_order_traversal_s1 (line 33) | public class lc_103_binary_tree_zigzag_level_order_traversal_s1 { method main (line 34) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_103_binary_tree_zigzag_level_order_traversal/lc_103_binary_tree_zigzag_level_order_traversal_s2.java class Solution (line 13) | class Solution { method zigzagLevelOrder (line 14) | public List> zigzagLevelOrder(TreeNode root) { class lc_103_binary_tree_zigzag_level_order_traversal_s2 (line 47) | public class lc_103_binary_tree_zigzag_level_order_traversal_s2 { method main (line 48) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_103_binary_tree_zigzag_level_order_traversal/lc_103_binary_tree_zigzag_level_order_traversal_s3.java class Solution (line 13) | class Solution { method zigzagLevelOrder (line 14) | public List> zigzagLevelOrder(TreeNode root) { class lc_103_binary_tree_zigzag_level_order_traversal_s3 (line 33) | public class lc_103_binary_tree_zigzag_level_order_traversal_s3 { method main (line 34) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_104_maximum_depth_of_binary_tree/lc_104_maximum_depth_of_binary_tree_s1.java class Solution (line 13) | class Solution { method maxDepth (line 14) | public int maxDepth(TreeNode root) { class lc_104_maximum_depth_of_binary_tree_s1 (line 20) | public class lc_104_maximum_depth_of_binary_tree_s1 { method main (line 21) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_104_maximum_depth_of_binary_tree/lc_104_maximum_depth_of_binary_tree_s2.java class Solution (line 13) | class Solution { method maxDepth (line 14) | public int maxDepth(TreeNode root) { class lc_104_maximum_depth_of_binary_tree_s2 (line 31) | public class lc_104_maximum_depth_of_binary_tree_s2 { method main (line 32) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_105_construct_binary_tree_from_preorder_and_inorder_traversal/lc_105_construct_binary_tree_from_preorder_and_inorder_traversal.java class Solution (line 13) | class Solution { method buildTree (line 16) | public TreeNode buildTree(int[] preorder, int[] inorder) { method recur (line 22) | TreeNode recur(int root, int left, int right) { class lc_105_construct_binary_tree_from_preorder_and_inorder_traversal (line 32) | public class lc_105_construct_binary_tree_from_preorder_and_inorder_trav... method main (line 33) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_10_regular_expression_matching/lc_10_regular_expression_matching_s1.java class Solution (line 13) | class Solution { method isMatch (line 14) | public boolean isMatch(String s, String p) { class lc_10_regular_expression_matching_s1 (line 31) | public class lc_10_regular_expression_matching_s1 { method main (line 32) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_10_regular_expression_matching/lc_10_regular_expression_matching_s2.java class Solution (line 13) | class Solution { method isMatch (line 14) | public boolean isMatch(String s, String p) { class lc_10_regular_expression_matching_s2 (line 38) | public class lc_10_regular_expression_matching_s2 { method main (line 39) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_110_balanced_binary_tree/lc_110_balanced_binary_tree_s1.java class Solution (line 13) | class Solution { method isBalanced (line 14) | public boolean isBalanced(TreeNode root) { method recur (line 17) | private int recur(TreeNode root) { class lc_110_balanced_binary_tree_s1 (line 27) | public class lc_110_balanced_binary_tree_s1 { method main (line 28) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_110_balanced_binary_tree/lc_110_balanced_binary_tree_s2.java class Solution (line 13) | class Solution { method isBalanced (line 14) | public boolean isBalanced(TreeNode root) { method depth (line 18) | private int depth(TreeNode root) { class lc_110_balanced_binary_tree_s2 (line 24) | public class lc_110_balanced_binary_tree_s2 { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_113_path_sum/lc_113_path_sum.java class Solution (line 13) | class Solution { method pathSum (line 16) | public List> pathSum(TreeNode root, int targetSum) { method recur (line 20) | void recur(TreeNode root, int tar) { class lc_113_path_sum (line 32) | public class lc_113_path_sum { method main (line 33) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_11_container_with_most_water/lc_11_container_with_most_water.java class Solution (line 13) | class Solution { method maxArea (line 14) | public int maxArea(int[] height) { class lc_11_container_with_most_water (line 25) | public class lc_11_container_with_most_water { method main (line 26) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_121_best_time_to_buy_and_sell_stock/lc_121_best_time_to_buy_and_sell_stock.java class Solution (line 13) | class Solution { method maxProfit (line 14) | public int maxProfit(int[] prices) { class lc_121_best_time_to_buy_and_sell_stock (line 24) | public class lc_121_best_time_to_buy_and_sell_stock { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_122_best_time_to_buy_and_sell_stock/lc_122_best_time_to_buy_and_sell_stock.java class Solution (line 13) | class Solution { method maxProfit (line 14) | public int maxProfit(int[] prices) { class lc_122_best_time_to_buy_and_sell_stock (line 24) | public class lc_122_best_time_to_buy_and_sell_stock { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_135_candy/lc_135_candy.java class Solution (line 13) | class Solution { method candy (line 14) | public int candy(int[] ratings) { class lc_135_candy (line 30) | public class lc_135_candy { method main (line 31) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_136_single_number/lc_136_single_number.java class Solution (line 13) | class Solution { method singleNumber (line 14) | public int singleNumber(int[] nums) { class lc_136_single_number (line 22) | public class lc_136_single_number { method main (line 23) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_137_single_number/lc_137_single_number_s1.java class Solution (line 13) | class Solution { method singleNumber (line 14) | public int singleNumber(int[] nums) { class lc_137_single_number_s1 (line 24) | public class lc_137_single_number_s1 { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_137_single_number/lc_137_single_number_s2.java class Solution (line 13) | class Solution { method singleNumber (line 14) | public int singleNumber(int[] nums) { class lc_137_single_number_s2 (line 31) | public class lc_137_single_number_s2 { method main (line 32) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_138_copy_list_with_random_pointer/lc_138_copy_list_with_random_pointer_s1.java class Node (line 14) | class Node { method Node (line 17) | public Node(int val) { class lc_138_copy_list_with_random_pointer_s1 (line 23) | public class lc_138_copy_list_with_random_pointer_s1 { method main (line 24) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_138_copy_list_with_random_pointer/lc_138_copy_list_with_random_pointer_s2.java class Node (line 14) | class Node { method Node (line 17) | public Node(int val) { class lc_138_copy_list_with_random_pointer_s2 (line 24) | public class lc_138_copy_list_with_random_pointer_s2 { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_138_copy_list_with_random_pointer/lc_138_copy_list_with_random_pointer_s3.java class Solution (line 13) | class Solution { method copyRandomList (line 14) | public Node copyRandomList(Node head) { class lc_138_copy_list_with_random_pointer_s3 (line 28) | public class lc_138_copy_list_with_random_pointer_s3 { method main (line 29) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_138_copy_list_with_random_pointer/lc_138_copy_list_with_random_pointer_s4.java class Solution (line 13) | class Solution { method copyRandomList (line 14) | public Node copyRandomList(Node head) { class lc_138_copy_list_with_random_pointer_s4 (line 35) | public class lc_138_copy_list_with_random_pointer_s4 { method main (line 36) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_138_copy_list_with_random_pointer/lc_138_copy_list_with_random_pointer_s5.java class Solution (line 13) | class Solution { method copyRandomList (line 14) | public Node copyRandomList(Node head) { class lc_138_copy_list_with_random_pointer_s5 (line 45) | public class lc_138_copy_list_with_random_pointer_s5 { method main (line 46) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_142_linked_list_cycle/lc_142_linked_list_cycle.java class Solution (line 13) | public class Solution { method detectCycle (line 14) | public ListNode detectCycle(ListNode head) { class lc_142_linked_list_cycle (line 31) | public class lc_142_linked_list_cycle { method main (line 32) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_1480_running_sum_of_1d_array/lc_1480_running_sum_of_1d_array.java class Solution (line 13) | class Solution { method runningSum (line 14) | public int[] runningSum(int[] nums) { class lc_1480_running_sum_of_1d_array (line 24) | public class lc_1480_running_sum_of_1d_array { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_151_reverse_words_in_a_string/lc_151_reverse_words_in_a_string_s1.java class Solution (line 13) | class Solution { method reverseWords (line 14) | public String reverseWords(String s) { class lc_151_reverse_words_in_a_string_s1 (line 28) | public class lc_151_reverse_words_in_a_string_s1 { method main (line 29) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_151_reverse_words_in_a_string/lc_151_reverse_words_in_a_string_s2.java class Solution (line 13) | class Solution { method reverseWords (line 14) | public String reverseWords(String s) { class lc_151_reverse_words_in_a_string_s2 (line 25) | public class lc_151_reverse_words_in_a_string_s2 { method main (line 26) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_154_find_minimum_in_rotated_sorted_array/lc_154_find_minimum_in_rotated_sorted_array_s1.java class Solution (line 13) | class Solution { method findMin (line 14) | public int findMin(int[] nums) { class lc_154_find_minimum_in_rotated_sorted_array_s1 (line 26) | public class lc_154_find_minimum_in_rotated_sorted_array_s1 { method main (line 27) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_154_find_minimum_in_rotated_sorted_array/lc_154_find_minimum_in_rotated_sorted_array_s2.java class Solution (line 13) | class Solution { method findMin (line 14) | public int findMin(int[] nums) { class lc_154_find_minimum_in_rotated_sorted_array_s2 (line 32) | public class lc_154_find_minimum_in_rotated_sorted_array_s2 { method main (line 33) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_155_min_stack/lc_155_min_stack.java class MinStack (line 13) | class MinStack { method MinStack (line 16) | public MinStack() { method push (line 20) | public void push(int x) { method pop (line 25) | public void pop() { method top (line 29) | public int top() { method getMin (line 32) | public int getMin() { class lc_155_min_stack (line 37) | public class lc_155_min_stack { method main (line 38) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_15_three_sum/lc_15_three_sum.java class Solution (line 13) | class Solution { method threeSum (line 14) | public List> threeSum(int[] nums) { class lc_15_three_sum (line 38) | public class lc_15_three_sum { method main (line 39) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_160_intersection_of_two_linked_lists/lc_160_intersection_of_two_linked_lists.java class Solution (line 13) | public class Solution { method getIntersectionNode (line 14) | public ListNode getIntersectionNode(ListNode headA, ListNode headB) { class lc_160_intersection_of_two_linked_lists (line 24) | public class lc_160_intersection_of_two_linked_lists { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_167_two_sum/lc_167_two_sum.java class Solution (line 13) | class Solution { method twoSum (line 14) | public int[] twoSum(int[] numbers, int target) { class lc_167_two_sum (line 26) | public class lc_167_two_sum { method main (line 27) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_169_majority_element/lc_169_majority_element_s1.java class Solution (line 13) | class Solution { method majorityElement (line 14) | public int majorityElement(int[] nums) { class lc_169_majority_element_s1 (line 24) | public class lc_169_majority_element_s1 { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_169_majority_element/lc_169_majority_element_s2.java class Solution (line 13) | class Solution { method majorityElement (line 14) | public int majorityElement(int[] nums) { class lc_169_majority_element_s2 (line 27) | public class lc_169_majority_element_s2 { method main (line 28) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_179_largest_number/lc_179_largest_number_s1.java class Solution (line 13) | class Solution { method largestNumber (line 14) | public String largestNumber(int[] nums) { class lc_179_largest_number_s1 (line 28) | public class lc_179_largest_number_s1 { method main (line 29) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_179_largest_number/lc_179_largest_number_s2.java class Solution (line 13) | class Solution { method quickSort (line 14) | void quickSort(String[] strs, int l, int r) { method largestNumber (line 30) | public String largestNumber(int[] nums) { class lc_179_largest_number_s2 (line 44) | public class lc_179_largest_number_s2 { method main (line 45) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_1823_find_the_winner_of_the_circular_game/lc_1823_find_the_winner_of_the_circular_game.java class Solution (line 13) | class Solution { method findTheWinner (line 14) | public int findTheWinner(int n, int k) { class lc_1823_find_the_winner_of_the_circular_game (line 23) | public class lc_1823_find_the_winner_of_the_circular_game { method main (line 24) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_191_number_of_1_bits/lc_191_number_of_1_bits_s1.java class Solution (line 13) | public class Solution { method hammingWeight (line 14) | public int hammingWeight(int n) { class lc_191_number_of_1_bits_s1 (line 24) | public class lc_191_number_of_1_bits_s1 { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_191_number_of_1_bits/lc_191_number_of_1_bits_s2.java class Solution (line 13) | public class Solution { method hammingWeight (line 14) | public int hammingWeight(int n) { class lc_191_number_of_1_bits_s2 (line 24) | public class lc_191_number_of_1_bits_s2 { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_198_house_robber/lc_198_house_robber.java class Solution (line 13) | class Solution { method rob (line 14) | public int rob(int[] nums) { class lc_198_house_robber (line 25) | public class lc_198_house_robber { method main (line 26) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_205_isomorphic_strings/lc_205_isomorphic_strings.java class Solution (line 13) | class Solution { method isIsomorphic (line 14) | public boolean isIsomorphic(String s, String t) { class lc_205_isomorphic_strings (line 31) | public class lc_205_isomorphic_strings { method main (line 32) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_206_reverse_linked_list/lc_206_reverse_linked_list_s1.java class Solution (line 13) | class Solution { method reverseList (line 14) | public ListNode reverseList(ListNode head) { class lc_206_reverse_linked_list_s1 (line 26) | public class lc_206_reverse_linked_list_s1 { method main (line 27) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_206_reverse_linked_list/lc_206_reverse_linked_list_s2.java class Solution (line 13) | class Solution { method reverseList (line 14) | public ListNode reverseList(ListNode head) { method recur (line 17) | private ListNode recur(ListNode cur, ListNode pre) { class lc_206_reverse_linked_list_s2 (line 25) | public class lc_206_reverse_linked_list_s2 { method main (line 26) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_207_course_schedule/lc_207_course_schedule_s1.java class Solution (line 13) | class Solution { method canFinish (line 14) | public boolean canFinish(int numCourses, int[][] prerequisites) { class lc_207_course_schedule_s1 (line 39) | public class lc_207_course_schedule_s1 { method main (line 40) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_207_course_schedule/lc_207_course_schedule_s2.java class Solution (line 13) | class Solution { method canFinish (line 14) | public boolean canFinish(int numCourses, int[][] prerequisites) { method dfs (line 25) | private boolean dfs(List> adjacency, int[] flags, int i) { class lc_207_course_schedule_s2 (line 36) | public class lc_207_course_schedule_s2 { method main (line 37) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_20_valid_parentheses/lc_20_valid_parentheses.java class Solution (line 13) | class Solution { method isValid (line 17) | public boolean isValid(String s) { class lc_20_valid_parentheses (line 28) | public class lc_20_valid_parentheses { method main (line 29) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_213_house_robber/lc_213_house_robber.java class Solution (line 13) | class Solution { method rob (line 14) | public int rob(int[] nums) { method myRob (line 20) | private int myRob(int[] nums) { class lc_213_house_robber (line 31) | public class lc_213_house_robber { method main (line 32) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_215_kth_largest_element_in_an_array/lc_215_kth_largest_element_in_an_array_s1.java class Solution (line 13) | class Solution { method swap (line 14) | private void swap(int[] nums, int i, int j) { method quickSort (line 19) | private void quickSort(int[] nums, int l, int r) { method findKthLargest (line 34) | public int findKthLargest(int[] nums, int k) { class lc_215_kth_largest_element_in_an_array_s1 (line 40) | public class lc_215_kth_largest_element_in_an_array_s1 { method main (line 41) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_215_kth_largest_element_in_an_array/lc_215_kth_largest_element_in_an_array_s2.java class Solution (line 13) | class Solution { method swap (line 14) | private void swap(int[] nums, int i, int j) { method quickSort (line 19) | private int quickSort(int[] nums, int k, int l, int r) { method findKthLargest (line 32) | public int findKthLargest(int[] nums, int k) { class lc_215_kth_largest_element_in_an_array_s2 (line 37) | public class lc_215_kth_largest_element_in_an_array_s2 { method main (line 38) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_21_merge_two_sorted_lists/lc_21_merge_two_sorted_lists.java class Solution (line 13) | class Solution { method mergeTwoLists (line 14) | public ListNode mergeTwoLists(ListNode list1, ListNode list2) { class lc_21_merge_two_sorted_lists (line 32) | public class lc_21_merge_two_sorted_lists { method main (line 33) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_226_invert_binary_tree/lc_226_invert_binary_tree_s1.java class Solution (line 13) | class Solution { method invertTree (line 14) | public TreeNode invertTree(TreeNode root) { class lc_226_invert_binary_tree_s1 (line 23) | public class lc_226_invert_binary_tree_s1 { method main (line 24) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_226_invert_binary_tree/lc_226_invert_binary_tree_s2.java class Solution (line 13) | class Solution { method invertTree (line 14) | public TreeNode invertTree(TreeNode root) { class lc_226_invert_binary_tree_s2 (line 29) | public class lc_226_invert_binary_tree_s2 { method main (line 30) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_230_kth_smallest_element_in_a_bst/lc_230_kth_smallest_element_in_a_bst.java class Solution (line 13) | class Solution { method dfs (line 15) | void dfs(TreeNode root) { method kthSmallest (line 22) | public int kthSmallest(TreeNode root, int k) { class lc_230_kth_smallest_element_in_a_bst (line 29) | public class lc_230_kth_smallest_element_in_a_bst { method main (line 30) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_231_power_of_two/lc_231_power_of_two.java class Solution (line 13) | class Solution { method isPowerOfTwo (line 14) | public boolean isPowerOfTwo(int n) { class lc_231_power_of_two (line 19) | public class lc_231_power_of_two { method main (line 20) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_232_implement_queue_using_stacks/lc_232_implement_queue_using_stacks.java class MyQueue (line 13) | class MyQueue { method MyQueue (line 16) | public MyQueue() { method push (line 20) | public void push(int x) { method pop (line 23) | public int pop() { method peek (line 28) | public int peek() { method empty (line 36) | public boolean empty() { class lc_232_implement_queue_using_stacks (line 41) | public class lc_232_implement_queue_using_stacks { method main (line 42) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_233_number_of_digit_one/lc_233_number_of_digit_one_s1.java class lc_233_number_of_digit_one_s1 (line 18) | public class lc_233_number_of_digit_one_s1 { method main (line 19) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_233_number_of_digit_one/lc_233_number_of_digit_one_s2.java class lc_233_number_of_digit_one_s2 (line 20) | public class lc_233_number_of_digit_one_s2 { method main (line 21) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_233_number_of_digit_one/lc_233_number_of_digit_one_s3.java class Solution (line 13) | class Solution { method countDigitOne (line 14) | public int countDigitOne(int n) { class lc_233_number_of_digit_one_s3 (line 30) | public class lc_233_number_of_digit_one_s3 { method main (line 31) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_235_lowest_common_ancestor_of_bst/lc_235_lowest_common_ancestor_of_bst_s1.java class Solution (line 13) | class Solution { method lowestCommonAncestor (line 14) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo... class lc_235_lowest_common_ancestor_of_bst_s1 (line 26) | public class lc_235_lowest_common_ancestor_of_bst_s1 { method main (line 27) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_235_lowest_common_ancestor_of_bst/lc_235_lowest_common_ancestor_of_bst_s2.java class Solution (line 13) | class Solution { method lowestCommonAncestor (line 14) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo... class lc_235_lowest_common_ancestor_of_bst_s2 (line 31) | public class lc_235_lowest_common_ancestor_of_bst_s2 { method main (line 32) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_235_lowest_common_ancestor_of_bst/lc_235_lowest_common_ancestor_of_bst_s3.java class Solution (line 13) | class Solution { method lowestCommonAncestor (line 14) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo... class lc_235_lowest_common_ancestor_of_bst_s3 (line 23) | public class lc_235_lowest_common_ancestor_of_bst_s3 { method main (line 24) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_236_lowest_common_ancestor_of_binary_tree/lc_236_lowest_common_ancestor_of_binary_tree_s1.java class Solution (line 13) | class Solution { method lowestCommonAncestor (line 14) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo... class lc_236_lowest_common_ancestor_of_binary_tree_s1 (line 24) | public class lc_236_lowest_common_ancestor_of_binary_tree_s1 { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_236_lowest_common_ancestor_of_binary_tree/lc_236_lowest_common_ancestor_of_binary_tree_s2.java class Solution (line 13) | class Solution { method lowestCommonAncestor (line 14) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo... class lc_236_lowest_common_ancestor_of_binary_tree_s2 (line 25) | public class lc_236_lowest_common_ancestor_of_binary_tree_s2 { method main (line 26) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_237_delete_node_in_linked_list/lc_237_delete_node_in_linked_list_s1.java class Solution (line 13) | class Solution { method deleteNode (line 14) | public void deleteNode(ListNode node) { class lc_237_delete_node_in_linked_list_s1 (line 20) | public class lc_237_delete_node_in_linked_list_s1 { method main (line 21) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_237_delete_node_in_linked_list/lc_237_delete_node_in_linked_list_s2.java class Solution (line 13) | class Solution { method deleteNode (line 14) | public void deleteNode(ListNode node) { class lc_237_delete_node_in_linked_list_s2 (line 22) | public class lc_237_delete_node_in_linked_list_s2 { method main (line 23) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_238_product_of_array_except_self/lc_238_product_of_array_except_self.java class Solution (line 13) | class Solution { method productExceptSelf (line 14) | public int[] productExceptSelf(int[] nums) { class lc_238_product_of_array_except_self (line 31) | public class lc_238_product_of_array_except_self { method main (line 32) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_239_sliding_window_maximum/lc_239_sliding_window_maximum_s1.java class Solution (line 13) | class Solution { method maxSlidingWindow (line 14) | public int[] maxSlidingWindow(int[] nums, int k) { class lc_239_sliding_window_maximum_s1 (line 34) | public class lc_239_sliding_window_maximum_s1 { method main (line 35) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_239_sliding_window_maximum/lc_239_sliding_window_maximum_s2.java class Solution (line 13) | class Solution { method maxSlidingWindow (line 14) | public int[] maxSlidingWindow(int[] nums, int k) { class lc_239_sliding_window_maximum_s2 (line 38) | public class lc_239_sliding_window_maximum_s2 { method main (line 39) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_240_search_a_2d_matrix/lc_240_search_a_2d_matrix.java class Solution (line 13) | class Solution { method searchMatrix (line 14) | public boolean searchMatrix(int[][] matrix, int target) { class lc_240_search_a_2d_matrix (line 26) | public class lc_240_search_a_2d_matrix { method main (line 27) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_242_valid_anagram/lc_242_valid_anagram_s1.java class Solution (line 13) | class Solution { method isAnagram (line 14) | public boolean isAnagram(String s, String t) { class lc_242_valid_anagram_s1 (line 33) | public class lc_242_valid_anagram_s1 { method main (line 34) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_242_valid_anagram/lc_242_valid_anagram_s2.java class Solution (line 13) | class Solution { method isAnagram (line 14) | public boolean isAnagram(String s, String t) { class lc_242_valid_anagram_s2 (line 41) | public class lc_242_valid_anagram_s2 { method main (line 42) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_264_ugly_number/lc_264_ugly_number.java class Solution (line 13) | class Solution { method nthUglyNumber (line 14) | public int nthUglyNumber(int n) { class lc_264_ugly_number (line 29) | public class lc_264_ugly_number { method main (line 30) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_266_palindrome_permutation/lc_266_palindrome_permutation_s1.java class Solution (line 13) | class Solution { method canPermutePalindrome (line 14) | public boolean canPermutePalindrome(String s) { class lc_266_palindrome_permutation_s1 (line 30) | public class lc_266_palindrome_permutation_s1 { method main (line 31) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_266_palindrome_permutation/lc_266_palindrome_permutation_s2.java class Solution (line 13) | class Solution { method canPermutePalindrome (line 14) | public boolean canPermutePalindrome(String s) { class lc_266_palindrome_permutation_s2 (line 35) | public class lc_266_palindrome_permutation_s2 { method main (line 36) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_278_first_bad_version/lc_278_first_bad_version.java class Solution (line 13) | public class Solution extends VersionControl { method firstBadVersion (line 14) | public int firstBadVersion(int n) { class lc_278_first_bad_version (line 29) | public class lc_278_first_bad_version { method main (line 30) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_287_find_the_duplicate_number/lc_287_find_the_duplicate_number_s1.java class Solution (line 13) | class Solution { method findDuplicate (line 14) | public int findDuplicate(int[] nums) { class lc_287_find_the_duplicate_number_s1 (line 24) | public class lc_287_find_the_duplicate_number_s1 { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_287_find_the_duplicate_number/lc_287_find_the_duplicate_number_s2.java class Solution (line 13) | class Solution { method findDuplicate (line 14) | public int findDuplicate(int[] nums) { class lc_287_find_the_duplicate_number_s2 (line 30) | public class lc_287_find_the_duplicate_number_s2 { method main (line 31) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_287_find_the_duplicate_number/lc_287_find_the_duplicate_number_s3.java class Solution (line 13) | public class Solution { method next (line 14) | private int next(int[] nums, int index) { method findDuplicate (line 17) | public int findDuplicate(int[] nums) { class lc_287_find_the_duplicate_number_s3 (line 35) | public class lc_287_find_the_duplicate_number_s3 { method main (line 36) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_295_find_median_from_data_stream/lc_295_find_median_from_data_stream.java class MedianFinder (line 13) | class MedianFinder { method MedianFinder (line 15) | public MedianFinder() { method addNum (line 19) | public void addNum(int num) { method findMedian (line 28) | public double findMedian() { class lc_295_find_median_from_data_stream (line 33) | public class lc_295_find_median_from_data_stream { method main (line 34) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_297_serialize_and_deserialize_binary_tree/lc_297_serialize_and_deserialize_binary_tree.java class Codec (line 13) | public class Codec { method serialize (line 14) | public String serialize(TreeNode root) { method deserialize (line 31) | public TreeNode deserialize(String data) { class lc_297_serialize_and_deserialize_binary_tree (line 54) | public class lc_297_serialize_and_deserialize_binary_tree { method main (line 55) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_300_longest_increasing_subsequence/lc_300_longest_increasing_subsequence_s1.java class Solution (line 14) | class Solution { method lengthOfLIS (line 15) | public int lengthOfLIS(int[] nums) { class lc_300_longest_increasing_subsequence_s1 (line 30) | public class lc_300_longest_increasing_subsequence_s1 { method main (line 31) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_300_longest_increasing_subsequence/lc_300_longest_increasing_subsequence_s2.java class Solution (line 14) | class Solution { method lengthOfLIS (line 15) | public int lengthOfLIS(int[] nums) { class lc_300_longest_increasing_subsequence_s2 (line 32) | public class lc_300_longest_increasing_subsequence_s2 { method main (line 33) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_343_integer_break/lc_343_integer_break.java class Solution (line 13) | class Solution { method integerBreak (line 14) | public int integerBreak(int n) { class lc_343_integer_break (line 23) | public class lc_343_integer_break { method main (line 24) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_371_sum_of_two_integers/lc_371_sum_of_two_integers.java class Solution (line 13) | class Solution { method getSum (line 14) | public int getSum(int a, int b) { class lc_371_sum_of_two_integers (line 25) | public class lc_371_sum_of_two_integers { method main (line 26) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_387_first_unique_character_in_a_string/lc_387_first_unique_character_in_a_string.java class Solution (line 13) | class Solution { method firstUniqChar (line 14) | public int firstUniqChar(String s) { class lc_387_first_unique_character_in_a_string (line 25) | public class lc_387_first_unique_character_in_a_string { method main (line 26) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_392_is_subsequence/lc_392_is_subsequence.java class Solution (line 13) | class Solution { method isSubsequence (line 14) | public boolean isSubsequence(String s, String t) { class lc_392_is_subsequence (line 27) | public class lc_392_is_subsequence { method main (line 28) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_394_decode_string/lc_394_decode_string_s1.java class Solution (line 13) | class Solution { method decodeString (line 14) | public String decodeString(String s) { class lc_394_decode_string_s1 (line 39) | public class lc_394_decode_string_s1 { method main (line 40) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_394_decode_string/lc_394_decode_string_s2.java class Solution (line 13) | class Solution { method decodeString (line 14) | public String decodeString(String s) { method dfs (line 17) | private String[] dfs(String s, int i) { class lc_394_decode_string_s2 (line 41) | public class lc_394_decode_string_s2 { method main (line 42) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_3_longest_substring_without_repeating_characters/lc_3_longest_substring_without_repeating_characters_s1.java class Solution (line 13) | class Solution { method lengthOfLongestSubstring (line 14) | public int lengthOfLongestSubstring(String s) { class lc_3_longest_substring_without_repeating_characters_s1 (line 27) | public class lc_3_longest_substring_without_repeating_characters_s1 { method main (line 28) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_3_longest_substring_without_repeating_characters/lc_3_longest_substring_without_repeating_characters_s2.java class Solution (line 13) | class Solution { method lengthOfLongestSubstring (line 14) | public int lengthOfLongestSubstring(String s) { class lc_3_longest_substring_without_repeating_characters_s2 (line 27) | public class lc_3_longest_substring_without_repeating_characters_s2 { method main (line 28) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_400_nth_digit/lc_400_nth_digit_s1.java class lc_400_nth_digit_s1 (line 23) | public class lc_400_nth_digit_s1 { method main (line 24) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_400_nth_digit/lc_400_nth_digit_s2.java class lc_400_nth_digit_s2 (line 15) | public class lc_400_nth_digit_s2 { method main (line 16) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_400_nth_digit/lc_400_nth_digit_s3.java class lc_400_nth_digit_s3 (line 16) | public class lc_400_nth_digit_s3 { method main (line 17) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_400_nth_digit/lc_400_nth_digit_s4.java class Solution (line 13) | class Solution { method findNthDigit (line 14) | public int findNthDigit(int n) { class lc_400_nth_digit_s4 (line 29) | public class lc_400_nth_digit_s4 { method main (line 30) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_409_longest_palindrome/lc_409_longest_palindrome.java class Solution (line 13) | class Solution { method longestPalindrome (line 14) | public int longestPalindrome(String s) { class lc_409_longest_palindrome (line 33) | public class lc_409_longest_palindrome { method main (line 34) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_415_add_strings/lc_415_add_strings.java class Solution (line 13) | class Solution { method addStrings (line 14) | public String addStrings(String num1, String num2) { class lc_415_add_strings (line 30) | public class lc_415_add_strings { method main (line 31) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list/lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list_s1.java method dfs (line 14) | void dfs(Node root) { class lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list_s1 (line 21) | public class lc_426_convert_binary_search_tree_to_sorted_doubly_linked_l... method main (line 22) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list/lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list_s2.java class Solution (line 13) | class Solution { method dfs (line 15) | void dfs(Node cur) { method treeToDoublyList (line 24) | public Node treeToDoublyList(Node root) { class lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list_s2 (line 33) | public class lc_426_convert_binary_search_tree_to_sorted_doubly_linked_l... method main (line 34) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_46_permutations/lc_46_permutations.java class Solution (line 13) | class Solution { method swap (line 16) | void swap(int a, int b) { method dfs (line 21) | void dfs(int x) { method permute (line 32) | public List> permute(int[] nums) { class lc_46_permutations (line 43) | public class lc_46_permutations { method main (line 44) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_47_permutations/lc_47_permutations.java class Solution (line 13) | class Solution { method swap (line 16) | void swap(int a, int b) { method dfs (line 21) | void dfs(int x) { method permuteUnique (line 36) | public List> permuteUnique(int[] nums) { class lc_47_permutations (line 47) | public class lc_47_permutations { method main (line 48) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_48_rotate_image/lc_48_rotate_image_s1.java class Solution (line 13) | class Solution { method rotate (line 14) | public void rotate(int[][] matrix) { class lc_48_rotate_image_s1 (line 29) | public class lc_48_rotate_image_s1 { method main (line 30) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_48_rotate_image/lc_48_rotate_image_s2.java class Solution (line 13) | class Solution { method rotate (line 14) | public void rotate(int[][] matrix) { class lc_48_rotate_image_s2 (line 28) | public class lc_48_rotate_image_s2 { method main (line 29) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_48_rotate_image/lc_48_rotate_image_s3.java class Solution (line 13) | class Solution { method rotate (line 14) | public void rotate(int[][] matrix) { class lc_48_rotate_image_s3 (line 33) | public class lc_48_rotate_image_s3 { method main (line 34) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_509_fibonacci_number/lc_509_fibonacci_number.java class Solution (line 13) | class Solution { method fib (line 14) | public int fib(int n) { class lc_509_fibonacci_number (line 25) | public class lc_509_fibonacci_number { method main (line 26) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_50_powx_n/lc_50_powx_n.java class Solution (line 13) | class Solution { method myPow (line 14) | public double myPow(double x, int n) { class lc_50_powx_n (line 31) | public class lc_50_powx_n { method main (line 32) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_53_maximum_subarray/lc_53_maximum_subarray.java class Solution (line 13) | class Solution { method maxSubArray (line 14) | public int maxSubArray(int[] nums) { class lc_53_maximum_subarray (line 24) | public class lc_53_maximum_subarray { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_54_spiral_matrix/lc_54_spiral_matrix.java class Solution (line 13) | class Solution { method spiralOrder (line 14) | public List spiralOrder(int[][] matrix) { class lc_54_spiral_matrix (line 33) | public class lc_54_spiral_matrix { method main (line 34) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_59_spiral_matrix/lc_59_spiral_matrix.java class Solution (line 13) | class Solution { method generateMatrix (line 14) | public int[][] generateMatrix(int n) { class lc_59_spiral_matrix (line 32) | public class lc_59_spiral_matrix { method main (line 33) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_64_minimum_path_sum/lc_64_minimum_path_sum.java class Solution (line 13) | class Solution { method minPathSum (line 14) | public int minPathSum(int[][] grid) { class lc_64_minimum_path_sum (line 27) | public class lc_64_minimum_path_sum { method main (line 28) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_65_valid_number/lc_65_valid_number.java class Solution (line 13) | class Solution { method isNumber (line 14) | public boolean isNumber(String s) { class lc_65_valid_number (line 41) | public class lc_65_valid_number { method main (line 42) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_6_zigzag_conversion/lc_6_zigzag_conversion.java class Solution (line 13) | class Solution { method convert (line 14) | public String convert(String s, int numRows) { class lc_6_zigzag_conversion (line 30) | public class lc_6_zigzag_conversion { method main (line 31) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_704_binary_search/lc_704_binary_search.java class Solution (line 13) | class Solution { method search (line 14) | public int search(int[] nums, int target) { class lc_704_binary_search (line 26) | public class lc_704_binary_search { method main (line 27) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_70_climbing_stairs/lc_70_climbing_stairs.java class Solution (line 13) | class Solution { method climbStairs (line 14) | public int climbStairs(int n) { class lc_70_climbing_stairs (line 25) | public class lc_70_climbing_stairs { method main (line 26) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_724_find_pivot_index/lc_724_find_pivot_index.java class Solution (line 13) | class Solution { method pivotIndex (line 14) | public int pivotIndex(int[] nums) { class lc_724_find_pivot_index (line 27) | public class lc_724_find_pivot_index { method main (line 28) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_796_rotate_string/lc_796_rotate_string.java class Solution (line 13) | class Solution { method rotateString (line 14) | public boolean rotateString(String s, String goal) { class lc_796_rotate_string (line 19) | public class lc_796_rotate_string { method main (line 20) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_79_word_search/lc_79_word_search.java class Solution (line 13) | class Solution { method exist (line 14) | public boolean exist(char[][] board, String word) { method dfs (line 23) | boolean dfs(char[][] board, char[] word, int i, int j, int k) { class lc_79_word_search (line 34) | public class lc_79_word_search { method main (line 35) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_86_partition_list/lc_86_partition_list_s1.java class Solution (line 13) | class Solution { method partition (line 14) | public ListNode partition(ListNode head, int x) { class lc_86_partition_list_s1 (line 33) | public class lc_86_partition_list_s1 { method main (line 34) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_86_partition_list/lc_86_partition_list_s2.java class Solution (line 13) | class Solution { method partition (line 14) | public ListNode partition(ListNode head, int x) { class lc_86_partition_list_s2 (line 38) | public class lc_86_partition_list_s2 { method main (line 39) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_876_middle_of_the_linked_list/lc_876_middle_of_the_linked_list.java class Solution (line 13) | class Solution { method middleNode (line 14) | public ListNode middleNode(ListNode head) { class lc_876_middle_of_the_linked_list (line 24) | public class lc_876_middle_of_the_linked_list { method main (line 25) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_89_gray_code/lc_89_gray_code.java class Solution (line 13) | class Solution { method grayCode (line 14) | public List grayCode(int n) { class lc_89_gray_code (line 26) | public class lc_89_gray_code { method main (line 27) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_8_string_to_integer_atoi/lc_8_string_to_integer_atoi_s1.java class Solution (line 13) | class Solution { method myAtoi (line 14) | public int myAtoi(String s) { class lc_8_string_to_integer_atoi_s1 (line 30) | public class lc_8_string_to_integer_atoi_s1 { method main (line 31) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_8_string_to_integer_atoi/lc_8_string_to_integer_atoi_s2.java class Solution (line 13) | class Solution { method myAtoi (line 14) | public int myAtoi(String s) { class lc_8_string_to_integer_atoi_s2 (line 32) | public class lc_8_string_to_integer_atoi_s2 { method main (line 33) | public static void main(String[] args) { FILE: selected_coding_interview/codes/java/lc_946_validate_stack_sequences/lc_946_validate_stack_sequences.java class Solution (line 13) | class Solution { method validateStackSequences (line 14) | public boolean validateStackSequences(int[] pushed, int[] popped) { class lc_946_validate_stack_sequences (line 28) | public class lc_946_validate_stack_sequences { method main (line 29) | public static void main(String[] args) { FILE: selected_coding_interview/codes/python/fix_tests.py function fix_missing_arguments (line 9) | def fix_missing_arguments(): FILE: selected_coding_interview/codes/python/include/binary_tree.py class TreeNode (line 10) | class TreeNode: method __init__ (line 13) | def __init__(self, val=0, left=None, right=None): function list_to_tree (line 19) | def list_to_tree(arr): function tree_to_list (line 47) | def tree_to_list(root): function get_tree_node (line 72) | def get_tree_node(root, val): FILE: selected_coding_interview/codes/python/include/linked_list.py class ListNode (line 8) | class ListNode: method __init__ (line 11) | def __init__(self, val=0, next=None): function list_to_linked_list (line 16) | def list_to_linked_list(arr): function linked_list_to_list (line 33) | def linked_list_to_list(head): function get_list_node (line 49) | def get_list_node(head, val): FILE: selected_coding_interview/codes/python/include/print_util.py function print_matrix (line 11) | def print_matrix(mat): function print_linked_list (line 24) | def print_linked_list(head): class Trunk (line 34) | class Trunk: method __init__ (line 35) | def __init__(self, prev=None, str=None): function showTrunks (line 40) | def showTrunks(p): function print_tree (line 47) | def print_tree(root, prev=None, isLeft=False): FILE: selected_coding_interview/codes/python/lc_101_symmetric_tree.py class Solution (line 11) | class Solution: method isSymmetric (line 12) | def isSymmetric(self, root: Optional[TreeNode]) -> bool: FILE: selected_coding_interview/codes/python/lc_102_binary_tree_level_order_traversal.py class Solution (line 11) | class Solution: method levelOrder (line 12) | def levelOrder(self, root: Optional[TreeNode]) -> List[List[int]]: FILE: selected_coding_interview/codes/python/lc_103_binary_tree_zigzag_level_order_traversal_s1.py class Solution (line 11) | class Solution: method zigzagLevelOrder (line 12) | def zigzagLevelOrder(self, root: Optional[TreeNode]) -> List[List[int]]: FILE: selected_coding_interview/codes/python/lc_103_binary_tree_zigzag_level_order_traversal_s2.py class Solution (line 11) | class Solution: method zigzagLevelOrder (line 12) | def zigzagLevelOrder(self, root: Optional[TreeNode]) -> List[List[int]]: FILE: selected_coding_interview/codes/python/lc_103_binary_tree_zigzag_level_order_traversal_s3.py class Solution (line 11) | class Solution: method zigzagLevelOrder (line 12) | def zigzagLevelOrder(self, root: Optional[TreeNode]) -> List[List[int]]: FILE: selected_coding_interview/codes/python/lc_104_maximum_depth_of_binary_tree_s1.py class Solution (line 11) | class Solution: method maxDepth (line 12) | def maxDepth(self, root: Optional[TreeNode]) -> int: FILE: selected_coding_interview/codes/python/lc_104_maximum_depth_of_binary_tree_s2.py class Solution (line 11) | class Solution: method maxDepth (line 12) | def maxDepth(self, root: TreeNode) -> int: FILE: selected_coding_interview/codes/python/lc_105_construct_binary_tree_from_preorder_and_inorder_traversal.py class Solution (line 11) | class Solution: method buildTree (line 12) | def buildTree(self, preorder: List[int], inorder: List[int]) -> TreeNode: FILE: selected_coding_interview/codes/python/lc_10_regular_expression_matching_s1.py class Solution (line 11) | class Solution: method isMatch (line 12) | def isMatch(self, s: str, p: str) -> bool: FILE: selected_coding_interview/codes/python/lc_10_regular_expression_matching_s2.py class Solution (line 11) | class Solution: method isMatch (line 12) | def isMatch(self, s: str, p: str) -> bool: FILE: selected_coding_interview/codes/python/lc_110_balanced_binary_tree_s1.py class Solution (line 11) | class Solution: method isBalanced (line 12) | def isBalanced(self, root: Optional[TreeNode]) -> bool: FILE: selected_coding_interview/codes/python/lc_110_balanced_binary_tree_s2.py class Solution (line 11) | class Solution: method isBalanced (line 12) | def isBalanced(self, root: Optional[TreeNode]) -> bool: method depth (line 16) | def depth(self, root): FILE: selected_coding_interview/codes/python/lc_113_path_sum_ii.py class Solution (line 11) | class Solution: method pathSum (line 12) | def pathSum(self, root: Optional[TreeNode], targetSum: int) -> List[Li... FILE: selected_coding_interview/codes/python/lc_11_container_with_most_water.py class Solution (line 11) | class Solution: method maxArea (line 12) | def maxArea(self, height: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_121_best_time_to_buy_and_sell_stock.py class Solution (line 11) | class Solution: method maxProfit (line 12) | def maxProfit(self, prices: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_122_best_time_to_buy_and_sell_stock_ii.py class Solution (line 11) | class Solution: method maxProfit (line 12) | def maxProfit(self, prices: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_135_candy.py class Solution (line 11) | class Solution: method candy (line 12) | def candy(self, ratings: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_136_single_number.py class Solution (line 11) | class Solution: method singleNumber (line 12) | def singleNumber(self, nums: List[int]) -> List[int]: FILE: selected_coding_interview/codes/python/lc_137_single_number_ii_s1.py class Solution (line 11) | class Solution: method singleNumber (line 12) | def singleNumber(self, nums: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_137_single_number_ii_s2.py class Solution (line 11) | class Solution: method singleNumber (line 12) | def singleNumber(self, nums: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_138_copy_list_with_random_pointer_s1.py class Node (line 12) | class Node: method __init__ (line 13) | def __init__(self, x: int, next: 'Node' = None, random: 'Node' = None): class Solution (line 18) | class Solution: method copyRandomList (line 19) | def copyRandomList(self, head: 'Node') -> 'Node': FILE: selected_coding_interview/codes/python/lc_138_copy_list_with_random_pointer_s2.py class Node (line 12) | class Node: method __init__ (line 13) | def __init__(self, x: int, next: 'Node' = None, random: 'Node' = None): class Solution (line 18) | class Solution: method copyRandomList (line 19) | def copyRandomList(self, head: 'Node') -> 'Node': FILE: selected_coding_interview/codes/python/lc_138_copy_list_with_random_pointer_s3.py class Solution (line 11) | class Solution: method copyRandomList (line 12) | def copyRandomList(self, head: 'Node') -> 'Node': FILE: selected_coding_interview/codes/python/lc_138_copy_list_with_random_pointer_s4.py class Solution (line 11) | class Solution: method copyRandomList (line 12) | def copyRandomList(self, head: 'Node') -> 'Node': FILE: selected_coding_interview/codes/python/lc_138_copy_list_with_random_pointer_s5.py class Solution (line 11) | class Solution: method copyRandomList (line 12) | def copyRandomList(self, head: 'Node') -> 'Node': FILE: selected_coding_interview/codes/python/lc_142_linked_list_cycle_ii.py class Solution (line 11) | class Solution(object): method detectCycle (line 12) | def detectCycle(self, head): FILE: selected_coding_interview/codes/python/lc_1480_running_sum_of_1d_array.py class Solution (line 11) | class Solution: method runningSum (line 12) | def runningSum(self, nums: List[int]) -> List[int]: FILE: selected_coding_interview/codes/python/lc_151_reverse_words_in_a_string_s1.py class Solution (line 11) | class Solution: method reverseWords (line 12) | def reverseWords(self, s: str) -> str: FILE: selected_coding_interview/codes/python/lc_151_reverse_words_in_a_string_s2.py class Solution (line 11) | class Solution: method reverseWords (line 12) | def reverseWords(self, s: str) -> str: FILE: selected_coding_interview/codes/python/lc_151_reverse_words_in_a_string_s3.py class Solution (line 11) | class Solution: method reverseWords (line 12) | def reverseWords(self, s: str) -> str: FILE: selected_coding_interview/codes/python/lc_154_find_minimum_in_rotated_sorted_array_ii_s1.py class Solution (line 11) | class Solution: method findMin (line 12) | def findMin(self, nums: [int]) -> int: FILE: selected_coding_interview/codes/python/lc_154_find_minimum_in_rotated_sorted_array_ii_s2.py class Solution (line 11) | class Solution: method findMin (line 12) | def findMin(self, nums: [int]) -> int: FILE: selected_coding_interview/codes/python/lc_155_min_stack.py class MinStack (line 11) | class MinStack: method __init__ (line 12) | def __init__(self): method push (line 15) | def push(self, x: int) -> None: method pop (line 19) | def pop(self) -> None: method top (line 22) | def top(self) -> int: method getMin (line 24) | def getMin(self) -> int: FILE: selected_coding_interview/codes/python/lc_15_three_sum.py class Solution (line 11) | class Solution: method threeSum (line 12) | def threeSum(self, nums: [int]) -> [[int]]: FILE: selected_coding_interview/codes/python/lc_160_intersection_of_two_linked_lists.py class Solution (line 11) | class Solution: method getIntersectionNode (line 12) | def getIntersectionNode(self, headA: ListNode, headB: ListNode) -> Lis... FILE: selected_coding_interview/codes/python/lc_167_two_sum_ii.py class Solution (line 11) | class Solution: method twoSum (line 12) | def twoSum(self, numbers: List[int], target: int) -> List[int]: FILE: selected_coding_interview/codes/python/lc_169_majority_element_s1.py class Solution (line 11) | class Solution: method majorityElement (line 12) | def majorityElement(self, nums: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_169_majority_element_s2.py class Solution (line 11) | class Solution: method majorityElement (line 12) | def majorityElement(self, nums: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_179_largest_number_s1.py class Solution (line 11) | class Solution: method largestNumber (line 12) | def largestNumber(self, nums: List[int]) -> str: FILE: selected_coding_interview/codes/python/lc_179_largest_number_s2.py class Solution (line 11) | class Solution: method largestNumber (line 12) | def largestNumber(self, nums: List[int]) -> str: FILE: selected_coding_interview/codes/python/lc_1823_find_the_winner_of_the_circular_game.py class Solution (line 11) | class Solution: method findTheWinner (line 12) | def findTheWinner(self, n: int, k: int) -> int: FILE: selected_coding_interview/codes/python/lc_191_number_of_1_bits_s1.py class Solution (line 11) | class Solution: method hammingWeight (line 12) | def hammingWeight(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_191_number_of_1_bits_s2.py class Solution (line 11) | class Solution: method hammingWeight (line 12) | def hammingWeight(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_198_house_robber.py class Solution (line 11) | class Solution: method rob (line 12) | def rob(self, nums: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_205_isomorphic_strings.py class Solution (line 11) | class Solution: method isIsomorphic (line 12) | def isIsomorphic(self, s: str, t: str) -> bool: FILE: selected_coding_interview/codes/python/lc_206_reverse_linked_list_s1.py class Solution (line 11) | class Solution: method reverseList (line 12) | def reverseList(self, head: ListNode) -> ListNode: FILE: selected_coding_interview/codes/python/lc_206_reverse_linked_list_s2.py class Solution (line 11) | class Solution: method reverseList (line 12) | def reverseList(self, head: ListNode) -> ListNode: FILE: selected_coding_interview/codes/python/lc_206_reverse_linked_list_s3.py class Solution (line 11) | class Solution: method reverseList (line 12) | def reverseList(self, head: ListNode) -> ListNode: FILE: selected_coding_interview/codes/python/lc_207_course_schedule_s1.py class Solution (line 12) | class Solution: method canFinish (line 13) | def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -... FILE: selected_coding_interview/codes/python/lc_207_course_schedule_s2.py class Solution (line 11) | class Solution: method canFinish (line 12) | def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -... FILE: selected_coding_interview/codes/python/lc_20_valid_parentheses.py class Solution (line 11) | class Solution: method isValid (line 12) | def isValid(self, s: str) -> bool: FILE: selected_coding_interview/codes/python/lc_213_house_robber_ii.py class Solution (line 11) | class Solution: method rob (line 12) | def rob(self, nums: [int]) -> int: FILE: selected_coding_interview/codes/python/lc_215_kth_largest_element_in_an_array_s1.py class Solution (line 11) | class Solution: method findKthLargest (line 12) | def findKthLargest(self, nums: List[int], k: int) -> int: FILE: selected_coding_interview/codes/python/lc_215_kth_largest_element_in_an_array_s2.py class Solution (line 11) | class Solution: method findKthLargest (line 12) | def findKthLargest(self, nums: List[int], k: int) -> int: FILE: selected_coding_interview/codes/python/lc_21_merge_two_sorted_lists.py class Solution (line 11) | class Solution: method mergeTwoLists (line 12) | def mergeTwoLists(self, list1: Optional[ListNode], list2: Optional[Lis... FILE: selected_coding_interview/codes/python/lc_226_invert_binary_tree_s1.py class Solution (line 11) | class Solution: method invertTree (line 12) | def invertTree(self, root: Optional[TreeNode]) -> Optional[TreeNode]: FILE: selected_coding_interview/codes/python/lc_226_invert_binary_tree_s2.py class Solution (line 11) | class Solution: method invertTree (line 12) | def invertTree(self, root: Optional[TreeNode]) -> Optional[TreeNode]: FILE: selected_coding_interview/codes/python/lc_226_invert_binary_tree_s3.py class Solution (line 11) | class Solution: method invertTree (line 12) | def invertTree(self, root: Optional[TreeNode]) -> Optional[TreeNode]: FILE: selected_coding_interview/codes/python/lc_230_kth_smallest_element_in_a_bst.py class Solution (line 11) | class Solution: method kthSmallest (line 12) | def kthSmallest(self, root: Optional[TreeNode], k: int) -> int: FILE: selected_coding_interview/codes/python/lc_231_power_of_two.py class Solution (line 11) | class Solution: method isPowerOfTwo (line 12) | def isPowerOfTwo(self, n: int) -> bool: FILE: selected_coding_interview/codes/python/lc_232_implement_queue_using_stacks.py class MyQueue (line 11) | class MyQueue: method __init__ (line 12) | def __init__(self): method push (line 14) | def push(self, x: int) -> None: method pop (line 16) | def pop(self) -> int: method peek (line 20) | def peek(self) -> int: method empty (line 27) | def empty(self) -> bool: FILE: selected_coding_interview/codes/python/lc_233_number_of_digit_one_s1.py class Solution (line 11) | class Solution: method countDigitOne (line 12) | def countDigitOne(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_233_number_of_digit_one_s2.py class Solution (line 11) | class Solution: method countDigitOne (line 12) | def countDigitOne(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_233_number_of_digit_one_s3.py class Solution (line 11) | class Solution: method countDigitOne (line 12) | def countDigitOne(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_235_lowest_common_ancestor_of_a_binary_search_tree_s1.py class Solution (line 11) | class Solution: method lowestCommonAncestor (line 12) | def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'Tr... FILE: selected_coding_interview/codes/python/lc_235_lowest_common_ancestor_of_a_binary_search_tree_s2.py class Solution (line 11) | class Solution: method lowestCommonAncestor (line 12) | def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'Tr... FILE: selected_coding_interview/codes/python/lc_235_lowest_common_ancestor_of_a_binary_search_tree_s3.py class Solution (line 11) | class Solution: method lowestCommonAncestor (line 12) | def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'Tr... FILE: selected_coding_interview/codes/python/lc_236_lowest_common_ancestor_of_a_binary_tree_s1.py class Solution (line 11) | class Solution: method lowestCommonAncestor (line 12) | def lowestCommonAncestor(self, root: TreeNode, p: TreeNode, q: TreeNod... FILE: selected_coding_interview/codes/python/lc_236_lowest_common_ancestor_of_a_binary_tree_s2.py class Solution (line 11) | class Solution: method lowestCommonAncestor (line 12) | def lowestCommonAncestor(self, root: TreeNode, p: TreeNode, q: TreeNod... FILE: selected_coding_interview/codes/python/lc_237_delete_node_in_a_linked_list_s1.py class Solution (line 11) | class Solution: method deleteNode (line 12) | def deleteNode(self, node): FILE: selected_coding_interview/codes/python/lc_237_delete_node_in_a_linked_list_s2.py class Solution (line 11) | class Solution: method deleteNode (line 12) | def deleteNode(self, node): FILE: selected_coding_interview/codes/python/lc_238_product_of_array_except_self.py class Solution (line 11) | class Solution: method productExceptSelf (line 12) | def productExceptSelf(self, nums: List[int]) -> List[int]: FILE: selected_coding_interview/codes/python/lc_239_sliding_window_maximum_s1.py class Solution (line 11) | class Solution: method maxSlidingWindow (line 12) | def maxSlidingWindow(self, nums: List[int], k: int) -> List[int]: FILE: selected_coding_interview/codes/python/lc_239_sliding_window_maximum_s2.py class Solution (line 11) | class Solution: method maxSlidingWindow (line 12) | def maxSlidingWindow(self, nums: List[int], k: int) -> List[int]: FILE: selected_coding_interview/codes/python/lc_240_search_a_2d_matrix_ii.py class Solution (line 11) | class Solution: method searchMatrix (line 12) | def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: FILE: selected_coding_interview/codes/python/lc_242_valid_anagram_s1.py class Solution (line 11) | class Solution: method isAnagram (line 12) | def isAnagram(self, s: str, t: str) -> bool: FILE: selected_coding_interview/codes/python/lc_242_valid_anagram_s2.py class Solution (line 11) | class Solution: method isAnagram (line 12) | def isAnagram(self, s: str, t: str) -> bool: FILE: selected_coding_interview/codes/python/lc_264_ugly_number_ii.py class Solution (line 11) | class Solution: method nthUglyNumber (line 12) | def nthUglyNumber(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_266_palindrome_permutation_s1.py class Solution (line 11) | class Solution: method canPermutePalindrome (line 12) | def canPermutePalindrome(self, s: str) -> bool: FILE: selected_coding_interview/codes/python/lc_266_palindrome_permutation_s2.py class Solution (line 11) | class Solution: method canPermutePalindrome (line 12) | def canPermutePalindrome(self, s: str) -> bool: FILE: selected_coding_interview/codes/python/lc_278_first_bad_version.py class Solution (line 11) | class Solution: method firstBadVersion (line 12) | def firstBadVersion(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_287_find_the_duplicate_number_s1.py class Solution (line 11) | class Solution: method findDuplicate (line 12) | def findDuplicate(self, nums: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_287_find_the_duplicate_number_s2.py class Solution (line 11) | class Solution: method findDuplicate (line 12) | def findDuplicate(self, nums: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_287_find_the_duplicate_number_s3.py class Solution (line 11) | class Solution: method findDuplicate (line 12) | def findDuplicate(self, nums: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_295_find_median_from_data_stream_s1.py class MedianFinder (line 12) | class MedianFinder: method __init__ (line 13) | def __init__(self): method addNum (line 16) | def addNum(self, num: int) -> None: method findMedian (line 23) | def findMedian(self) -> float: FILE: selected_coding_interview/codes/python/lc_295_find_median_from_data_stream_s2.py class MedianFinder (line 12) | class MedianFinder: method __init__ (line 13) | def __init__(self): method addNum (line 16) | def addNum(self, num: int) -> None: method findMedian (line 21) | def findMedian(self) -> float: FILE: selected_coding_interview/codes/python/lc_297_serialize_and_deserialize_binary_tree.py class Codec (line 11) | class Codec: method serialize (line 12) | def serialize(self, root): method deserialize (line 25) | def deserialize(self, data): FILE: selected_coding_interview/codes/python/lc_300_longest_increasing_subsequence_s1.py class Solution (line 12) | class Solution: method lengthOfLIS (line 13) | def lengthOfLIS(self, nums: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_300_longest_increasing_subsequence_s2.py class Solution (line 12) | class Solution: method lengthOfLIS (line 13) | def lengthOfLIS(self, nums: [int]) -> int: FILE: selected_coding_interview/codes/python/lc_343_integer_break.py class Solution (line 11) | class Solution: method integerBreak (line 12) | def integerBreak(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_371_sum_of_two_integers.py class Solution (line 11) | class Solution: method getSum (line 12) | def getSum(self, a: int, b: int) -> int: FILE: selected_coding_interview/codes/python/lc_387_first_unique_character_in_a_string.py class Solution (line 11) | class Solution: method firstUniqChar (line 12) | def firstUniqChar(self, s: str) -> int: FILE: selected_coding_interview/codes/python/lc_392_is_subsequence.py class Solution (line 11) | class Solution: method isSubsequence (line 12) | def isSubsequence(self, s: str, t: str) -> bool: FILE: selected_coding_interview/codes/python/lc_394_decode_string_s1.py class Solution (line 11) | class Solution: method decodeString (line 12) | def decodeString(self, s: str) -> str: FILE: selected_coding_interview/codes/python/lc_394_decode_string_s2.py class Solution (line 11) | class Solution: method decodeString (line 12) | def decodeString(self, s: str) -> str: FILE: selected_coding_interview/codes/python/lc_39_combination_sum_s1.py class Solution (line 11) | class Solution: method combinationSum (line 12) | def combinationSum(self, candidates: List[int], target: int) -> List[L... FILE: selected_coding_interview/codes/python/lc_39_combination_sum_s2.py class Solution (line 11) | class Solution: method combinationSum (line 12) | def combinationSum(self, candidates: List[int], target: int) -> List[L... FILE: selected_coding_interview/codes/python/lc_3_longest_substring_without_repeating_characters_s1.py class Solution (line 11) | class Solution: method lengthOfLongestSubstring (line 12) | def lengthOfLongestSubstring(self, s: str) -> int: FILE: selected_coding_interview/codes/python/lc_3_longest_substring_without_repeating_characters_s2.py class Solution (line 11) | class Solution: method lengthOfLongestSubstring (line 12) | def lengthOfLongestSubstring(self, s: str) -> int: FILE: selected_coding_interview/codes/python/lc_400_nth_digit_s1.py class Solution (line 11) | class Solution: method findNthDigit (line 12) | def findNthDigit(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_400_nth_digit_s2.py class Solution (line 11) | class Solution: method findNthDigit (line 12) | def findNthDigit(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_400_nth_digit_s3.py class Solution (line 11) | class Solution: method findNthDigit (line 12) | def findNthDigit(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_400_nth_digit_s4.py class Solution (line 11) | class Solution: method findNthDigit (line 12) | def findNthDigit(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_409_longest_palindrome.py class Solution (line 11) | class Solution: method longestPalindrome (line 12) | def longestPalindrome(self, s: str) -> int: FILE: selected_coding_interview/codes/python/lc_40_combination_sum_ii_s1.py class Solution (line 11) | class Solution: method combinationSum2 (line 12) | def combinationSum2(self, candidates: List[int], target: int) -> List[... FILE: selected_coding_interview/codes/python/lc_40_combination_sum_ii_s2.py class Solution (line 11) | class Solution: method combinationSum2 (line 12) | def combinationSum2(self, candidates: List[int], target: int) -> List[... FILE: selected_coding_interview/codes/python/lc_415_add_strings.py class Solution (line 11) | class Solution: method addStrings (line 12) | def addStrings(self, num1: str, num2: str) -> str: FILE: selected_coding_interview/codes/python/lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list_s1.py class Solution (line 11) | class Solution: method treeToDoublyList (line 12) | def treeToDoublyList(self, root: 'TreeNode') -> 'TreeNode': FILE: selected_coding_interview/codes/python/lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list_s2.py class Solution (line 11) | class Solution: method treeToDoublyList (line 12) | def treeToDoublyList(self, root: 'Optional[Node]') -> 'Optional[Node]': FILE: selected_coding_interview/codes/python/lc_46_permutations.py class Solution (line 11) | class Solution: method permute (line 12) | def permute(self, nums: List[int]) -> List[List[int]]: FILE: selected_coding_interview/codes/python/lc_47_permutations_ii.py class Solution (line 11) | class Solution: method permuteUnique (line 12) | def permuteUnique(self, nums: List[int]) -> List[List[int]]: FILE: selected_coding_interview/codes/python/lc_48_rotate_image_s1.py class Solution (line 11) | class Solution: method rotate (line 12) | def rotate(self, matrix: List[List[int]]) -> None: FILE: selected_coding_interview/codes/python/lc_48_rotate_image_s2.py class Solution (line 11) | class Solution: method rotate (line 12) | def rotate(self, matrix: List[List[int]]) -> None: FILE: selected_coding_interview/codes/python/lc_48_rotate_image_s3.py class Solution (line 11) | class Solution: method rotate (line 12) | def rotate(self, matrix: List[List[int]]) -> None: FILE: selected_coding_interview/codes/python/lc_509_fibonacci_number.py class Solution (line 11) | class Solution: method fib (line 12) | def fib(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_50_powx_n.py class Solution (line 11) | class Solution: method myPow (line 12) | def myPow(self, x: float, n: int) -> float: FILE: selected_coding_interview/codes/python/lc_53_maximum_subarray.py class Solution (line 11) | class Solution: method maxSubArray (line 12) | def maxSubArray(self, nums: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_54_spiral_matrix.py class Solution (line 11) | class Solution: method spiralOrder (line 12) | def spiralOrder(self, matrix: List[List[int]]) -> List[int]: FILE: selected_coding_interview/codes/python/lc_59_spiral_matrix_ii.py class Solution (line 11) | class Solution: method generateMatrix (line 12) | def generateMatrix(self, n: int) -> [[int]]: FILE: selected_coding_interview/codes/python/lc_64_minimum_path_sum.py class Solution (line 11) | class Solution: method minPathSum (line 12) | def minPathSum(self, grid: [[int]]) -> int: FILE: selected_coding_interview/codes/python/lc_65_valid_number.py class Solution (line 11) | class Solution: method isNumber (line 12) | def isNumber(self, s: str) -> bool: FILE: selected_coding_interview/codes/python/lc_6_zigzag_conversion.py class Solution (line 11) | class Solution: method convert (line 12) | def convert(self, s: str, numRows: int) -> str: FILE: selected_coding_interview/codes/python/lc_704_binary_search.py class Solution (line 11) | class Solution: method search (line 12) | def search(self, nums: List[int], target: int) -> int: FILE: selected_coding_interview/codes/python/lc_70_climbing_stairs.py class Solution (line 11) | class Solution: method climbStairs (line 12) | def climbStairs(self, n: int) -> int: FILE: selected_coding_interview/codes/python/lc_724_find_pivot_index.py class Solution (line 11) | class Solution: method pivotIndex (line 12) | def pivotIndex(self, nums: List[int]) -> int: FILE: selected_coding_interview/codes/python/lc_768_max_chunks_to_make_sorted_ii.py class Solution (line 11) | class Solution: method maxChunksToSorted (line 12) | def maxChunksToSorted(self, arr: [int]) -> int: FILE: selected_coding_interview/codes/python/lc_796_rotate_string.py class Solution (line 11) | class Solution: method rotateString (line 12) | def rotateString(self, s: str, goal: str) -> bool: FILE: selected_coding_interview/codes/python/lc_79_word_search.py class Solution (line 11) | class Solution: method exist (line 12) | def exist(self, board: List[List[str]], word: str) -> bool: FILE: selected_coding_interview/codes/python/lc_86_partition_list_s1.py class Solution (line 11) | class Solution: method partition (line 12) | def partition(self, head: Optional[ListNode], x: int) -> Optional[List... FILE: selected_coding_interview/codes/python/lc_86_partition_list_s2.py class Solution (line 11) | class Solution: method partition (line 12) | def partition(self, head: Optional[ListNode], x: int) -> Optional[List... FILE: selected_coding_interview/codes/python/lc_876_middle_of_the_linked_list.py class Solution (line 11) | class Solution: method middleNode (line 12) | def middleNode(self, head: ListNode) -> ListNode: FILE: selected_coding_interview/codes/python/lc_89_gray_code.py class Solution (line 11) | class Solution: method grayCode (line 12) | def grayCode(self, n: int) -> List[int]: FILE: selected_coding_interview/codes/python/lc_8_string_to_integer_atoi_s1.py class Solution (line 11) | class Solution: method myAtoi (line 12) | def myAtoi(self, s: str) -> int: FILE: selected_coding_interview/codes/python/lc_8_string_to_integer_atoi_s2.py class Solution (line 11) | class Solution: method myAtoi (line 12) | def myAtoi(self, s: str) -> int: FILE: selected_coding_interview/codes/python/lc_946_validate_stack_sequences.py class Solution (line 11) | class Solution: method validateStackSequences (line 12) | def validateStackSequences(self, pushed: List[int], popped: List[int])... FILE: sword_for_offer/codes/cpp/include/ListNode.hpp type ListNode (line 16) | struct ListNode { method ListNode (line 19) | ListNode(int x) : val(x), next(nullptr) { function ListNode (line 29) | ListNode *vectorToLinkedList(vector list) { method ListNode (line 19) | ListNode(int x) : val(x), next(nullptr) { function ListNode (line 46) | ListNode *getListNode(ListNode *head, int val) { method ListNode (line 19) | ListNode(int x) : val(x), next(nullptr) { FILE: sword_for_offer/codes/cpp/include/PrintUtil.hpp class PrintUtil (line 15) | class PrintUtil { method vecFind (line 25) | static int vecFind(const vector &vec, T ele) { method string (line 43) | static string strJoin(const string &delim, const T &vec) { method string (line 61) | static string strRepeat(string str, int n) { method string (line 75) | static string getVectorString(vector &list) { method printVector (line 85) | static void printVector(vector &list) { method printVectorMatrix (line 95) | static void printVectorMatrix(vector> &matrix) { method printLinkedList (line 107) | static void printLinkedList(ListNode *head) { type Trunk (line 121) | struct Trunk { method Trunk (line 124) | Trunk(Trunk *prev, string str) { method showTrunks (line 135) | static void showTrunks(Trunk *p) { method printTree (line 149) | static void printTree(TreeNode *root) { method printTree (line 160) | static void printTree(TreeNode *root, Trunk *prev, bool isLeft) { FILE: sword_for_offer/codes/cpp/include/TreeNode.hpp type TreeNode (line 13) | struct TreeNode { method TreeNode (line 17) | TreeNode(int x) : val(x), left(nullptr), right(nullptr) { function TreeNode (line 27) | TreeNode *vectorToTree(vector list) { method TreeNode (line 17) | TreeNode(int x) : val(x), left(nullptr), right(nullptr) { function TreeNode (line 56) | TreeNode *getTreeNode(TreeNode *root, int val) { method TreeNode (line 17) | TreeNode(int x) : val(x), left(nullptr), right(nullptr) { FILE: sword_for_offer/codes/cpp/sfo_03_find_duplicate_numbers_in_an_array_s1/sfo_03_find_duplicate_numbers_in_an_array_s1.cpp class Solution (line 10) | class Solution { method findRepeatNumber (line 12) | int findRepeatNumber(vector& nums) { function main (line 22) | int main() { FILE: sword_for_offer/codes/cpp/sfo_03_find_duplicate_numbers_in_an_array_s2/sfo_03_find_duplicate_numbers_in_an_array_s2.cpp class Solution (line 10) | class Solution { method findRepeatNumber (line 12) | int findRepeatNumber(vector &nums) { function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_04_find_a_number_in_2d_matrix_s1/sfo_04_find_a_number_in_2d_matrix_s1.cpp class Solution (line 10) | class Solution { method findNumberIn2DArray (line 12) | bool findNumberIn2DArray(vector> &matrix, int target) { function main (line 26) | int main() { FILE: sword_for_offer/codes/cpp/sfo_05_replace_spaces_s1/sfo_05_replace_spaces_s1.cpp class Solution (line 10) | class Solution { method string (line 12) | string replaceSpace(string s) { function main (line 36) | int main() { FILE: sword_for_offer/codes/cpp/sfo_06_print_a_linked_list_in_reverse_order_s1/sfo_06_print_a_linked_list_in_reverse_order_s1.cpp class Solution (line 10) | class Solution { method reversePrint (line 12) | vector reversePrint(ListNode *head) { method recur (line 19) | void recur(ListNode *head) { function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_06_print_a_linked_list_in_reverse_order_s2/sfo_06_print_a_linked_list_in_reverse_order_s2.cpp class Solution (line 10) | class Solution { method reversePrint (line 12) | vector reversePrint(ListNode *head) { function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_07_reconstruct_binary_tree_s1/sfo_07_reconstruct_binary_tree_s1.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode *buildTree(vector &preorder, vector &inorder) { method TreeNode (line 22) | TreeNode *recur(int root, int left, int right) { function main (line 33) | int main() { FILE: sword_for_offer/codes/cpp/sfo_09_implement_a_queue_using_two_stacks_s1/sfo_09_implement_a_queue_using_two_stacks_s1.cpp class CQueue (line 10) | class CQueue { method CQueue (line 13) | CQueue() { method appendTail (line 15) | void appendTail(int value) { method deleteHead (line 18) | int deleteHead() { function main (line 37) | int main() { FILE: sword_for_offer/codes/cpp/sfo_10i_fibonacci_numbers_s1/sfo_10i_fibonacci_numbers_s1.cpp class Solution (line 10) | class Solution { method fib (line 12) | int fib(int n) { function main (line 23) | int main() { FILE: sword_for_offer/codes/cpp/sfo_10ii_frog_jump_s1/sfo_10ii_frog_jump_s1.cpp class Solution (line 10) | class Solution { method numWays (line 12) | int numWays(int n) { function main (line 23) | int main() { FILE: sword_for_offer/codes/cpp/sfo_11_find_minimum_in_rotated_sorted_array_s1/sfo_11_find_minimum_in_rotated_sorted_array_s1.cpp class Solution (line 10) | class Solution { method minArray (line 12) | int minArray(vector &numbers) { function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_11_find_minimum_in_rotated_sorted_array_s2/sfo_11_find_minimum_in_rotated_sorted_array_s2.cpp class Solution (line 10) | class Solution { method minArray (line 12) | int minArray(vector &numbers) { function main (line 33) | int main() { FILE: sword_for_offer/codes/cpp/sfo_12_word_search_s1/sfo_12_word_search_s1.cpp class Solution (line 10) | class Solution { method exist (line 12) | bool exist(vector> &board, string word) { method dfs (line 26) | bool dfs(vector> &board, string word, int i, int j, int k) { function main (line 39) | int main() { FILE: sword_for_offer/codes/cpp/sfo_13_range_of_motion_of_a_robot_s1/sfo_13_range_of_motion_of_a_robot_s1.cpp class Solution (line 10) | class Solution { method movingCount (line 12) | int movingCount(int m, int n, int k) { method dfs (line 18) | int dfs(int i, int j, int si, int sj, vector> &visited, i... function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_13_range_of_motion_of_a_robot_s2/sfo_13_range_of_motion_of_a_robot_s2.cpp class Solution (line 10) | class Solution { method movingCount (line 12) | int movingCount(int m, int n, int k) { function main (line 32) | int main() { FILE: sword_for_offer/codes/cpp/sfo_14i_cut_the_rope_i_s1/sfo_14i_cut_the_rope_i_s1.cpp class Solution (line 10) | class Solution { method cuttingRope (line 12) | int cuttingRope(int n) { function main (line 24) | int main() { FILE: sword_for_offer/codes/cpp/sfo_14ii_cut_the_rope_ii_s1/sfo_14ii_cut_the_rope_ii_s1.cpp class Solution (line 10) | class Solution { method cuttingRope (line 12) | int cuttingRope(int n) { function main (line 30) | int main() { FILE: sword_for_offer/codes/cpp/sfo_15_number_of_1_bits_s1/sfo_15_number_of_1_bits_s1.cpp class Solution (line 10) | class Solution { method hammingWeight (line 12) | int hammingWeight(uint32_t n) { function main (line 22) | int main() { FILE: sword_for_offer/codes/cpp/sfo_15_number_of_1_bits_s2/sfo_15_number_of_1_bits_s2.cpp class Solution (line 10) | class Solution { method hammingWeight (line 12) | int hammingWeight(uint32_t n) { function main (line 22) | int main() { FILE: sword_for_offer/codes/cpp/sfo_16_powers_of_integers_s1/sfo_16_powers_of_integers_s1.cpp class Solution (line 10) | class Solution { method myPow (line 12) | double myPow(double x, int n) { function main (line 31) | int main() { FILE: sword_for_offer/codes/cpp/sfo_18_delete_a_node_from_a_linked_list_s1/sfo_18_delete_a_node_from_a_linked_list_s1.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode *deleteNode(ListNode *head, int val) { function main (line 26) | int main() { FILE: sword_for_offer/codes/cpp/sfo_19_regular_expression_matching_s1/sfo_19_regular_expression_matching_s1.cpp class Solution (line 10) | class Solution { method isMatch (line 12) | bool isMatch(string s, string p) { function main (line 28) | int main() { FILE: sword_for_offer/codes/cpp/sfo_19_regular_expression_matching_s2/sfo_19_regular_expression_matching_s2.cpp class Solution (line 10) | class Solution { method isMatch (line 12) | bool isMatch(string s, string p) { function main (line 41) | int main() { FILE: sword_for_offer/codes/cpp/sfo_21_adjust_the_order_of_numbers_in_an_array_s1/sfo_21_adjust_the_order_of_numbers_in_an_array_s1.cpp class Solution (line 10) | class Solution { method exchange (line 12) | vector exchange(vector &nums) { function main (line 25) | int main() { FILE: sword_for_offer/codes/cpp/sfo_22_the_kth_node_from_the_end_of_a_linked_list_s1/sfo_22_the_kth_node_from_the_end_of_a_linked_list_s1.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode *getKthFromEnd(ListNode *head, int k) { function main (line 24) | int main() { FILE: sword_for_offer/codes/cpp/sfo_22_the_kth_node_from_the_end_of_a_linked_list_s2/sfo_22_the_kth_node_from_the_end_of_a_linked_list_s2.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode *getKthFromEnd(ListNode *head, int k) { function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_24_reverse_a_linked_list_s1/sfo_24_reverse_a_linked_list_s1.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode *reverseList(ListNode *head) { function main (line 24) | int main() { FILE: sword_for_offer/codes/cpp/sfo_24_reverse_a_linked_list_s2/sfo_24_reverse_a_linked_list_s2.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode *reverseList(ListNode *head) { method ListNode (line 17) | ListNode *recur(ListNode *cur, ListNode *pre) { function main (line 26) | int main() { FILE: sword_for_offer/codes/cpp/sfo_25_combine_two_sorted_linked_lists_s1/sfo_25_combine_two_sorted_linked_lists_s1.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) { function main (line 30) | int main() { FILE: sword_for_offer/codes/cpp/sfo_26_substructure_of_a_binary_tree_s1/sfo_26_substructure_of_a_binary_tree_s1.cpp class Solution (line 10) | class Solution { method isSubStructure (line 12) | bool isSubStructure(TreeNode *A, TreeNode *B) { method recur (line 18) | bool recur(TreeNode *A, TreeNode *B) { function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_27_mirror_of_a_binary_tree_s1/sfo_27_mirror_of_a_binary_tree_s1.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode *mirrorTree(TreeNode *root) { function main (line 22) | int main() { FILE: sword_for_offer/codes/cpp/sfo_27_mirror_of_a_binary_tree_s2/sfo_27_mirror_of_a_binary_tree_s2.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode *mirrorTree(TreeNode *root) { function main (line 32) | int main() { FILE: sword_for_offer/codes/cpp/sfo_28_symmetric_binary_tree_s1/sfo_28_symmetric_binary_tree_s1.cpp class Solution (line 10) | class Solution { method isSymmetric (line 12) | bool isSymmetric(TreeNode *root) { method recur (line 17) | bool recur(TreeNode *L, TreeNode *R) { function main (line 26) | int main() { FILE: sword_for_offer/codes/cpp/sfo_29_print_a_given_matrix_in_spiral_form_s1/sfo_29_print_a_given_matrix_in_spiral_form_s1.cpp class Solution (line 10) | class Solution { method spiralOrder (line 12) | vector spiralOrder(vector> &matrix) { function main (line 39) | int main() { FILE: sword_for_offer/codes/cpp/sfo_30_min_stack_s1/sfo_30_min_stack_s1.cpp class MinStack (line 10) | class MinStack { method MinStack (line 13) | MinStack() { method push (line 15) | void push(int x) { method pop (line 20) | void pop() { method top (line 25) | int top() { method min (line 28) | int min() { function main (line 33) | int main() { FILE: sword_for_offer/codes/cpp/sfo_31_validate_stack_sequences_s1/sfo_31_validate_stack_sequences_s1.cpp class Solution (line 10) | class Solution { method validateStackSequences (line 12) | bool validateStackSequences(vector &pushed, vector &popped) { function main (line 26) | int main() { FILE: sword_for_offer/codes/cpp/sfo_32i_print_a_binary_tree_topbottom_i_s1/sfo_32i_print_a_binary_tree_topbottom_i_s1.cpp class Solution (line 10) | class Solution { method levelOrder (line 12) | vector levelOrder(TreeNode *root) { function main (line 31) | int main() { FILE: sword_for_offer/codes/cpp/sfo_32ii_print_a_binary_tree_topbottom_ii_s1/sfo_32ii_print_a_binary_tree_topbottom_ii_s1.cpp class Solution (line 10) | class Solution { method levelOrder (line 12) | vector> levelOrder(TreeNode *root) { function main (line 35) | int main() { FILE: sword_for_offer/codes/cpp/sfo_32iii_print_a_binary_tree_topbottom_iii_s1/sfo_32iii_print_a_binary_tree_topbottom_iii_s1.cpp class Solution (line 10) | class Solution { method levelOrder (line 12) | vector> levelOrder(TreeNode *root) { function main (line 53) | int main() { FILE: sword_for_offer/codes/cpp/sfo_32iii_print_a_binary_tree_topbottom_iii_s2/sfo_32iii_print_a_binary_tree_topbottom_iii_s2.cpp class Solution (line 10) | class Solution { method levelOrder (line 12) | vector> levelOrder(TreeNode *root) { function main (line 36) | int main() { FILE: sword_for_offer/codes/cpp/sfo_33_postorder_traversal_of_a_binary_search_tree_s1/sfo_33_postorder_traversal_of_a_binary_search_tree_s1.cpp class Solution (line 10) | class Solution { method verifyPostorder (line 12) | bool verifyPostorder(vector &postorder) { method recur (line 17) | bool recur(vector &postorder, int i, int j) { function main (line 30) | int main() { FILE: sword_for_offer/codes/cpp/sfo_33_postorder_traversal_of_a_binary_search_tree_s2/sfo_33_postorder_traversal_of_a_binary_search_tree_s2.cpp class Solution (line 10) | class Solution { method verifyPostorder (line 12) | bool verifyPostorder(vector &postorder) { function main (line 28) | int main() { FILE: sword_for_offer/codes/cpp/sfo_34_all_xsum_paths_in_a_binary_tree_s1/sfo_34_all_xsum_paths_in_a_binary_tree_s1.cpp class Solution (line 10) | class Solution { method pathSum (line 12) | vector> pathSum(TreeNode *root, int sum) { method recur (line 20) | void recur(TreeNode *root, int tar) { function main (line 33) | int main() { FILE: sword_for_offer/codes/cpp/sfo_35_clone_a_linked_list_with_next_and_random_pointer_s1/sfo_35_clone_a_linked_list_with_next_and_random_pointer_s1.cpp type Node (line 12) | struct Node { method Node (line 16) | Node(int x) : val(x), next(nullptr), random(nullptr) { class Solution (line 21) | class Solution { method Node (line 23) | Node *copyRandomList(Node *head) { function main (line 45) | int main() { FILE: sword_for_offer/codes/cpp/sfo_35_clone_a_linked_list_with_next_and_random_pointer_s2/sfo_35_clone_a_linked_list_with_next_and_random_pointer_s2.cpp type Node (line 12) | struct Node { method Node (line 16) | Node(int x) : val(x), next(nullptr), random(nullptr) { class Solution (line 21) | class Solution { method Node (line 23) | Node *copyRandomList(Node *head) { function main (line 55) | int main() { FILE: sword_for_offer/codes/cpp/sfo_36_binary_search_tree_and_doubly_linked_list_s1/sfo_36_binary_search_tree_and_doubly_linked_list_s1.cpp type Node (line 12) | struct Node { method Node (line 16) | Node(int x) : val(x), left(nullptr), right(nullptr) { class Solution (line 21) | class Solution { method Node (line 23) | Node *treeToDoublyList(Node *root) { method dfs (line 34) | void dfs(Node *cur) { function main (line 48) | int main() { FILE: sword_for_offer/codes/cpp/sfo_37_serialize_and_deserialize_a_binary_tree_s1/sfo_37_serialize_and_deserialize_a_binary_tree_s1.cpp class Codec (line 9) | class Codec { method string (line 12) | string serialize(TreeNode *root) { method TreeNode (line 34) | TreeNode *deserialize(string data) { method split (line 59) | vector split(string str, string delim) { function main (line 72) | int main() { FILE: sword_for_offer/codes/cpp/sfo_38_all_permutations_of_a_string_s1/sfo_38_all_permutations_of_a_string_s1.cpp class Solution (line 10) | class Solution { method permutation (line 12) | vector permutation(string s) { method dfs (line 19) | void dfs(string s, int x) { function main (line 36) | int main() { FILE: sword_for_offer/codes/cpp/sfo_39_the_majority_element_in_an_array_s1/sfo_39_the_majority_element_in_an_array_s1.cpp class Solution (line 10) | class Solution { method majorityElement (line 12) | int majorityElement(vector &nums) { function main (line 23) | int main() { FILE: sword_for_offer/codes/cpp/sfo_39_the_majority_element_in_an_array_s2/sfo_39_the_majority_element_in_an_array_s2.cpp class Solution (line 10) | class Solution { method majorityElement (line 12) | int majorityElement(vector &nums) { function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_40_the_smallest_k_numbers_s1/sfo_40_the_smallest_k_numbers_s1.cpp class Solution (line 10) | class Solution { method getLeastNumbers (line 12) | vector getLeastNumbers(vector &arr, int k) { method quickSort (line 20) | void quickSort(vector &arr, int l, int r) { function main (line 40) | int main() { FILE: sword_for_offer/codes/cpp/sfo_40_the_smallest_k_numbers_s2/sfo_40_the_smallest_k_numbers_s2.cpp class Solution (line 10) | class Solution { method getLeastNumbers (line 12) | vector getLeastNumbers(vector &arr, int k) { method quickSort (line 19) | vector quickSort(vector &arr, int k, int l, int r) { function main (line 39) | int main() { FILE: sword_for_offer/codes/cpp/sfo_41_find_median_from_data_stream_s1/sfo_41_find_median_from_data_stream_s1.cpp class MedianFinder (line 10) | class MedianFinder { method MedianFinder (line 14) | MedianFinder() { method addNum (line 16) | void addNum(int num) { method findMedian (line 27) | double findMedian() { function main (line 32) | int main() { FILE: sword_for_offer/codes/cpp/sfo_42_largest_sum_contiguous_subarray_s1/sfo_42_largest_sum_contiguous_subarray_s1.cpp class Solution (line 10) | class Solution { method maxSubArray (line 12) | int maxSubArray(vector &nums) { function main (line 24) | int main() { FILE: sword_for_offer/codes/cpp/sfo_43_total_number_of_1_in_integers_from_1_to_n_s1/sfo_43_total_number_of_1_in_integers_from_1_to_n_s1.cpp class Solution (line 10) | class Solution { method countDigitOne (line 12) | int countDigitOne(int n) { function main (line 31) | int main() { FILE: sword_for_offer/codes/cpp/sfo_44_nth_digit_s1/sfo_44_nth_digit_s1.cpp class Solution (line 10) | class Solution { method findNthDigit (line 12) | int findNthDigit(int n) { function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_45_arrange_an_array_into_the_smallest_number_s1/sfo_45_arrange_an_array_into_the_smallest_number_s1.cpp class Solution (line 10) | class Solution { method string (line 12) | string minNumber(vector &nums) { method quickSort (line 24) | void quickSort(vector &strs, int l, int r) { function main (line 41) | int main() { FILE: sword_for_offer/codes/cpp/sfo_45_arrange_an_array_into_the_smallest_number_s2/sfo_45_arrange_an_array_into_the_smallest_number_s2.cpp class Solution (line 10) | class Solution { method string (line 12) | string minNumber(vector &nums) { function main (line 24) | int main() { FILE: sword_for_offer/codes/cpp/sfo_46_translate_numbers_into_strings_s1/sfo_46_translate_numbers_into_strings_s1.cpp class Solution (line 10) | class Solution { method translateNum (line 12) | int translateNum(int num) { function main (line 25) | int main() { FILE: sword_for_offer/codes/cpp/sfo_46_translate_numbers_into_strings_s2/sfo_46_translate_numbers_into_strings_s2.cpp class Solution (line 10) | class Solution { method translateNum (line 12) | int translateNum(int num) { function main (line 25) | int main() { FILE: sword_for_offer/codes/cpp/sfo_46_translate_numbers_into_strings_s3/sfo_46_translate_numbers_into_strings_s3.cpp class Solution (line 10) | class Solution { method translateNum (line 12) | int translateNum(int num) { function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_47_the_maximum_value_of_gifts_s1/sfo_47_the_maximum_value_of_gifts_s1.cpp class Solution (line 10) | class Solution { method maxValue (line 12) | int maxValue(vector> &grid) { function main (line 30) | int main() { FILE: sword_for_offer/codes/cpp/sfo_47_the_maximum_value_of_gifts_s2/sfo_47_the_maximum_value_of_gifts_s2.cpp class Solution (line 10) | class Solution { method maxValue (line 12) | int maxValue(vector> &grid) { function main (line 25) | int main() { FILE: sword_for_offer/codes/cpp/sfo_48_the_longest_substring_without_repeated_characters_s1/sfo_48_the_longest_substring_without_repeated_characters_s1.cpp class Solution (line 10) | class Solution { method lengthOfLongestSubstring (line 12) | int lengthOfLongestSubstring(string s) { function main (line 28) | int main() { FILE: sword_for_offer/codes/cpp/sfo_48_the_longest_substring_without_repeated_characters_s2/sfo_48_the_longest_substring_without_repeated_characters_s2.cpp class Solution (line 10) | class Solution { method lengthOfLongestSubstring (line 12) | int lengthOfLongestSubstring(string s) { function main (line 25) | int main() { FILE: sword_for_offer/codes/cpp/sfo_48_the_longest_substring_without_repeated_characters_s3/sfo_48_the_longest_substring_without_repeated_characters_s3.cpp class Solution (line 10) | class Solution { method lengthOfLongestSubstring (line 12) | int lengthOfLongestSubstring(string s) { function main (line 25) | int main() { FILE: sword_for_offer/codes/cpp/sfo_49_ugly_numbers_s1/sfo_49_ugly_numbers_s1.cpp class Solution (line 10) | class Solution { method nthUglyNumber (line 12) | int nthUglyNumber(int n) { function main (line 30) | int main() { FILE: sword_for_offer/codes/cpp/sfo_50_find_the_first_nonrepeating_character_in_a_string_s1/sfo_50_find_the_first_nonrepeating_character_in_a_string_s1.cpp class Solution (line 10) | class Solution { method firstUniqChar (line 12) | char firstUniqChar(string s) { function main (line 23) | int main() { FILE: sword_for_offer/codes/cpp/sfo_50_find_the_first_nonrepeating_character_in_a_string_s2/sfo_50_find_the_first_nonrepeating_character_in_a_string_s2.cpp class Solution (line 10) | class Solution { method firstUniqChar (line 12) | char firstUniqChar(string s) { function main (line 28) | int main() { FILE: sword_for_offer/codes/cpp/sfo_51_reversed_pairs_in_an_array_s1/sfo_51_reversed_pairs_in_an_array_s1.cpp class Solution (line 10) | class Solution { method reversePairs (line 12) | int reversePairs(vector &nums) { method mergeSort (line 18) | int mergeSort(int l, int r, vector &nums, vector &tmp) { function main (line 43) | int main() { FILE: sword_for_offer/codes/cpp/sfo_52_the_first_common_node_in_two_linked_lists_s1/sfo_52_the_first_common_node_in_two_linked_lists_s1.cpp class Solution (line 10) | class Solution { method ListNode (line 12) | ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { function main (line 22) | int main() { FILE: sword_for_offer/codes/cpp/sfo_53i_find_a_number_in_a_sorted_array_s1/sfo_53i_find_a_number_in_a_sorted_array_s1.cpp class Solution (line 10) | class Solution { method search (line 12) | int search(vector &nums, int target) { function main (line 41) | int main() { FILE: sword_for_offer/codes/cpp/sfo_53i_find_a_number_in_a_sorted_array_s2/sfo_53i_find_a_number_in_a_sorted_array_s2.cpp class Solution (line 10) | class Solution { method search (line 12) | int search(vector &nums, int target) { method helper (line 17) | int helper(vector &nums, int tar) { function main (line 30) | int main() { FILE: sword_for_offer/codes/cpp/sfo_53ii_the_missing_number_from_0_to_n1_s1/sfo_53ii_the_missing_number_from_0_to_n1_s1.cpp class Solution (line 10) | class Solution { method missingNumber (line 12) | int missingNumber(vector &nums) { function main (line 25) | int main() { FILE: sword_for_offer/codes/cpp/sfo_54_the_kth_largest_node_of_a_binary_search_tree_s1/sfo_54_the_kth_largest_node_of_a_binary_search_tree_s1.cpp class Solution (line 10) | class Solution { method kthLargest (line 12) | int kthLargest(TreeNode *root, int k) { method dfs (line 20) | void dfs(TreeNode *root) { function main (line 32) | int main() { FILE: sword_for_offer/codes/cpp/sfo_55i_depth_of_a_binary_tree_s1/sfo_55i_depth_of_a_binary_tree_s1.cpp class Solution (line 10) | class Solution { method maxDepth (line 12) | int maxDepth(TreeNode *root) { function main (line 19) | int main() { FILE: sword_for_offer/codes/cpp/sfo_55i_depth_of_a_binary_tree_s2/sfo_55i_depth_of_a_binary_tree_s2.cpp class Solution (line 10) | class Solution { method maxDepth (line 12) | int maxDepth(TreeNode *root) { function main (line 33) | int main() { FILE: sword_for_offer/codes/cpp/sfo_55ii_balanced_binary_tree_s1/sfo_55ii_balanced_binary_tree_s1.cpp class Solution (line 10) | class Solution { method isBalanced (line 12) | bool isBalanced(TreeNode *root) { method recur (line 17) | int recur(TreeNode *root) { function main (line 30) | int main() { FILE: sword_for_offer/codes/cpp/sfo_55ii_balanced_binary_tree_s2/sfo_55ii_balanced_binary_tree_s2.cpp class Solution (line 10) | class Solution { method isBalanced (line 12) | bool isBalanced(TreeNode *root) { method depth (line 19) | int depth(TreeNode *root) { function main (line 26) | int main() { FILE: sword_for_offer/codes/cpp/sfo_56i_single_number_i_s1/sfo_56i_single_number_i_s1.cpp class Solution (line 10) | class Solution { method singleNumbers (line 12) | vector singleNumbers(vector &nums) { function main (line 28) | int main() { FILE: sword_for_offer/codes/cpp/sfo_56ii_single_number_ii_s1/sfo_56ii_single_number_ii_s1.cpp class Solution (line 10) | class Solution { method singleNumber (line 12) | int singleNumber(vector &nums) { function main (line 22) | int main() { FILE: sword_for_offer/codes/cpp/sfo_56ii_single_number_ii_s2/sfo_56ii_single_number_ii_s2.cpp class Solution (line 10) | class Solution { method singleNumber (line 12) | int singleNumber(vector &nums) { function main (line 29) | int main() { FILE: sword_for_offer/codes/cpp/sfo_57_two_numbers_with_sum_s_s1/sfo_57_two_numbers_with_sum_s_s1.cpp class Solution (line 10) | class Solution { method twoSum (line 12) | vector twoSum(vector &nums, int target) { function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_57ii_consecutive_numbers_with_sum_s_s1/sfo_57ii_consecutive_numbers_with_sum_s_s1.cpp class Solution (line 10) | class Solution { method findContinuousSequence (line 12) | vector> findContinuousSequence(int target) { function main (line 30) | int main() { FILE: sword_for_offer/codes/cpp/sfo_57ii_consecutive_numbers_with_sum_s_s2/sfo_57ii_consecutive_numbers_with_sum_s_s2.cpp class Solution (line 10) | class Solution { method findContinuousSequence (line 12) | vector> findContinuousSequence(int target) { function main (line 34) | int main() { FILE: sword_for_offer/codes/cpp/sfo_58ii_left_rotation_of_a_string_s1/sfo_58ii_left_rotation_of_a_string_s1.cpp class Solution (line 10) | class Solution { method string (line 12) | string reverseLeftWords(string s, int n) { function main (line 17) | int main() { FILE: sword_for_offer/codes/cpp/sfo_58ii_left_rotation_of_a_string_s2/sfo_58ii_left_rotation_of_a_string_s2.cpp class Solution (line 10) | class Solution { method string (line 12) | string reverseLeftWords(string s, int n) { method reverseString (line 20) | void reverseString(string &s, int i, int j) { function main (line 26) | int main() { FILE: sword_for_offer/codes/cpp/sfo_58ii_left_rotation_of_a_string_s3/sfo_58ii_left_rotation_of_a_string_s3.cpp class Solution (line 10) | class Solution { method string (line 12) | string reverseLeftWords(string s, int n) { function main (line 20) | int main() { FILE: sword_for_offer/codes/cpp/sfo_59ii_max_queue_s1/sfo_59ii_max_queue_s1.cpp class MaxQueue (line 10) | class MaxQueue { method MaxQueue (line 15) | MaxQueue() { method max_value (line 17) | int max_value() { method push_back (line 20) | void push_back(int value) { method pop_front (line 26) | int pop_front() { function main (line 37) | int main() { FILE: sword_for_offer/codes/cpp/sfo_60_probabilities_for_rolling_n_dices_s1/sfo_60_probabilities_for_rolling_n_dices_s1.cpp class Solution (line 10) | class Solution { method dicesProbability (line 12) | vector dicesProbability(int n) { function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_61_straight_in_poker_s1/sfo_61_straight_in_poker_s1.cpp class Solution (line 10) | class Solution { method isStraight (line 12) | bool isStraight(vector &nums) { function main (line 28) | int main() { FILE: sword_for_offer/codes/cpp/sfo_61_straight_in_poker_s2/sfo_61_straight_in_poker_s2.cpp class Solution (line 10) | class Solution { method isStraight (line 12) | bool isStraight(vector &nums) { function main (line 25) | int main() { FILE: sword_for_offer/codes/cpp/sfo_62_josephus_problem_s1/sfo_62_josephus_problem_s1.cpp class Solution (line 10) | class Solution { method lastRemaining (line 12) | int lastRemaining(int n, int m) { function main (line 21) | int main() { FILE: sword_for_offer/codes/cpp/sfo_63_the_maximum_profit_of_stocks_s1/sfo_63_the_maximum_profit_of_stocks_s1.cpp class Solution (line 10) | class Solution { method maxProfit (line 12) | int maxProfit(vector &prices) { function main (line 22) | int main() { FILE: sword_for_offer/codes/cpp/sfo_64_solve_1_2___n_s1/sfo_64_solve_1_2___n_s1.cpp class Solution (line 10) | class Solution { method sumNums (line 12) | int sumNums(int n) { function main (line 18) | int main() { FILE: sword_for_offer/codes/cpp/sfo_65_implement_addition_operation_without_arithmetic_operators_s1/sfo_65_implement_addition_operation_without_arithmetic_operators_s1.cpp class Solution (line 10) | class Solution { method add (line 12) | int add(int a, int b) { function main (line 22) | int main() { FILE: sword_for_offer/codes/cpp/sfo_66_a_product_array_puzzle_s1/sfo_66_a_product_array_puzzle_s1.cpp class Solution (line 10) | class Solution { method constructArr (line 12) | vector constructArr(vector &a) { function main (line 30) | int main() { FILE: sword_for_offer/codes/cpp/sfo_67_convert_string_to_int_s1/sfo_67_convert_string_to_int_s1.cpp class Solution (line 10) | class Solution { method strToInt (line 12) | int strToInt(string str) { function main (line 35) | int main() { FILE: sword_for_offer/codes/cpp/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s1/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s1.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode *lowestCommonAncestor(TreeNode *root, TreeNode *p, TreeNode *... function main (line 25) | int main() { FILE: sword_for_offer/codes/cpp/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s2/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s2.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode *lowestCommonAncestor(TreeNode *root, TreeNode *p, TreeNode *... function main (line 27) | int main() { FILE: sword_for_offer/codes/cpp/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s3/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s3.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode *lowestCommonAncestor(TreeNode *root, TreeNode *p, TreeNode *... function main (line 21) | int main() { FILE: sword_for_offer/codes/cpp/sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s1/sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s1.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode *lowestCommonAncestor(TreeNode *root, TreeNode *p, TreeNode *... function main (line 25) | int main() { FILE: sword_for_offer/codes/cpp/sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s2/sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s2.cpp class Solution (line 10) | class Solution { method TreeNode (line 12) | TreeNode *lowestCommonAncestor(TreeNode *root, TreeNode *p, TreeNode *... function main (line 27) | int main() { FILE: sword_for_offer/codes/java/include/ListNode.java class ListNode (line 8) | public class ListNode { method ListNode (line 12) | public ListNode(int x) { method arrToLinkedList (line 22) | public static ListNode arrToLinkedList(int[] arr) { method getListNode (line 39) | public static ListNode getListNode(ListNode head, int val) { FILE: sword_for_offer/codes/java/include/PrintUtil.java class Trunk (line 5) | class Trunk { method Trunk (line 9) | Trunk(Trunk prev, String str) { class PrintUtil (line 15) | public class PrintUtil { method printLinkedList (line 21) | public static void printLinkedList(ListNode head) { method printTree (line 37) | public static void printTree(TreeNode root) { method printTree (line 48) | public static void printTree(TreeNode root, Trunk prev, boolean isLeft) { method showTrunks (line 79) | public static void showTrunks(Trunk p) { FILE: sword_for_offer/codes/java/include/TreeNode.java class TreeNode (line 8) | public class TreeNode { method TreeNode (line 13) | public TreeNode(int x) { method arrToTree (line 23) | public static TreeNode arrToTree(Integer[] arr) { method treeToList (line 53) | public static List treeToList(TreeNode root) { method getTreeNode (line 82) | public static TreeNode getTreeNode(TreeNode root, int val) { FILE: sword_for_offer/codes/java/sfo_03_find_duplicate_numbers_in_an_array_s1/sfo_03_find_duplicate_numbers_in_an_array_s1.java class Solution (line 13) | class Solution { method findRepeatNumber (line 14) | public int findRepeatNumber(int[] nums) { class sfo_03_find_duplicate_numbers_in_an_array_s1 (line 25) | public class sfo_03_find_duplicate_numbers_in_an_array_s1 { method main (line 26) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_03_find_duplicate_numbers_in_an_array_s2/sfo_03_find_duplicate_numbers_in_an_array_s2.java class Solution (line 13) | class Solution { method findRepeatNumber (line 14) | public int findRepeatNumber(int[] nums) { class sfo_03_find_duplicate_numbers_in_an_array_s2 (line 31) | public class sfo_03_find_duplicate_numbers_in_an_array_s2 { method main (line 32) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_04_find_a_number_in_2d_matrix_s1/sfo_04_find_a_number_in_2d_matrix_s1.java class Solution (line 13) | class Solution { method findNumberIn2DArray (line 14) | public boolean findNumberIn2DArray(int[][] matrix, int target) { class sfo_04_find_a_number_in_2d_matrix_s1 (line 28) | public class sfo_04_find_a_number_in_2d_matrix_s1 { method main (line 29) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_05_replace_spaces_s1/sfo_05_replace_spaces_s1.java class Solution (line 13) | class Solution { method replaceSpace (line 14) | public String replaceSpace(String s) { class sfo_05_replace_spaces_s1 (line 26) | public class sfo_05_replace_spaces_s1 { method main (line 27) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_06_print_a_linked_list_in_reverse_order_s1/sfo_06_print_a_linked_list_in_reverse_order_s1.java class Solution (line 13) | class Solution { method reversePrint (line 16) | public int[] reversePrint(ListNode head) { method recur (line 24) | void recur(ListNode head) { class sfo_06_print_a_linked_list_in_reverse_order_s1 (line 32) | public class sfo_06_print_a_linked_list_in_reverse_order_s1 { method main (line 33) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_06_print_a_linked_list_in_reverse_order_s2/sfo_06_print_a_linked_list_in_reverse_order_s2.java class Solution (line 13) | class Solution { method reversePrint (line 14) | public int[] reversePrint(ListNode head) { class sfo_06_print_a_linked_list_in_reverse_order_s2 (line 27) | public class sfo_06_print_a_linked_list_in_reverse_order_s2 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_07_reconstruct_binary_tree_s1/sfo_07_reconstruct_binary_tree_s1.java class Solution (line 13) | class Solution { method buildTree (line 17) | public TreeNode buildTree(int[] preorder, int[] inorder) { method recur (line 24) | TreeNode recur(int root, int left, int right) { class sfo_07_reconstruct_binary_tree_s1 (line 35) | public class sfo_07_reconstruct_binary_tree_s1 { method main (line 36) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_09_implement_a_queue_using_two_stacks_s1/sfo_09_implement_a_queue_using_two_stacks_s1.java class CQueue (line 13) | class CQueue { method CQueue (line 16) | public CQueue() { method appendTail (line 21) | public void appendTail(int value) { method deleteHead (line 25) | public int deleteHead() { class sfo_09_implement_a_queue_using_two_stacks_s1 (line 36) | public class sfo_09_implement_a_queue_using_two_stacks_s1 { method main (line 37) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_10i_fibonacci_numbers_s1/sfo_10i_fibonacci_numbers_s1.java class Solution (line 13) | class Solution { method fib (line 14) | public int fib(int n) { class sfo_10i_fibonacci_numbers_s1 (line 25) | public class sfo_10i_fibonacci_numbers_s1 { method main (line 26) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_10ii_frog_jump_s1/sfo_10ii_frog_jump_s1.java class Solution (line 13) | class Solution { method numWays (line 14) | public int numWays(int n) { class sfo_10ii_frog_jump_s1 (line 25) | public class sfo_10ii_frog_jump_s1 { method main (line 26) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_11_find_minimum_in_rotated_sorted_array_s1/sfo_11_find_minimum_in_rotated_sorted_array_s1.java class Solution (line 13) | class Solution { method minArray (line 14) | public int minArray(int[] numbers) { class sfo_11_find_minimum_in_rotated_sorted_array_s1 (line 29) | public class sfo_11_find_minimum_in_rotated_sorted_array_s1 { method main (line 30) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_11_find_minimum_in_rotated_sorted_array_s2/sfo_11_find_minimum_in_rotated_sorted_array_s2.java class Solution (line 13) | class Solution { method minArray (line 14) | public int minArray(int[] numbers) { class sfo_11_find_minimum_in_rotated_sorted_array_s2 (line 35) | public class sfo_11_find_minimum_in_rotated_sorted_array_s2 { method main (line 36) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_12_word_search_s1/sfo_12_word_search_s1.java class Solution (line 13) | class Solution { method exist (line 14) | public boolean exist(char[][] board, String word) { method dfs (line 25) | boolean dfs(char[][] board, char[] word, int i, int j, int k) { class sfo_12_word_search_s1 (line 38) | public class sfo_12_word_search_s1 { method main (line 39) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_13_range_of_motion_of_a_robot_s1/sfo_13_range_of_motion_of_a_robot_s1.java class Solution (line 13) | class Solution { method movingCount (line 17) | public int movingCount(int m, int n, int k) { method dfs (line 25) | public int dfs(int i, int j, int si, int sj) { class sfo_13_range_of_motion_of_a_robot_s1 (line 34) | public class sfo_13_range_of_motion_of_a_robot_s1 { method main (line 35) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_13_range_of_motion_of_a_robot_s2/sfo_13_range_of_motion_of_a_robot_s2.java class Solution (line 13) | class Solution { method movingCount (line 14) | public int movingCount(int m, int n, int k) { class sfo_13_range_of_motion_of_a_robot_s2 (line 33) | public class sfo_13_range_of_motion_of_a_robot_s2 { method main (line 34) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_14i_cut_the_rope_i_s1/sfo_14i_cut_the_rope_i_s1.java class Solution (line 13) | class Solution { method cuttingRope (line 14) | public int cuttingRope(int n) { class sfo_14i_cut_the_rope_i_s1 (line 26) | public class sfo_14i_cut_the_rope_i_s1 { method main (line 27) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_14ii_cut_the_rope_ii_s1/sfo_14ii_cut_the_rope_ii_s1.java class Solution (line 13) | class Solution { method cuttingRope (line 14) | public int cuttingRope(int n) { class sfo_14ii_cut_the_rope_ii_s1 (line 32) | public class sfo_14ii_cut_the_rope_ii_s1 { method main (line 33) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_15_number_of_1_bits_s1/sfo_15_number_of_1_bits_s1.java class Solution (line 13) | class Solution { method hammingWeight (line 14) | public int hammingWeight(int n) { class sfo_15_number_of_1_bits_s1 (line 24) | public class sfo_15_number_of_1_bits_s1 { method main (line 25) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_15_number_of_1_bits_s2/sfo_15_number_of_1_bits_s2.java class Solution (line 13) | class Solution { method hammingWeight (line 14) | public int hammingWeight(int n) { class sfo_15_number_of_1_bits_s2 (line 24) | public class sfo_15_number_of_1_bits_s2 { method main (line 25) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_16_powers_of_integers_s1/sfo_16_powers_of_integers_s1.java class Solution (line 13) | class Solution { method myPow (line 14) | public double myPow(double x, int n) { class sfo_16_powers_of_integers_s1 (line 33) | public class sfo_16_powers_of_integers_s1 { method main (line 34) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_17_print_from_1_to_the_largest_n_digits_s1/sfo_17_print_from_1_to_the_largest_n_digits_s1.java class Solution (line 13) | class Solution { method printNumbers (line 14) | public int[] printNumbers(int n) { class sfo_17_print_from_1_to_the_largest_n_digits_s1 (line 23) | public class sfo_17_print_from_1_to_the_largest_n_digits_s1 { method main (line 24) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_17_print_from_1_to_the_largest_n_digits_s2/sfo_17_print_from_1_to_the_largest_n_digits_s2.java class Solution (line 13) | class Solution { method printNumbers (line 18) | public String printNumbers(int n) { method dfs (line 27) | void dfs(int x) { class sfo_17_print_from_1_to_the_largest_n_digits_s2 (line 39) | public class sfo_17_print_from_1_to_the_largest_n_digits_s2 { method main (line 40) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_17_print_from_1_to_the_largest_n_digits_s3/sfo_17_print_from_1_to_the_largest_n_digits_s3.java class Solution (line 13) | class Solution { method printNumbers (line 18) | public String printNumbers(int n) { method dfs (line 28) | void dfs(int x) { class sfo_17_print_from_1_to_the_largest_n_digits_s3 (line 47) | public class sfo_17_print_from_1_to_the_largest_n_digits_s3 { method main (line 48) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_17_print_from_1_to_the_largest_n_digits_s4/sfo_17_print_from_1_to_the_largest_n_digits_s4.java class Solution (line 13) | class Solution { method printNumbers (line 18) | public int[] printNumbers(int n) { method dfs (line 27) | void dfs(int x) { class sfo_17_print_from_1_to_the_largest_n_digits_s4 (line 46) | public class sfo_17_print_from_1_to_the_largest_n_digits_s4 { method main (line 47) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_18_delete_a_node_from_a_linked_list_s1/sfo_18_delete_a_node_from_a_linked_list_s1.java class Solution (line 13) | class Solution { method deleteNode (line 14) | public ListNode deleteNode(ListNode head, int val) { class sfo_18_delete_a_node_from_a_linked_list_s1 (line 28) | public class sfo_18_delete_a_node_from_a_linked_list_s1 { method main (line 29) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_19_regular_expression_matching_s1/sfo_19_regular_expression_matching_s1.java class Solution (line 13) | class Solution { method isMatch (line 14) | public boolean isMatch(String s, String p) { class sfo_19_regular_expression_matching_s1 (line 31) | public class sfo_19_regular_expression_matching_s1 { method main (line 32) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_19_regular_expression_matching_s2/sfo_19_regular_expression_matching_s2.java class Solution (line 13) | class Solution { method isMatch (line 14) | public boolean isMatch(String s, String p) { class sfo_19_regular_expression_matching_s2 (line 43) | public class sfo_19_regular_expression_matching_s2 { method main (line 44) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_20_a_string_representing_a_numeric_value_s1/sfo_20_a_string_representing_a_numeric_value_s1.java class Solution (line 13) | class Solution { method isNumber (line 14) | public boolean isNumber(String s) { class sfo_20_a_string_representing_a_numeric_value_s1 (line 94) | public class sfo_20_a_string_representing_a_numeric_value_s1 { method main (line 95) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_21_adjust_the_order_of_numbers_in_an_array_s1/sfo_21_adjust_the_order_of_numbers_in_an_array_s1.java class Solution (line 13) | class Solution { method exchange (line 14) | public int[] exchange(int[] nums) { class sfo_21_adjust_the_order_of_numbers_in_an_array_s1 (line 29) | public class sfo_21_adjust_the_order_of_numbers_in_an_array_s1 { method main (line 30) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_22_the_kth_node_from_the_end_of_a_linked_list_s1/sfo_22_the_kth_node_from_the_end_of_a_linked_list_s1.java class Solution (line 13) | class Solution { method getKthFromEnd (line 14) | public ListNode getKthFromEnd(ListNode head, int k) { class sfo_22_the_kth_node_from_the_end_of_a_linked_list_s1 (line 26) | public class sfo_22_the_kth_node_from_the_end_of_a_linked_list_s1 { method main (line 27) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_22_the_kth_node_from_the_end_of_a_linked_list_s2/sfo_22_the_kth_node_from_the_end_of_a_linked_list_s2.java class Solution (line 13) | class Solution { method getKthFromEnd (line 14) | public ListNode getKthFromEnd(ListNode head, int k) { class sfo_22_the_kth_node_from_the_end_of_a_linked_list_s2 (line 29) | public class sfo_22_the_kth_node_from_the_end_of_a_linked_list_s2 { method main (line 30) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_24_reverse_a_linked_list_s1/sfo_24_reverse_a_linked_list_s1.java class Solution (line 13) | class Solution { method reverseList (line 14) | public ListNode reverseList(ListNode head) { class sfo_24_reverse_a_linked_list_s1 (line 26) | public class sfo_24_reverse_a_linked_list_s1 { method main (line 27) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_24_reverse_a_linked_list_s2/sfo_24_reverse_a_linked_list_s2.java class Solution (line 13) | class Solution { method reverseList (line 14) | public ListNode reverseList(ListNode head) { method recur (line 18) | private ListNode recur(ListNode cur, ListNode pre) { class sfo_24_reverse_a_linked_list_s2 (line 27) | public class sfo_24_reverse_a_linked_list_s2 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_25_combine_two_sorted_linked_lists_s1/sfo_25_combine_two_sorted_linked_lists_s1.java class Solution (line 13) | class Solution { method mergeTwoLists (line 14) | public ListNode mergeTwoLists(ListNode l1, ListNode l2) { class sfo_25_combine_two_sorted_linked_lists_s1 (line 31) | public class sfo_25_combine_two_sorted_linked_lists_s1 { method main (line 32) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_26_substructure_of_a_binary_tree_s1/sfo_26_substructure_of_a_binary_tree_s1.java class Solution (line 13) | class Solution { method isSubStructure (line 14) | public boolean isSubStructure(TreeNode A, TreeNode B) { method recur (line 18) | boolean recur(TreeNode A, TreeNode B) { class sfo_26_substructure_of_a_binary_tree_s1 (line 27) | public class sfo_26_substructure_of_a_binary_tree_s1 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_27_mirror_of_a_binary_tree_s1/sfo_27_mirror_of_a_binary_tree_s1.java class Solution (line 13) | class Solution { method mirrorTree (line 14) | public TreeNode mirrorTree(TreeNode root) { class sfo_27_mirror_of_a_binary_tree_s1 (line 24) | public class sfo_27_mirror_of_a_binary_tree_s1 { method main (line 25) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_27_mirror_of_a_binary_tree_s2/sfo_27_mirror_of_a_binary_tree_s2.java class Solution (line 13) | class Solution { method mirrorTree (line 14) | public TreeNode mirrorTree(TreeNode root) { class sfo_27_mirror_of_a_binary_tree_s2 (line 36) | public class sfo_27_mirror_of_a_binary_tree_s2 { method main (line 37) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_28_symmetric_binary_tree_s1/sfo_28_symmetric_binary_tree_s1.java class Solution (line 13) | class Solution { method isSymmetric (line 14) | public boolean isSymmetric(TreeNode root) { method recur (line 18) | boolean recur(TreeNode L, TreeNode R) { class sfo_28_symmetric_binary_tree_s1 (line 27) | public class sfo_28_symmetric_binary_tree_s1 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_29_print_a_given_matrix_in_spiral_form_s1/sfo_29_print_a_given_matrix_in_spiral_form_s1.java class Solution (line 13) | class Solution { method spiralOrder (line 14) | public int[] spiralOrder(int[][] matrix) { class sfo_29_print_a_given_matrix_in_spiral_form_s1 (line 41) | public class sfo_29_print_a_given_matrix_in_spiral_form_s1 { method main (line 42) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_30_min_stack_s1/sfo_30_min_stack_s1.java class MinStack (line 13) | class MinStack { method MinStack (line 16) | public MinStack() { method push (line 21) | public void push(int x) { method pop (line 27) | public void pop() { method top (line 32) | public int top() { method min (line 36) | public int min() { class sfo_30_min_stack_s1 (line 41) | public class sfo_30_min_stack_s1 { method main (line 42) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_31_validate_stack_sequences_s1/sfo_31_validate_stack_sequences_s1.java class Solution (line 13) | class Solution { method validateStackSequences (line 14) | public boolean validateStackSequences(int[] pushed, int[] popped) { class sfo_31_validate_stack_sequences_s1 (line 28) | public class sfo_31_validate_stack_sequences_s1 { method main (line 29) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_32i_print_a_binary_tree_topbottom_i_s1/sfo_32i_print_a_binary_tree_topbottom_i_s1.java class Solution (line 13) | class Solution { method levelOrder (line 14) | public int[] levelOrder(TreeNode root) { class sfo_32i_print_a_binary_tree_topbottom_i_s1 (line 38) | public class sfo_32i_print_a_binary_tree_topbottom_i_s1 { method main (line 39) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_32ii_print_a_binary_tree_topbottom_ii_s1/sfo_32ii_print_a_binary_tree_topbottom_ii_s1.java class Solution (line 13) | class Solution { method levelOrder (line 14) | public List> levelOrder(TreeNode root) { class sfo_32ii_print_a_binary_tree_topbottom_ii_s1 (line 35) | public class sfo_32ii_print_a_binary_tree_topbottom_ii_s1 { method main (line 36) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_32iii_print_a_binary_tree_topbottom_iii_s1/sfo_32iii_print_a_binary_tree_topbottom_iii_s1.java class Solution (line 13) | class Solution { method levelOrder (line 14) | public List> levelOrder(TreeNode root) { class sfo_32iii_print_a_binary_tree_topbottom_iii_s1 (line 38) | public class sfo_32iii_print_a_binary_tree_topbottom_iii_s1 { method main (line 39) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_32iii_print_a_binary_tree_topbottom_iii_s2/sfo_32iii_print_a_binary_tree_topbottom_iii_s2.java class Solution (line 13) | class Solution { method levelOrder (line 14) | public List> levelOrder(TreeNode root) { class sfo_32iii_print_a_binary_tree_topbottom_iii_s2 (line 53) | public class sfo_32iii_print_a_binary_tree_topbottom_iii_s2 { method main (line 54) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_32iii_print_a_binary_tree_topbottom_iii_s3/sfo_32iii_print_a_binary_tree_topbottom_iii_s3.java class Solution (line 13) | class Solution { method levelOrder (line 14) | public List> levelOrder(TreeNode root) { class sfo_32iii_print_a_binary_tree_topbottom_iii_s3 (line 37) | public class sfo_32iii_print_a_binary_tree_topbottom_iii_s3 { method main (line 38) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_33_postorder_traversal_of_a_binary_search_tree_s1/sfo_33_postorder_traversal_of_a_binary_search_tree_s1.java class Solution (line 13) | class Solution { method verifyPostorder (line 14) | public boolean verifyPostorder(int[] postorder) { method recur (line 18) | boolean recur(int[] postorder, int i, int j) { class sfo_33_postorder_traversal_of_a_binary_search_tree_s1 (line 31) | public class sfo_33_postorder_traversal_of_a_binary_search_tree_s1 { method main (line 32) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_33_postorder_traversal_of_a_binary_search_tree_s2/sfo_33_postorder_traversal_of_a_binary_search_tree_s2.java class Solution (line 13) | class Solution { method verifyPostorder (line 14) | public boolean verifyPostorder(int[] postorder) { class sfo_33_postorder_traversal_of_a_binary_search_tree_s2 (line 28) | public class sfo_33_postorder_traversal_of_a_binary_search_tree_s2 { method main (line 29) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_34_all_xsum_paths_in_a_binary_tree_s1/sfo_34_all_xsum_paths_in_a_binary_tree_s1.java class Solution (line 13) | class Solution { method pathSum (line 17) | public List> pathSum(TreeNode root, int sum) { method recur (line 22) | void recur(TreeNode root, int tar) { class sfo_34_all_xsum_paths_in_a_binary_tree_s1 (line 35) | public class sfo_34_all_xsum_paths_in_a_binary_tree_s1 { method main (line 36) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_35_clone_a_linked_list_with_next_and_random_pointer_s1/sfo_35_clone_a_linked_list_with_next_and_random_pointer_s1.java class Node (line 13) | class Node { method Node (line 18) | public Node(int val) { class Solution (line 26) | class Solution { method copyRandomList (line 27) | public Node copyRandomList(Node head) { class sfo_35_clone_a_linked_list_with_next_and_random_pointer_s1 (line 49) | public class sfo_35_clone_a_linked_list_with_next_and_random_pointer_s1 { method main (line 50) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_35_clone_a_linked_list_with_next_and_random_pointer_s2/sfo_35_clone_a_linked_list_with_next_and_random_pointer_s2.java class Node (line 13) | class Node { method Node (line 18) | public Node(int val) { class Solution (line 26) | class Solution { method copyRandomList (line 27) | public Node copyRandomList(Node head) { class sfo_35_clone_a_linked_list_with_next_and_random_pointer_s2 (line 59) | public class sfo_35_clone_a_linked_list_with_next_and_random_pointer_s2 { method main (line 60) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_36_binary_search_tree_and_doubly_linked_list_s1/sfo_36_binary_search_tree_and_doubly_linked_list_s1.java class Node (line 13) | class Node { method Node (line 18) | public Node(int val) { class Solution (line 26) | class Solution { method treeToDoublyList (line 29) | public Node treeToDoublyList(Node root) { method dfs (line 38) | void dfs(Node cur) { class sfo_36_binary_search_tree_and_doubly_linked_list_s1 (line 52) | public class sfo_36_binary_search_tree_and_doubly_linked_list_s1 { method main (line 53) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_37_serialize_and_deserialize_a_binary_tree_s1/sfo_37_serialize_and_deserialize_a_binary_tree_s1.java class Codec (line 13) | class Codec { method serialize (line 14) | public String serialize(TreeNode root) { method deserialize (line 37) | public TreeNode deserialize(String data) { class sfo_37_serialize_and_deserialize_a_binary_tree_s1 (line 65) | public class sfo_37_serialize_and_deserialize_a_binary_tree_s1 { method main (line 66) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_38_all_permutations_of_a_string_s1/sfo_38_all_permutations_of_a_string_s1.java class Solution (line 13) | class Solution { method permutation (line 17) | public String[] permutation(String s) { method dfs (line 23) | void dfs(int x) { method swap (line 39) | void swap(int a, int b) { class sfo_38_all_permutations_of_a_string_s1 (line 46) | public class sfo_38_all_permutations_of_a_string_s1 { method main (line 47) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_39_the_majority_element_in_an_array_s1/sfo_39_the_majority_element_in_an_array_s1.java class Solution (line 13) | class Solution { method majorityElement (line 14) | public int majorityElement(int[] nums) { class sfo_39_the_majority_element_in_an_array_s1 (line 25) | public class sfo_39_the_majority_element_in_an_array_s1 { method main (line 26) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_39_the_majority_element_in_an_array_s2/sfo_39_the_majority_element_in_an_array_s2.java class Solution (line 13) | class Solution { method majorityElement (line 14) | public int majorityElement(int[] nums) { class sfo_39_the_majority_element_in_an_array_s2 (line 29) | public class sfo_39_the_majority_element_in_an_array_s2 { method main (line 30) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_40_the_smallest_k_numbers_s1/sfo_40_the_smallest_k_numbers_s1.java class Solution (line 13) | class Solution { method getLeastNumbers (line 14) | public int[] getLeastNumbers(int[] arr, int k) { method quickSort (line 19) | private void quickSort(int[] arr, int l, int r) { method swap (line 38) | private void swap(int[] arr, int i, int j) { class sfo_40_the_smallest_k_numbers_s1 (line 45) | public class sfo_40_the_smallest_k_numbers_s1 { method main (line 46) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_40_the_smallest_k_numbers_s2/sfo_40_the_smallest_k_numbers_s2.java class Solution (line 13) | class Solution { method getLeastNumbers (line 14) | public int[] getLeastNumbers(int[] arr, int k) { method quickSort (line 20) | private int[] quickSort(int[] arr, int k, int l, int r) { method swap (line 37) | private void swap(int[] arr, int i, int j) { class sfo_40_the_smallest_k_numbers_s2 (line 44) | public class sfo_40_the_smallest_k_numbers_s2 { method main (line 45) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_41_find_median_from_data_stream_s1/sfo_41_find_median_from_data_stream_s1.java class MedianFinder (line 13) | class MedianFinder { method MedianFinder (line 16) | public MedianFinder() { method addNum (line 21) | public void addNum(int num) { method findMedian (line 31) | public double findMedian() { class sfo_41_find_median_from_data_stream_s1 (line 36) | public class sfo_41_find_median_from_data_stream_s1 { method main (line 37) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_42_largest_sum_contiguous_subarray_s1/sfo_42_largest_sum_contiguous_subarray_s1.java class Solution (line 13) | class Solution { method maxSubArray (line 14) | public int maxSubArray(int[] nums) { class sfo_42_largest_sum_contiguous_subarray_s1 (line 24) | public class sfo_42_largest_sum_contiguous_subarray_s1 { method main (line 25) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_43_total_number_of_1_in_integers_from_1_to_n_s1/sfo_43_total_number_of_1_in_integers_from_1_to_n_s1.java class Solution (line 13) | class Solution { method countDigitOne (line 14) | public int countDigitOne(int n) { class sfo_43_total_number_of_1_in_integers_from_1_to_n_s1 (line 33) | public class sfo_43_total_number_of_1_in_integers_from_1_to_n_s1 { method main (line 34) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_44_nth_digit_s1/sfo_44_nth_digit_s1.java class Solution (line 13) | class Solution { method findNthDigit (line 14) | public int findNthDigit(int n) { class sfo_44_nth_digit_s1 (line 29) | public class sfo_44_nth_digit_s1 { method main (line 30) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_45_arrange_an_array_into_the_smallest_number_s1/sfo_45_arrange_an_array_into_the_smallest_number_s1.java class Solution (line 13) | class Solution { method minNumber (line 14) | public String minNumber(int[] nums) { method quickSort (line 25) | void quickSort(String[] strs, int l, int r) { class sfo_45_arrange_an_array_into_the_smallest_number_s1 (line 46) | public class sfo_45_arrange_an_array_into_the_smallest_number_s1 { method main (line 47) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_45_arrange_an_array_into_the_smallest_number_s2/sfo_45_arrange_an_array_into_the_smallest_number_s2.java class Solution (line 13) | class Solution { method minNumber (line 14) | public String minNumber(int[] nums) { class sfo_45_arrange_an_array_into_the_smallest_number_s2 (line 26) | public class sfo_45_arrange_an_array_into_the_smallest_number_s2 { method main (line 27) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_46_translate_numbers_into_strings_s1/sfo_46_translate_numbers_into_strings_s1.java class Solution (line 13) | class Solution { method translateNum (line 14) | public int translateNum(int num) { class sfo_46_translate_numbers_into_strings_s1 (line 27) | public class sfo_46_translate_numbers_into_strings_s1 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_46_translate_numbers_into_strings_s2/sfo_46_translate_numbers_into_strings_s2.java class Solution (line 13) | class Solution { method translateNum (line 14) | public int translateNum(int num) { class sfo_46_translate_numbers_into_strings_s2 (line 27) | public class sfo_46_translate_numbers_into_strings_s2 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_46_translate_numbers_into_strings_s3/sfo_46_translate_numbers_into_strings_s3.java class Solution (line 13) | class Solution { method translateNum (line 14) | public int translateNum(int num) { class sfo_46_translate_numbers_into_strings_s3 (line 29) | public class sfo_46_translate_numbers_into_strings_s3 { method main (line 30) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_47_the_maximum_value_of_gifts_s1/sfo_47_the_maximum_value_of_gifts_s1.java class Solution (line 13) | class Solution { method maxValue (line 14) | public int maxValue(int[][] grid) { class sfo_47_the_maximum_value_of_gifts_s1 (line 32) | public class sfo_47_the_maximum_value_of_gifts_s1 { method main (line 33) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_47_the_maximum_value_of_gifts_s2/sfo_47_the_maximum_value_of_gifts_s2.java class Solution (line 13) | class Solution { method maxValue (line 14) | public int maxValue(int[][] grid) { class sfo_47_the_maximum_value_of_gifts_s2 (line 27) | public class sfo_47_the_maximum_value_of_gifts_s2 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_48_the_longest_substring_without_repeated_characters_s1/sfo_48_the_longest_substring_without_repeated_characters_s1.java class Solution (line 13) | class Solution { method lengthOfLongestSubstring (line 14) | public int lengthOfLongestSubstring(String s) { class sfo_48_the_longest_substring_without_repeated_characters_s1 (line 27) | public class sfo_48_the_longest_substring_without_repeated_characters_s1 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_48_the_longest_substring_without_repeated_characters_s2/sfo_48_the_longest_substring_without_repeated_characters_s2.java class Solution (line 13) | class Solution { method lengthOfLongestSubstring (line 14) | public int lengthOfLongestSubstring(String s) { class sfo_48_the_longest_substring_without_repeated_characters_s2 (line 27) | public class sfo_48_the_longest_substring_without_repeated_characters_s2 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_48_the_longest_substring_without_repeated_characters_s3/sfo_48_the_longest_substring_without_repeated_characters_s3.java class Solution (line 13) | class Solution { method lengthOfLongestSubstring (line 14) | public int lengthOfLongestSubstring(String s) { class sfo_48_the_longest_substring_without_repeated_characters_s3 (line 27) | public class sfo_48_the_longest_substring_without_repeated_characters_s3 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_49_ugly_numbers_s1/sfo_49_ugly_numbers_s1.java class Solution (line 13) | class Solution { method nthUglyNumber (line 14) | public int nthUglyNumber(int n) { class sfo_49_ugly_numbers_s1 (line 32) | public class sfo_49_ugly_numbers_s1 { method main (line 33) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_50_find_the_first_nonrepeating_character_in_a_string_s1/sfo_50_find_the_first_nonrepeating_character_in_a_string_s1.java class Solution (line 13) | class Solution { method firstUniqChar (line 14) | public char firstUniqChar(String s) { class sfo_50_find_the_first_nonrepeating_character_in_a_string_s1 (line 26) | public class sfo_50_find_the_first_nonrepeating_character_in_a_string_s1 { method main (line 27) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_50_find_the_first_nonrepeating_character_in_a_string_s2/sfo_50_find_the_first_nonrepeating_character_in_a_string_s2.java class Solution (line 13) | class Solution { method firstUniqChar (line 14) | public char firstUniqChar(String s) { class sfo_50_find_the_first_nonrepeating_character_in_a_string_s2 (line 27) | public class sfo_50_find_the_first_nonrepeating_character_in_a_string_s2 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_51_reversed_pairs_in_an_array_s1/sfo_51_reversed_pairs_in_an_array_s1.java class Solution (line 13) | class Solution { method reversePairs (line 16) | public int reversePairs(int[] nums) { method mergeSort (line 22) | private int mergeSort(int l, int r) { class sfo_51_reversed_pairs_in_an_array_s1 (line 47) | public class sfo_51_reversed_pairs_in_an_array_s1 { method main (line 48) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_52_the_first_common_node_in_two_linked_lists_s1/sfo_52_the_first_common_node_in_two_linked_lists_s1.java class Solution (line 13) | class Solution { method getIntersectionNode (line 14) | public ListNode getIntersectionNode(ListNode headA, ListNode headB) { class sfo_52_the_first_common_node_in_two_linked_lists_s1 (line 24) | public class sfo_52_the_first_common_node_in_two_linked_lists_s1 { method main (line 25) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_53i_find_a_number_in_a_sorted_array_s1/sfo_53i_find_a_number_in_a_sorted_array_s1.java class Solution (line 13) | class Solution { method search (line 14) | public int search(int[] nums, int target) { class sfo_53i_find_a_number_in_a_sorted_array_s1 (line 43) | public class sfo_53i_find_a_number_in_a_sorted_array_s1 { method main (line 44) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_53i_find_a_number_in_a_sorted_array_s2/sfo_53i_find_a_number_in_a_sorted_array_s2.java class Solution (line 13) | class Solution { method search (line 14) | public int search(int[] nums, int target) { method helper (line 18) | int helper(int[] nums, int tar) { class sfo_53i_find_a_number_in_a_sorted_array_s2 (line 31) | public class sfo_53i_find_a_number_in_a_sorted_array_s2 { method main (line 32) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_53ii_the_missing_number_from_0_to_n1_s1/sfo_53ii_the_missing_number_from_0_to_n1_s1.java class Solution (line 13) | class Solution { method missingNumber (line 14) | public int missingNumber(int[] nums) { class sfo_53ii_the_missing_number_from_0_to_n1_s1 (line 27) | public class sfo_53ii_the_missing_number_from_0_to_n1_s1 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_54_the_kth_largest_node_of_a_binary_search_tree_s1/sfo_54_the_kth_largest_node_of_a_binary_search_tree_s1.java class Solution (line 13) | class Solution { method kthLargest (line 16) | public int kthLargest(TreeNode root, int k) { method dfs (line 22) | void dfs(TreeNode root) { class sfo_54_the_kth_largest_node_of_a_binary_search_tree_s1 (line 34) | public class sfo_54_the_kth_largest_node_of_a_binary_search_tree_s1 { method main (line 35) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_55i_depth_of_a_binary_tree_s1/sfo_55i_depth_of_a_binary_tree_s1.java class Solution (line 13) | class Solution { method maxDepth (line 14) | public int maxDepth(TreeNode root) { class sfo_55i_depth_of_a_binary_tree_s1 (line 21) | public class sfo_55i_depth_of_a_binary_tree_s1 { method main (line 22) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_55i_depth_of_a_binary_tree_s2/sfo_55i_depth_of_a_binary_tree_s2.java class Solution (line 13) | class Solution { method maxDepth (line 14) | public int maxDepth(TreeNode root) { class sfo_55i_depth_of_a_binary_tree_s2 (line 38) | public class sfo_55i_depth_of_a_binary_tree_s2 { method main (line 39) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_55ii_balanced_binary_tree_s1/sfo_55ii_balanced_binary_tree_s1.java class Solution (line 13) | class Solution { method isBalanced (line 14) | public boolean isBalanced(TreeNode root) { method recur (line 18) | private int recur(TreeNode root) { class sfo_55ii_balanced_binary_tree_s1 (line 31) | public class sfo_55ii_balanced_binary_tree_s1 { method main (line 32) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_55ii_balanced_binary_tree_s2/sfo_55ii_balanced_binary_tree_s2.java class Solution (line 13) | class Solution { method isBalanced (line 14) | public boolean isBalanced(TreeNode root) { method depth (line 20) | private int depth(TreeNode root) { class sfo_55ii_balanced_binary_tree_s2 (line 27) | public class sfo_55ii_balanced_binary_tree_s2 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_56i_single_number_i_s1/sfo_56i_single_number_i_s1.java class Solution (line 13) | class Solution { method singleNumbers (line 14) | public int[] singleNumbers(int[] nums) { class sfo_56i_single_number_i_s1 (line 30) | public class sfo_56i_single_number_i_s1 { method main (line 31) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_56ii_single_number_ii_s1/sfo_56ii_single_number_ii_s1.java class Solution (line 13) | class Solution { method singleNumber (line 14) | public int singleNumber(int[] nums) { class sfo_56ii_single_number_ii_s1 (line 24) | public class sfo_56ii_single_number_ii_s1 { method main (line 25) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_56ii_single_number_ii_s2/sfo_56ii_single_number_ii_s2.java class Solution (line 13) | class Solution { method singleNumber (line 14) | public int singleNumber(int[] nums) { class sfo_56ii_single_number_ii_s2 (line 31) | public class sfo_56ii_single_number_ii_s2 { method main (line 32) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_57_two_numbers_with_sum_s_s1/sfo_57_two_numbers_with_sum_s_s1.java class Solution (line 13) | class Solution { method twoSum (line 14) | public int[] twoSum(int[] nums, int target) { class sfo_57_two_numbers_with_sum_s_s1 (line 29) | public class sfo_57_two_numbers_with_sum_s_s1 { method main (line 30) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_57ii_consecutive_numbers_with_sum_s_s1/sfo_57ii_consecutive_numbers_with_sum_s_s1.java class Solution (line 13) | class Solution { method findContinuousSequence (line 14) | public int[][] findContinuousSequence(int target) { class sfo_57ii_consecutive_numbers_with_sum_s_s1 (line 32) | public class sfo_57ii_consecutive_numbers_with_sum_s_s1 { method main (line 33) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_57ii_consecutive_numbers_with_sum_s_s2/sfo_57ii_consecutive_numbers_with_sum_s_s2.java class Solution (line 13) | class Solution { method findContinuousSequence (line 14) | public int[][] findContinuousSequence(int target) { class sfo_57ii_consecutive_numbers_with_sum_s_s2 (line 36) | public class sfo_57ii_consecutive_numbers_with_sum_s_s2 { method main (line 37) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_58i_reverse_order_of_words_s1/sfo_58i_reverse_order_of_words_s1.java class Solution (line 13) | class Solution { method reverseWords (line 14) | public String reverseWords(String s) { class sfo_58i_reverse_order_of_words_s1 (line 30) | public class sfo_58i_reverse_order_of_words_s1 { method main (line 31) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_58i_reverse_order_of_words_s2/sfo_58i_reverse_order_of_words_s2.java class Solution (line 13) | class Solution { method reverseWords (line 14) | public String reverseWords(String s) { class sfo_58i_reverse_order_of_words_s2 (line 26) | public class sfo_58i_reverse_order_of_words_s2 { method main (line 27) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_58ii_left_rotation_of_a_string_s1/sfo_58ii_left_rotation_of_a_string_s1.java class Solution (line 13) | class Solution { method reverseLeftWords (line 14) | public String reverseLeftWords(String s, int n) { class sfo_58ii_left_rotation_of_a_string_s1 (line 19) | public class sfo_58ii_left_rotation_of_a_string_s1 { method main (line 20) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_58ii_left_rotation_of_a_string_s2/sfo_58ii_left_rotation_of_a_string_s2.java class Solution (line 13) | class Solution { method reverseLeftWords (line 14) | public String reverseLeftWords(String s, int n) { class sfo_58ii_left_rotation_of_a_string_s2 (line 24) | public class sfo_58ii_left_rotation_of_a_string_s2 { method main (line 25) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_58ii_left_rotation_of_a_string_s3/sfo_58ii_left_rotation_of_a_string_s3.java class Solution (line 13) | class Solution { method reverseLeftWords (line 14) | public String reverseLeftWords(String s, int n) { class sfo_58ii_left_rotation_of_a_string_s3 (line 22) | public class sfo_58ii_left_rotation_of_a_string_s3 { method main (line 23) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_58ii_left_rotation_of_a_string_s4/sfo_58ii_left_rotation_of_a_string_s4.java class Solution (line 13) | class Solution { method reverseLeftWords (line 14) | public String reverseLeftWords(String s, int n) { class sfo_58ii_left_rotation_of_a_string_s4 (line 24) | public class sfo_58ii_left_rotation_of_a_string_s4 { method main (line 25) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_58ii_left_rotation_of_a_string_s5/sfo_58ii_left_rotation_of_a_string_s5.java class Solution (line 13) | class Solution { method reverseLeftWords (line 14) | public String reverseLeftWords(String s, int n) { class sfo_58ii_left_rotation_of_a_string_s5 (line 22) | public class sfo_58ii_left_rotation_of_a_string_s5 { method main (line 23) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_59i_sliding_window_maximum_s1/sfo_59i_sliding_window_maximum_s1.java class Solution (line 13) | class Solution { method maxSlidingWindow (line 14) | public int[] maxSlidingWindow(int[] nums, int k) { class sfo_59i_sliding_window_maximum_s1 (line 35) | public class sfo_59i_sliding_window_maximum_s1 { method main (line 36) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_59i_sliding_window_maximum_s2/sfo_59i_sliding_window_maximum_s2.java class Solution (line 13) | class Solution { method maxSlidingWindow (line 14) | public int[] maxSlidingWindow(int[] nums, int k) { class sfo_59i_sliding_window_maximum_s2 (line 39) | public class sfo_59i_sliding_window_maximum_s2 { method main (line 40) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_59ii_max_queue_s1/sfo_59ii_max_queue_s1.java class MaxQueue (line 13) | class MaxQueue { method MaxQueue (line 17) | public MaxQueue() { method max_value (line 22) | public int max_value() { method push_back (line 26) | public void push_back(int value) { method pop_front (line 33) | public int pop_front() { class sfo_59ii_max_queue_s1 (line 42) | public class sfo_59ii_max_queue_s1 { method main (line 43) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_60_probabilities_for_rolling_n_dices_s1/sfo_60_probabilities_for_rolling_n_dices_s1.java class Solution (line 13) | class Solution { method dicesProbability (line 14) | public double[] dicesProbability(int n) { class sfo_60_probabilities_for_rolling_n_dices_s1 (line 30) | public class sfo_60_probabilities_for_rolling_n_dices_s1 { method main (line 31) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_61_straight_in_poker_s1/sfo_61_straight_in_poker_s1.java class Solution (line 13) | class Solution { method isStraight (line 14) | public boolean isStraight(int[] nums) { class sfo_61_straight_in_poker_s1 (line 30) | public class sfo_61_straight_in_poker_s1 { method main (line 31) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_61_straight_in_poker_s2/sfo_61_straight_in_poker_s2.java class Solution (line 13) | class Solution { method isStraight (line 14) | public boolean isStraight(int[] nums) { class sfo_61_straight_in_poker_s2 (line 27) | public class sfo_61_straight_in_poker_s2 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_62_josephus_problem_s1/sfo_62_josephus_problem_s1.java class Solution (line 13) | class Solution { method lastRemaining (line 14) | public int lastRemaining(int n, int m) { class sfo_62_josephus_problem_s1 (line 23) | public class sfo_62_josephus_problem_s1 { method main (line 24) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_63_the_maximum_profit_of_stocks_s1/sfo_63_the_maximum_profit_of_stocks_s1.java class Solution (line 13) | class Solution { method maxProfit (line 14) | public int maxProfit(int[] prices) { class sfo_63_the_maximum_profit_of_stocks_s1 (line 24) | public class sfo_63_the_maximum_profit_of_stocks_s1 { method main (line 25) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_64_solve_1_2___n_s1/sfo_64_solve_1_2___n_s1.java class Solution (line 13) | class Solution { method sumNums (line 16) | public int sumNums(int n) { class sfo_64_solve_1_2___n_s1 (line 23) | public class sfo_64_solve_1_2___n_s1 { method main (line 24) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_64_solve_1_2___n_s2/sfo_64_solve_1_2___n_s2.java class Solution (line 13) | class Solution { method sumNums (line 14) | public int sumNums(int n) { class sfo_64_solve_1_2___n_s2 (line 20) | public class sfo_64_solve_1_2___n_s2 { method main (line 21) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_65_implement_addition_operation_without_arithmetic_operators_s1/sfo_65_implement_addition_operation_without_arithmetic_operators_s1.java class Solution (line 13) | class Solution { method add (line 14) | public int add(int a, int b) { class sfo_65_implement_addition_operation_without_arithmetic_operators_s1 (line 24) | public class sfo_65_implement_addition_operation_without_arithmetic_oper... method main (line 25) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_66_a_product_array_puzzle_s1/sfo_66_a_product_array_puzzle_s1.java class Solution (line 13) | class Solution { method constructArr (line 14) | public int[] constructArr(int[] a) { class sfo_66_a_product_array_puzzle_s1 (line 32) | public class sfo_66_a_product_array_puzzle_s1 { method main (line 33) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_67_convert_string_to_int_s1/sfo_67_convert_string_to_int_s1.java class Solution (line 13) | class Solution { method strToInt (line 14) | public int strToInt(String str) { class sfo_67_convert_string_to_int_s1 (line 35) | public class sfo_67_convert_string_to_int_s1 { method main (line 36) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_67_convert_string_to_int_s2/sfo_67_convert_string_to_int_s2.java class Solution (line 13) | class Solution { method strToInt (line 14) | public int strToInt(String str) { class sfo_67_convert_string_to_int_s2 (line 37) | public class sfo_67_convert_string_to_int_s2 { method main (line 38) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s1/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s1.java class Solution (line 13) | class Solution { method lowestCommonAncestor (line 14) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo... class sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s1 (line 27) | public class sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree... method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s2/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s2.java class Solution (line 13) | class Solution { method lowestCommonAncestor (line 14) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo... class sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s2 (line 32) | public class sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree... method main (line 33) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s3/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s3.java class Solution (line 13) | class Solution { method lowestCommonAncestor (line 14) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo... class sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s3 (line 23) | public class sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree... method main (line 24) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s1/sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s1.java class Solution (line 13) | class Solution { method lowestCommonAncestor (line 14) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo... class sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s1 (line 27) | public class sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s1 { method main (line 28) | public static void main(String[] args) { FILE: sword_for_offer/codes/java/sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s2/sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s2.java class Solution (line 13) | class Solution { method lowestCommonAncestor (line 14) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo... class sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s2 (line 29) | public class sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s2 { method main (line 30) | public static void main(String[] args) { FILE: sword_for_offer/codes/python/include/binary_tree.py class TreeNode (line 10) | class TreeNode: method __init__ (line 13) | def __init__(self, val=0, left=None, right=None): function list_to_tree (line 19) | def list_to_tree(arr): function tree_to_list (line 47) | def tree_to_list(root): function get_tree_node (line 72) | def get_tree_node(root, val): FILE: sword_for_offer/codes/python/include/linked_list.py class ListNode (line 8) | class ListNode: method __init__ (line 11) | def __init__(self, val=0, next=None): function list_to_linked_list (line 16) | def list_to_linked_list(arr): function linked_list_to_list (line 33) | def linked_list_to_list(head): function get_list_node (line 49) | def get_list_node(head, val): FILE: sword_for_offer/codes/python/include/print_util.py function print_matrix (line 11) | def print_matrix(mat): function print_linked_list (line 24) | def print_linked_list(head): class Trunk (line 34) | class Trunk: method __init__ (line 35) | def __init__(self, prev=None, str=None): function showTrunks (line 40) | def showTrunks(p): function print_tree (line 47) | def print_tree(root, prev=None, isLeft=False): FILE: sword_for_offer/codes/python/sfo_03_find_duplicate_numbers_in_an_array_s1.py class Solution (line 11) | class Solution: method findRepeatNumber (line 12) | def findRepeatNumber(self, nums: List[int]) -> int: FILE: sword_for_offer/codes/python/sfo_03_find_duplicate_numbers_in_an_array_s2.py class Solution (line 11) | class Solution: method findRepeatNumber (line 12) | def findRepeatNumber(self, nums: List[int]) -> int: FILE: sword_for_offer/codes/python/sfo_04_find_a_number_in_2d_matrix_s1.py class Solution (line 11) | class Solution: method findNumberIn2DArray (line 12) | def findNumberIn2DArray(self, matrix: List[List[int]], target: int) ->... FILE: sword_for_offer/codes/python/sfo_05_replace_spaces_s1.py class Solution (line 11) | class Solution: method replaceSpace (line 12) | def replaceSpace(self, s: str) -> str: FILE: sword_for_offer/codes/python/sfo_06_print_a_linked_list_in_reverse_order_s1.py class Solution (line 11) | class Solution: method reversePrint (line 12) | def reversePrint(self, head: ListNode) -> List[int]: FILE: sword_for_offer/codes/python/sfo_06_print_a_linked_list_in_reverse_order_s2.py class Solution (line 11) | class Solution: method reversePrint (line 12) | def reversePrint(self, head: ListNode) -> List[int]: FILE: sword_for_offer/codes/python/sfo_07_reconstruct_binary_tree_s1.py class Solution (line 11) | class Solution: method buildTree (line 12) | def buildTree(self, preorder: List[int], inorder: List[int]) -> TreeNode: FILE: sword_for_offer/codes/python/sfo_09_implement_a_queue_using_two_stacks_s1.py class CQueue (line 11) | class CQueue: method __init__ (line 12) | def __init__(self): method appendTail (line 15) | def appendTail(self, value: int) -> None: method deleteHead (line 18) | def deleteHead(self) -> int: FILE: sword_for_offer/codes/python/sfo_10i_fibonacci_numbers_s1.py class Solution (line 11) | class Solution: method fib (line 12) | def fib(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_10i_fibonacci_numbers_s2.py class Solution (line 12) | class Solution: method fib (line 13) | def fib(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_10ii_frog_jump_s1.py class Solution (line 11) | class Solution: method numWays (line 12) | def numWays(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_10ii_frog_jump_s2.py class Solution (line 12) | class Solution: method numWays (line 13) | def numWays(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_11_find_minimum_in_rotated_sorted_array_s1.py class Solution (line 11) | class Solution: method minArray (line 12) | def minArray(self, numbers: List[int]) -> int: FILE: sword_for_offer/codes/python/sfo_11_find_minimum_in_rotated_sorted_array_s2.py class Solution (line 11) | class Solution: method minArray (line 12) | def minArray(self, numbers: List[int]) -> int: FILE: sword_for_offer/codes/python/sfo_12_word_search_s1.py class Solution (line 11) | class Solution: method exist (line 12) | def exist(self, board: List[List[str]], word: str) -> bool: FILE: sword_for_offer/codes/python/sfo_13_range_of_motion_of_a_robot_s1.py class Solution (line 11) | class Solution: method movingCount (line 12) | def movingCount(self, m: int, n: int, k: int) -> int: FILE: sword_for_offer/codes/python/sfo_13_range_of_motion_of_a_robot_s2.py class Solution (line 11) | class Solution: method movingCount (line 12) | def movingCount(self, m: int, n: int, k: int) -> int: FILE: sword_for_offer/codes/python/sfo_14i_cut_the_rope_i_s1.py class Solution (line 11) | class Solution: method cuttingRope (line 12) | def cuttingRope(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_14ii_cut_the_rope_ii_s1.py class Solution (line 11) | class Solution: method cuttingRope (line 12) | def cuttingRope(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_14ii_cut_the_rope_ii_s2.py class Solution (line 12) | class Solution: method cuttingRope (line 13) | def cuttingRope(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_15_number_of_1_bits_s1.py class Solution (line 11) | class Solution: method hammingWeight (line 12) | def hammingWeight(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_15_number_of_1_bits_s2.py class Solution (line 11) | class Solution: method hammingWeight (line 12) | def hammingWeight(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_16_powers_of_integers_s1.py class Solution (line 11) | class Solution: method myPow (line 12) | def myPow(self, x: float, n: int) -> float: FILE: sword_for_offer/codes/python/sfo_17_print_from_1_to_the_largest_n_digits_s1.py class Solution (line 11) | class Solution: method printNumbers (line 12) | def printNumbers(self, n: int) -> List[int]: FILE: sword_for_offer/codes/python/sfo_17_print_from_1_to_the_largest_n_digits_s2.py class Solution (line 11) | class Solution: method printNumbers (line 12) | def printNumbers(self, n: int) -> List[int]: FILE: sword_for_offer/codes/python/sfo_17_print_from_1_to_the_largest_n_digits_s3.py class Solution (line 11) | class Solution: method printNumbers (line 12) | def printNumbers(self, n: int) -> List[int]: FILE: sword_for_offer/codes/python/sfo_17_print_from_1_to_the_largest_n_digits_s4.py class Solution (line 11) | class Solution: method printNumbers (line 12) | def printNumbers(self, n: int) -> List[int]: FILE: sword_for_offer/codes/python/sfo_18_delete_a_node_from_a_linked_list_s1.py class Solution (line 11) | class Solution: method deleteNode (line 12) | def deleteNode(self, head: ListNode, val: int) -> ListNode: FILE: sword_for_offer/codes/python/sfo_19_regular_expression_matching_s1.py class Solution (line 11) | class Solution: method isMatch (line 12) | def isMatch(self, s: str, p: str) -> bool: FILE: sword_for_offer/codes/python/sfo_19_regular_expression_matching_s2.py class Solution (line 11) | class Solution: method isMatch (line 12) | def isMatch(self, s: str, p: str) -> bool: FILE: sword_for_offer/codes/python/sfo_20_a_string_representing_a_numeric_value_s1.py class Solution (line 11) | class Solution: method isNumber (line 12) | def isNumber(self, s: str) -> bool: FILE: sword_for_offer/codes/python/sfo_21_adjust_the_order_of_numbers_in_an_array_s1.py class Solution (line 11) | class Solution: method exchange (line 12) | def exchange(self, nums: List[int]) -> List[int]: FILE: sword_for_offer/codes/python/sfo_22_the_kth_node_from_the_end_of_a_linked_list_s1.py class Solution (line 11) | class Solution: method getKthFromEnd (line 12) | def getKthFromEnd(self, head: ListNode, k: int) -> ListNode: FILE: sword_for_offer/codes/python/sfo_22_the_kth_node_from_the_end_of_a_linked_list_s2.py class Solution (line 11) | class Solution: method getKthFromEnd (line 12) | def getKthFromEnd(self, head: ListNode, k: int) -> ListNode: FILE: sword_for_offer/codes/python/sfo_24_reverse_a_linked_list_s1.py class Solution (line 11) | class Solution: method reverseList (line 12) | def reverseList(self, head: ListNode) -> ListNode: FILE: sword_for_offer/codes/python/sfo_24_reverse_a_linked_list_s2.py class Solution (line 11) | class Solution: method reverseList (line 12) | def reverseList(self, head: ListNode) -> ListNode: FILE: sword_for_offer/codes/python/sfo_24_reverse_a_linked_list_s3.py class Solution (line 11) | class Solution: method reverseList (line 12) | def reverseList(self, head: ListNode) -> ListNode: FILE: sword_for_offer/codes/python/sfo_25_combine_two_sorted_linked_lists_s1.py class Solution (line 11) | class Solution: method mergeTwoLists (line 12) | def mergeTwoLists(self, l1: ListNode, l2: ListNode) -> ListNode: FILE: sword_for_offer/codes/python/sfo_26_substructure_of_a_binary_tree_s1.py class Solution (line 11) | class Solution: method isSubStructure (line 12) | def isSubStructure(self, A: TreeNode, B: TreeNode) -> bool: FILE: sword_for_offer/codes/python/sfo_27_mirror_of_a_binary_tree_s1.py class Solution (line 11) | class Solution: method mirrorTree (line 12) | def mirrorTree(self, root: TreeNode) -> TreeNode: FILE: sword_for_offer/codes/python/sfo_27_mirror_of_a_binary_tree_s2.py class Solution (line 11) | class Solution: method mirrorTree (line 12) | def mirrorTree(self, root: TreeNode) -> TreeNode: FILE: sword_for_offer/codes/python/sfo_27_mirror_of_a_binary_tree_s3.py class Solution (line 11) | class Solution: method mirrorTree (line 12) | def mirrorTree(self, root: TreeNode) -> TreeNode: FILE: sword_for_offer/codes/python/sfo_28_symmetric_binary_tree_s1.py class Solution (line 11) | class Solution: method isSymmetric (line 12) | def isSymmetric(self, root: TreeNode) -> bool: FILE: sword_for_offer/codes/python/sfo_29_print_a_given_matrix_in_spiral_form_s1.py class Solution (line 11) | class Solution: method spiralOrder (line 12) | def spiralOrder(self, matrix: List[List[int]]) -> List[int]: FILE: sword_for_offer/codes/python/sfo_30_min_stack_s1.py class MinStack (line 11) | class MinStack: method __init__ (line 12) | def __init__(self): method push (line 15) | def push(self, x: int) -> None: method pop (line 20) | def pop(self) -> None: method top (line 24) | def top(self) -> int: method min (line 27) | def min(self) -> int: FILE: sword_for_offer/codes/python/sfo_31_validate_stack_sequences_s1.py class Solution (line 11) | class Solution: method validateStackSequences (line 12) | def validateStackSequences(self, pushed: List[int], popped: List[int])... FILE: sword_for_offer/codes/python/sfo_32i_print_a_binary_tree_topbottom_i_s1.py class Solution (line 11) | class Solution: method levelOrder (line 12) | def levelOrder(self, root: TreeNode) -> List[int]: FILE: sword_for_offer/codes/python/sfo_32ii_print_a_binary_tree_topbottom_ii_s1.py class Solution (line 11) | class Solution: method levelOrder (line 12) | def levelOrder(self, root: TreeNode) -> List[List[int]]: FILE: sword_for_offer/codes/python/sfo_32iii_print_a_binary_tree_topbottom_iii_s1.py class Solution (line 11) | class Solution: method levelOrder (line 12) | def levelOrder(self, root: TreeNode) -> List[List[int]]: FILE: sword_for_offer/codes/python/sfo_32iii_print_a_binary_tree_topbottom_iii_s2.py class Solution (line 11) | class Solution: method levelOrder (line 12) | def levelOrder(self, root: TreeNode) -> List[List[int]]: FILE: sword_for_offer/codes/python/sfo_32iii_print_a_binary_tree_topbottom_iii_s3.py class Solution (line 11) | class Solution: method levelOrder (line 12) | def levelOrder(self, root: TreeNode) -> List[List[int]]: FILE: sword_for_offer/codes/python/sfo_33_postorder_traversal_of_a_binary_search_tree_s1.py class Solution (line 11) | class Solution: method verifyPostorder (line 12) | def verifyPostorder(self, postorder: List[int]) -> bool: FILE: sword_for_offer/codes/python/sfo_33_postorder_traversal_of_a_binary_search_tree_s2.py class Solution (line 11) | class Solution: method verifyPostorder (line 12) | def verifyPostorder(self, postorder: List[int]) -> bool: FILE: sword_for_offer/codes/python/sfo_34_all_xsum_paths_in_a_binary_tree_s1.py class Solution (line 11) | class Solution: method pathSum (line 12) | def pathSum(self, root: TreeNode, sum: int) -> List[List[int]]: FILE: sword_for_offer/codes/python/sfo_35_clone_a_linked_list_with_next_and_random_pointer_s1.py class Node (line 11) | class Node: method __init__ (line 12) | def __init__(self, x: int, next: "Node" = None, random: "Node" = None): class Solution (line 19) | class Solution: method copyRandomList (line 20) | def copyRandomList(self, head: "Node") -> "Node": FILE: sword_for_offer/codes/python/sfo_35_clone_a_linked_list_with_next_and_random_pointer_s2.py class Node (line 11) | class Node: method __init__ (line 12) | def __init__(self, x: int, next: "Node" = None, random: "Node" = None): class Solution (line 19) | class Solution: method copyRandomList (line 20) | def copyRandomList(self, head: "Node") -> "Node": FILE: sword_for_offer/codes/python/sfo_36_binary_search_tree_and_doubly_linked_list_s1.py class Node (line 11) | class Node: method __init__ (line 12) | def __init__(self, val, left=None, right=None): class Solution (line 19) | class Solution: method treeToDoublyList (line 20) | def treeToDoublyList(self, root: "Node") -> "Node": FILE: sword_for_offer/codes/python/sfo_37_serialize_and_deserialize_a_binary_tree_s1.py class Codec (line 11) | class Codec: method serialize (line 12) | def serialize(self, root: TreeNode) -> str: method deserialize (line 28) | def deserialize(self, data: str) -> TreeNode: FILE: sword_for_offer/codes/python/sfo_38_all_permutations_of_a_string_s1.py class Solution (line 11) | class Solution: method permutation (line 12) | def permutation(self, s: str) -> List[str]: FILE: sword_for_offer/codes/python/sfo_39_the_majority_element_in_an_array_s1.py class Solution (line 11) | class Solution: method majorityElement (line 12) | def majorityElement(self, nums: List[int]) -> int: FILE: sword_for_offer/codes/python/sfo_39_the_majority_element_in_an_array_s2.py class Solution (line 11) | class Solution: method majorityElement (line 12) | def majorityElement(self, nums: List[int]) -> int: FILE: sword_for_offer/codes/python/sfo_40_the_smallest_k_numbers_s1.py class Solution (line 11) | class Solution: method getLeastNumbers (line 12) | def getLeastNumbers(self, arr: List[int], k: int) -> List[int]: FILE: sword_for_offer/codes/python/sfo_40_the_smallest_k_numbers_s2.py class Solution (line 11) | class Solution: method getLeastNumbers (line 12) | def getLeastNumbers(self, arr: List[int], k: int) -> List[int]: FILE: sword_for_offer/codes/python/sfo_41_find_median_from_data_stream_s1.py class MedianFinder (line 13) | class MedianFinder: method __init__ (line 14) | def __init__(self): method addNum (line 18) | def addNum(self, num: int) -> None: method findMedian (line 26) | def findMedian(self) -> float: FILE: sword_for_offer/codes/python/sfo_41_find_median_from_data_stream_s2.py class MedianFinder (line 13) | class MedianFinder: method __init__ (line 14) | def __init__(self): method addNum (line 18) | def addNum(self, num: int) -> None: method findMedian (line 24) | def findMedian(self) -> float: FILE: sword_for_offer/codes/python/sfo_42_largest_sum_contiguous_subarray_s1.py class Solution (line 11) | class Solution: method maxSubArray (line 12) | def maxSubArray(self, nums: List[int]) -> int: FILE: sword_for_offer/codes/python/sfo_43_total_number_of_1_in_integers_from_1_to_n_s1.py class Solution (line 11) | class Solution: method countDigitOne (line 12) | def countDigitOne(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_44_nth_digit_s1.py class Solution (line 11) | class Solution: method findNthDigit (line 12) | def findNthDigit(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_45_arrange_an_array_into_the_smallest_number_s1.py class Solution (line 11) | class Solution: method minNumber (line 12) | def minNumber(self, nums: List[int]) -> str: FILE: sword_for_offer/codes/python/sfo_45_arrange_an_array_into_the_smallest_number_s2.py class Solution (line 11) | class Solution: method minNumber (line 12) | def minNumber(self, nums: List[int]) -> str: FILE: sword_for_offer/codes/python/sfo_46_translate_numbers_into_strings_s1.py class Solution (line 11) | class Solution: method translateNum (line 12) | def translateNum(self, num: int) -> int: FILE: sword_for_offer/codes/python/sfo_46_translate_numbers_into_strings_s2.py class Solution (line 11) | class Solution: method translateNum (line 12) | def translateNum(self, num: int) -> int: FILE: sword_for_offer/codes/python/sfo_46_translate_numbers_into_strings_s3.py class Solution (line 11) | class Solution: method translateNum (line 12) | def translateNum(self, num: int) -> int: FILE: sword_for_offer/codes/python/sfo_46_translate_numbers_into_strings_s4.py class Solution (line 11) | class Solution: method translateNum (line 12) | def translateNum(self, num: int) -> int: FILE: sword_for_offer/codes/python/sfo_46_translate_numbers_into_strings_s5.py class Solution (line 11) | class Solution: method translateNum (line 12) | def translateNum(self, num: int) -> int: FILE: sword_for_offer/codes/python/sfo_47_the_maximum_value_of_gifts_s1.py class Solution (line 11) | class Solution: method maxValue (line 12) | def maxValue(self, grid: List[List[int]]) -> int: FILE: sword_for_offer/codes/python/sfo_47_the_maximum_value_of_gifts_s2.py class Solution (line 11) | class Solution: method maxValue (line 12) | def maxValue(self, grid: List[List[int]]) -> int: FILE: sword_for_offer/codes/python/sfo_48_the_longest_substring_without_repeated_characters_s1.py class Solution (line 11) | class Solution: method lengthOfLongestSubstring (line 12) | def lengthOfLongestSubstring(self, s: str) -> int: FILE: sword_for_offer/codes/python/sfo_48_the_longest_substring_without_repeated_characters_s2.py class Solution (line 11) | class Solution: method lengthOfLongestSubstring (line 12) | def lengthOfLongestSubstring(self, s: str) -> int: FILE: sword_for_offer/codes/python/sfo_48_the_longest_substring_without_repeated_characters_s3.py class Solution (line 11) | class Solution: method lengthOfLongestSubstring (line 12) | def lengthOfLongestSubstring(self, s: str) -> int: FILE: sword_for_offer/codes/python/sfo_49_ugly_numbers_s1.py class Solution (line 11) | class Solution: method nthUglyNumber (line 12) | def nthUglyNumber(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_50_find_the_first_nonrepeating_character_in_a_string_s1.py class Solution (line 11) | class Solution: method firstUniqChar (line 12) | def firstUniqChar(self, s: str) -> str: FILE: sword_for_offer/codes/python/sfo_50_find_the_first_nonrepeating_character_in_a_string_s2.py class Solution (line 11) | class Solution: method firstUniqChar (line 12) | def firstUniqChar(self, s: str) -> str: FILE: sword_for_offer/codes/python/sfo_50_find_the_first_nonrepeating_character_in_a_string_s3.py class Solution (line 11) | class Solution: method firstUniqChar (line 12) | def firstUniqChar(self, s: str) -> str: FILE: sword_for_offer/codes/python/sfo_51_reversed_pairs_in_an_array_s1.py class Solution (line 11) | class Solution: method reversePairs (line 12) | def reversePairs(self, nums: List[int]) -> int: FILE: sword_for_offer/codes/python/sfo_52_the_first_common_node_in_two_linked_lists_s1.py class Solution (line 11) | class Solution: method getIntersectionNode (line 12) | def getIntersectionNode(self, headA: ListNode, headB: ListNode) -> Lis... FILE: sword_for_offer/codes/python/sfo_53i_find_a_number_in_a_sorted_array_s1.py class Solution (line 11) | class Solution: method search (line 12) | def search(self, nums: List[int], target: int) -> int: FILE: sword_for_offer/codes/python/sfo_53i_find_a_number_in_a_sorted_array_s2.py class Solution (line 11) | class Solution: method search (line 12) | def search(self, nums: List[int], target: int) -> int: FILE: sword_for_offer/codes/python/sfo_53ii_the_missing_number_from_0_to_n1_s1.py class Solution (line 11) | class Solution: method missingNumber (line 12) | def missingNumber(self, nums: List[int]) -> int: FILE: sword_for_offer/codes/python/sfo_54_the_kth_largest_node_of_a_binary_search_tree_s1.py class Solution (line 11) | class Solution: method kthLargest (line 12) | def kthLargest(self, root: TreeNode, k: int) -> int: FILE: sword_for_offer/codes/python/sfo_55i_depth_of_a_binary_tree_s1.py class Solution (line 11) | class Solution: method maxDepth (line 12) | def maxDepth(self, root: TreeNode) -> int: FILE: sword_for_offer/codes/python/sfo_55i_depth_of_a_binary_tree_s2.py class Solution (line 11) | class Solution: method maxDepth (line 12) | def maxDepth(self, root: TreeNode) -> int: FILE: sword_for_offer/codes/python/sfo_55ii_balanced_binary_tree_s1.py class Solution (line 11) | class Solution: method isBalanced (line 12) | def isBalanced(self, root: TreeNode) -> bool: FILE: sword_for_offer/codes/python/sfo_55ii_balanced_binary_tree_s2.py class Solution (line 11) | class Solution: method isBalanced (line 12) | def isBalanced(self, root: TreeNode) -> bool: method depth (line 21) | def depth(self, root): FILE: sword_for_offer/codes/python/sfo_56i_single_number_i_s1.py class Solution (line 11) | class Solution: method singleNumbers (line 12) | def singleNumbers(self, nums: List[int]) -> List[int]: FILE: sword_for_offer/codes/python/sfo_56ii_single_number_ii_s1.py class Solution (line 11) | class Solution: method singleNumber (line 12) | def singleNumber(self, nums: List[int]) -> int: FILE: sword_for_offer/codes/python/sfo_56ii_single_number_ii_s2.py class Solution (line 11) | class Solution: method singleNumber (line 12) | def singleNumber(self, nums: List[int]) -> int: FILE: sword_for_offer/codes/python/sfo_57_two_numbers_with_sum_s_s1.py class Solution (line 11) | class Solution: method twoSum (line 12) | def twoSum(self, nums: List[int], target: int) -> List[int]: FILE: sword_for_offer/codes/python/sfo_57ii_consecutive_numbers_with_sum_s_s1.py class Solution (line 11) | class Solution: method findContinuousSequence (line 12) | def findContinuousSequence(self, target: int) -> List[List[int]]: FILE: sword_for_offer/codes/python/sfo_57ii_consecutive_numbers_with_sum_s_s2.py class Solution (line 11) | class Solution: method findContinuousSequence (line 12) | def findContinuousSequence(self, target: int) -> List[List[int]]: FILE: sword_for_offer/codes/python/sfo_58i_reverse_order_of_words_s1.py class Solution (line 11) | class Solution: method reverseWords (line 12) | def reverseWords(self, s: str) -> str: FILE: sword_for_offer/codes/python/sfo_58i_reverse_order_of_words_s2.py class Solution (line 11) | class Solution: method reverseWords (line 12) | def reverseWords(self, s: str) -> str: FILE: sword_for_offer/codes/python/sfo_58i_reverse_order_of_words_s3.py class Solution (line 11) | class Solution: method reverseWords (line 12) | def reverseWords(self, s: str) -> str: FILE: sword_for_offer/codes/python/sfo_58ii_left_rotation_of_a_string_s1.py class Solution (line 11) | class Solution: method reverseLeftWords (line 12) | def reverseLeftWords(self, s: str, n: int) -> str: FILE: sword_for_offer/codes/python/sfo_58ii_left_rotation_of_a_string_s2.py class Solution (line 11) | class Solution: method reverseLeftWords (line 12) | def reverseLeftWords(self, s: str, n: int) -> str: FILE: sword_for_offer/codes/python/sfo_58ii_left_rotation_of_a_string_s3.py class Solution (line 11) | class Solution: method reverseLeftWords (line 12) | def reverseLeftWords(self, s: str, n: int) -> str: FILE: sword_for_offer/codes/python/sfo_58ii_left_rotation_of_a_string_s4.py class Solution (line 11) | class Solution: method reverseLeftWords (line 12) | def reverseLeftWords(self, s: str, n: int) -> str: FILE: sword_for_offer/codes/python/sfo_58ii_left_rotation_of_a_string_s5.py class Solution (line 11) | class Solution: method reverseLeftWords (line 12) | def reverseLeftWords(self, s: str, n: int) -> str: FILE: sword_for_offer/codes/python/sfo_59i_sliding_window_maximum_s1.py class Solution (line 11) | class Solution: method maxSlidingWindow (line 12) | def maxSlidingWindow(self, nums: List[int], k: int) -> List[int]: FILE: sword_for_offer/codes/python/sfo_59i_sliding_window_maximum_s2.py class Solution (line 11) | class Solution: method maxSlidingWindow (line 12) | def maxSlidingWindow(self, nums: List[int], k: int) -> List[int]: FILE: sword_for_offer/codes/python/sfo_59ii_max_queue_s1.py class MaxQueue (line 13) | class MaxQueue: method __init__ (line 14) | def __init__(self): method max_value (line 18) | def max_value(self) -> int: method push_back (line 21) | def push_back(self, value: int) -> None: method pop_front (line 27) | def pop_front(self) -> int: FILE: sword_for_offer/codes/python/sfo_60_probabilities_for_rolling_n_dices_s1.py class Solution (line 11) | class Solution: method dicesProbability (line 12) | def dicesProbability(self, n: int) -> List[float]: FILE: sword_for_offer/codes/python/sfo_61_straight_in_poker_s1.py class Solution (line 11) | class Solution: method isStraight (line 12) | def isStraight(self, nums: List[int]) -> bool: FILE: sword_for_offer/codes/python/sfo_61_straight_in_poker_s2.py class Solution (line 11) | class Solution: method isStraight (line 12) | def isStraight(self, nums: List[int]) -> bool: FILE: sword_for_offer/codes/python/sfo_62_josephus_problem_s1.py class Solution (line 11) | class Solution: method lastRemaining (line 12) | def lastRemaining(self, n: int, m: int) -> int: FILE: sword_for_offer/codes/python/sfo_63_the_maximum_profit_of_stocks_s1.py class Solution (line 11) | class Solution: method maxProfit (line 12) | def maxProfit(self, prices: List[int]) -> int: FILE: sword_for_offer/codes/python/sfo_64_solve_1_2___n_s1.py class Solution (line 11) | class Solution: method __init__ (line 12) | def __init__(self): method sumNums (line 15) | def sumNums(self, n: int) -> int: FILE: sword_for_offer/codes/python/sfo_65_implement_addition_operation_without_arithmetic_operators_s1.py class Solution (line 11) | class Solution: method add (line 12) | def add(self, a: int, b: int) -> int: FILE: sword_for_offer/codes/python/sfo_66_a_product_array_puzzle_s1.py class Solution (line 11) | class Solution: method constructArr (line 12) | def constructArr(self, a: List[int]) -> List[int]: FILE: sword_for_offer/codes/python/sfo_67_convert_string_to_int_s1.py class Solution (line 11) | class Solution: method strToInt (line 12) | def strToInt(self, str: str) -> int: FILE: sword_for_offer/codes/python/sfo_67_convert_string_to_int_s2.py class Solution (line 11) | class Solution: method strToInt (line 12) | def strToInt(self, str: str) -> int: FILE: sword_for_offer/codes/python/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s1.py class Solution (line 11) | class Solution: method lowestCommonAncestor (line 12) | def lowestCommonAncestor( FILE: sword_for_offer/codes/python/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s2.py class Solution (line 11) | class Solution: method lowestCommonAncestor (line 12) | def lowestCommonAncestor( FILE: sword_for_offer/codes/python/sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s3.py class Solution (line 11) | class Solution: method lowestCommonAncestor (line 12) | def lowestCommonAncestor( FILE: sword_for_offer/codes/python/sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s1.py class Solution (line 11) | class Solution: method lowestCommonAncestor (line 12) | def lowestCommonAncestor( FILE: sword_for_offer/codes/python/sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s2.py class Solution (line 11) | class Solution: method lowestCommonAncestor (line 12) | def lowestCommonAncestor(