gitextract_y7isvm8k/ ├── .gitignore ├── LICENSE ├── README.md ├── leetbook_ioa/ │ └── docs/ │ ├── # 0 引言.md │ ├── # 0.1 刷题建议.md │ ├── # 0.2 题目分类.md │ ├── # 1.1 数据结构简介.md │ ├── # 1.2 算法复杂度.md │ ├── # 1.3 时间复杂度.md │ ├── # 1.4 空间复杂度.md │ ├── # 11.1 动态规划解题框架.md │ ├── # 7.1 排序算法简介.md │ ├── # 7.2 冒泡排序.md │ ├── # 7.3 快速排序.md │ ├── # 7.4 归并排序.md │ ├── LCR 120. 寻找文件副本.md │ ├── LCR 121. 寻找目标值 - 二维数组.md │ ├── LCR 122. 路径加密.md │ ├── LCR 123. 图书整理 I.md │ ├── LCR 124. 推理二叉树.md │ ├── LCR 125. 图书整理 II.md │ ├── LCR 126. 斐波那契数.md │ ├── LCR 127. 跳跃训练.md │ ├── LCR 128. 库存管理 I.md │ ├── LCR 129. 字母迷宫.md │ ├── LCR 130. 衣橱整理.md │ ├── LCR 131. 砍竹子 I.md │ ├── LCR 132. 砍竹子 II.md │ ├── LCR 133. 位 1 的个数.md │ ├── LCR 134. Pow(x, n).md │ ├── LCR 135. 报数.md │ ├── LCR 136. 删除链表节点.md │ ├── LCR 137. 模糊搜索验证.md │ ├── LCR 138. 有效数字.md │ ├── LCR 139. 训练计划 I.md │ ├── LCR 140. 训练计划 II.md │ ├── LCR 141. 训练计划 III.md │ ├── LCR 142. 训练计划 IV.md │ ├── LCR 143. 子结构判断.md │ ├── LCR 144. 翻转二叉树.md │ ├── LCR 145. 判断对称二叉树.md │ ├── LCR 146. 螺旋遍历二维数组.md │ ├── LCR 147. 最小栈.md │ ├── LCR 148. 验证图书取出顺序.md │ ├── LCR 149. 彩灯装饰记录 I.md │ ├── LCR 150. 彩灯装饰记录 II.md │ ├── LCR 151. 彩灯装饰记录 III.md │ ├── LCR 152. 验证二叉搜索树的后序遍历序列.md │ ├── LCR 153. 二叉树中和为目标值的路径.md │ ├── LCR 154. 随机链表的复制.md │ ├── LCR 155. 将二叉搜索树转化为排序的双向链表.md │ ├── LCR 156. 序列化与反序列化二叉树.md │ ├── LCR 157. 套餐内商品的排列顺序.md │ ├── LCR 158. 库存管理 II.md │ ├── LCR 159. 库存管理 III.md │ ├── LCR 160. 数据流中的中位数.md │ ├── LCR 161. 连续天数的最高销售额.md │ ├── LCR 162. 数字 1 的个数.md │ ├── LCR 163. 找到第 k 位数字.md │ ├── LCR 164. 破解闯关密码.md │ ├── LCR 165. 解密数字.md │ ├── LCR 166. 珠宝的最高价值.md │ ├── LCR 167. 招式拆解 I.md │ ├── LCR 168. 丑数.md │ ├── LCR 169. 招式拆解 II.md │ ├── LCR 170. 交易逆序对的总数.md │ ├── LCR 171. 训练计划 V.md │ ├── LCR 172. 统计目标成绩的出现次数.md │ ├── LCR 173. 点名.md │ ├── LCR 174. 寻找二叉搜索树中的目标节点.md │ ├── LCR 175. 计算二叉树的深度.md │ ├── LCR 176. 判断是否为平衡二叉树.md │ ├── LCR 177. 撞色搭配.md │ ├── LCR 178. 训练计划 VI.md │ ├── LCR 179. 查找总价格为目标值的两个商品.md │ ├── LCR 180. 文件组合.md │ ├── LCR 181. 字符串中的单词反转.md │ ├── LCR 182. 动态口令.md │ ├── LCR 183. 望远镜中最高的海拔.md │ ├── LCR 184. 设计自助结算系统.md │ ├── LCR 185. 统计结果概率.md │ ├── LCR 186. 文物朝代判断.md │ ├── LCR 187. 破冰游戏.md │ ├── LCR 188. 买卖芯片的最佳时机.md │ ├── LCR 189. 设计机械累加器.md │ ├── LCR 190. 加密运算.md │ ├── LCR 191. 按规则计算统计结果.md │ ├── LCR 192. 把字符串转换成整数 (atoi).md │ ├── LCR 193. 求二叉搜索树的最近公共祖先.md │ └── LCR 194. 寻找二叉树的最近公共祖先.md ├── selected_coding_interview/ │ ├── codes/ │ │ ├── cpp/ │ │ │ ├── include/ │ │ │ │ ├── ListNode.hpp │ │ │ │ ├── PrintUtil.hpp │ │ │ │ ├── TreeNode.hpp │ │ │ │ └── include.hpp │ │ │ ├── lc_101_symmetric_tree/ │ │ │ │ └── lc_101_symmetric_tree_s1.cpp │ │ │ ├── lc_102_binary_tree_level_order_traversal/ │ │ │ │ └── lc_102_binary_tree_level_order_traversal_s1.cpp │ │ │ ├── lc_103_binary_tree_zigzag_level_order_traversal/ │ │ │ │ ├── lc_103_binary_tree_zigzag_level_order_traversal_s1.cpp │ │ │ │ └── lc_103_binary_tree_zigzag_level_order_traversal_s2.cpp │ │ │ ├── lc_104_maximum_depth_of_binary_tree/ │ │ │ │ ├── lc_104_maximum_depth_of_binary_tree_s1.cpp │ │ │ │ └── lc_104_maximum_depth_of_binary_tree_s2.cpp │ │ │ ├── lc_105_construct_binary_tree_from_preorder_and_inorder_traversal/ │ │ │ │ └── lc_105_construct_binary_tree_from_preorder_and_inorder_traversal_s1.cpp │ │ │ ├── lc_10_regular_expression_matching/ │ │ │ │ ├── lc_10_regular_expression_matching_s1.cpp │ │ │ │ └── lc_10_regular_expression_matching_s2.cpp │ │ │ ├── lc_110_balanced_binary_tree/ │ │ │ │ ├── lc_110_balanced_binary_tree_s1.cpp │ │ │ │ └── lc_110_balanced_binary_tree_s2.cpp │ │ │ ├── lc_113_path_sum_ii/ │ │ │ │ └── lc_113_path_sum_ii_s1.cpp │ │ │ ├── lc_11_container_with_most_water/ │ │ │ │ └── lc_11_container_with_most_water_s1.cpp │ │ │ ├── lc_121_best_time_to_buy_and_sell_stock/ │ │ │ │ └── lc_121_best_time_to_buy_and_sell_stock_s1.cpp │ │ │ ├── lc_136_single_number/ │ │ │ │ └── lc_136_single_number_s1.cpp │ │ │ ├── lc_138_copy_list_with_random_pointer/ │ │ │ │ ├── lc_138_copy_list_with_random_pointer_s1.cpp │ │ │ │ ├── lc_138_copy_list_with_random_pointer_s2.cpp │ │ │ │ ├── lc_138_copy_list_with_random_pointer_s3.cpp │ │ │ │ ├── lc_138_copy_list_with_random_pointer_s4.cpp │ │ │ │ └── lc_138_copy_list_with_random_pointer_s5.cpp │ │ │ ├── lc_1480_running_sum_of_1d_array/ │ │ │ │ └── lc_1480_running_sum_of_1d_array_s1.cpp │ │ │ ├── lc_154_find_minimum_in_rotated_sorted_array_ii/ │ │ │ │ ├── lc_154_find_minimum_in_rotated_sorted_array_ii_s1.cpp │ │ │ │ └── lc_154_find_minimum_in_rotated_sorted_array_ii_s2.cpp │ │ │ ├── lc_160_intersection_of_two_linked_lists/ │ │ │ │ └── lc_160_intersection_of_two_linked_lists_s1.cpp │ │ │ ├── lc_167_two_sum_ii_input_array_is_sorted/ │ │ │ │ └── lc_167_two_sum_ii_input_array_is_sorted_s1.cpp │ │ │ ├── lc_169_majority_element/ │ │ │ │ ├── lc_169_majority_element_s1.cpp │ │ │ │ └── lc_169_majority_element_s2.cpp │ │ │ ├── lc_179_largest_number/ │ │ │ │ ├── lc_179_largest_number_s1.cpp │ │ │ │ └── lc_179_largest_number_s2.cpp │ │ │ ├── lc_1823_find_the_winner_of_the_circular_game/ │ │ │ │ └── lc_1823_find_the_winner_of_the_circular_game_s1.cpp │ │ │ ├── lc_191_number_of_1_bits/ │ │ │ │ ├── lc_191_number_of_1_bits_s1.cpp │ │ │ │ └── lc_191_number_of_1_bits_s2.cpp │ │ │ ├── lc_205_isomorphic_strings/ │ │ │ │ └── lc_205_isomorphic_strings_s1.cpp │ │ │ ├── lc_206_reverse_linked_list/ │ │ │ │ ├── lc_206_reverse_linked_list_s1.cpp │ │ │ │ └── lc_206_reverse_linked_list_s2.cpp │ │ │ ├── lc_215_kth_largest_element_in_an_array/ │ │ │ │ ├── lc_215_kth_largest_element_in_an_array_s1.cpp │ │ │ │ └── lc_215_kth_largest_element_in_an_array_s2.cpp │ │ │ ├── lc_21_merge_two_sorted_lists/ │ │ │ │ └── lc_21_merge_two_sorted_lists_s1.cpp │ │ │ ├── lc_226_invert_binary_tree/ │ │ │ │ ├── lc_226_invert_binary_tree_s1.cpp │ │ │ │ └── lc_226_invert_binary_tree_s2.cpp │ │ │ ├── lc_230_kth_smallest_element_in_a_bst/ │ │ │ │ └── lc_230_kth_smallest_element_in_a_bst_s1.cpp │ │ │ ├── lc_232_implement_queue_using_stacks/ │ │ │ │ └── lc_232_implement_queue_using_stacks_s1.cpp │ │ │ ├── lc_233_number_of_digit_one/ │ │ │ │ ├── lc_233_number_of_digit_one_s1.cpp │ │ │ │ ├── lc_233_number_of_digit_one_s2.cpp │ │ │ │ └── lc_233_number_of_digit_one_s3.cpp │ │ │ ├── lc_235_lowest_common_ancestor_of_a_binary_search_tree/ │ │ │ │ ├── lc_235_lowest_common_ancestor_of_a_binary_search_tree_s1.cpp │ │ │ │ ├── lc_235_lowest_common_ancestor_of_a_binary_search_tree_s2.cpp │ │ │ │ └── lc_235_lowest_common_ancestor_of_a_binary_search_tree_s3.cpp │ │ │ ├── lc_236_lowest_common_ancestor_of_a_binary_tree/ │ │ │ │ ├── lc_236_lowest_common_ancestor_of_a_binary_tree_s1.cpp │ │ │ │ └── lc_236_lowest_common_ancestor_of_a_binary_tree_s2.cpp │ │ │ ├── lc_237_delete_node_in_a_linked_list/ │ │ │ │ ├── lc_237_delete_node_in_a_linked_list_s1.cpp │ │ │ │ └── lc_237_delete_node_in_a_linked_list_s2.cpp │ │ │ ├── lc_238_product_of_array_except_self/ │ │ │ │ └── lc_238_product_of_array_except_self_s1.cpp │ │ │ ├── lc_239_sliding_window_maximum/ │ │ │ │ ├── lc_239_sliding_window_maximum_s1.cpp │ │ │ │ └── lc_239_sliding_window_maximum_s2.cpp │ │ │ ├── lc_240_search_a_2d_matrix_ii/ │ │ │ │ └── lc_240_search_a_2d_matrix_ii_s1.cpp │ │ │ ├── lc_242_valid_anagram/ │ │ │ │ ├── lc_242_valid_anagram_s1.cpp │ │ │ │ └── lc_242_valid_anagram_s2.cpp │ │ │ ├── lc_264_ugly_number_ii/ │ │ │ │ └── lc_264_ugly_number_ii_s1.cpp │ │ │ ├── lc_266_palindrome_permutation/ │ │ │ │ ├── lc_266_palindrome_permutation_s1.cpp │ │ │ │ └── lc_266_palindrome_permutation_s2.cpp │ │ │ ├── lc_278_first_bad_version/ │ │ │ │ └── lc_278_first_bad_version_s1.cpp │ │ │ ├── lc_287_find_the_duplicate_number/ │ │ │ │ ├── lc_287_find_the_duplicate_number_s1.cpp │ │ │ │ ├── lc_287_find_the_duplicate_number_s2.cpp │ │ │ │ └── lc_287_find_the_duplicate_number_s3.cpp │ │ │ ├── lc_295_find_median_from_data_stream/ │ │ │ │ └── lc_295_find_median_from_data_stream_s1.cpp │ │ │ ├── lc_371_sum_of_two_integers/ │ │ │ │ └── lc_371_sum_of_two_integers_s1.cpp │ │ │ ├── lc_387_first_unique_character_in_a_string/ │ │ │ │ └── lc_387_first_unique_character_in_a_string_s1.cpp │ │ │ ├── lc_392_is_subsequence/ │ │ │ │ └── lc_392_is_subsequence_s1.cpp │ │ │ ├── lc_3_longest_substring_without_repeating_characters/ │ │ │ │ ├── lc_3_longest_substring_without_repeating_characters_s1.cpp │ │ │ │ └── lc_3_longest_substring_without_repeating_characters_s2.cpp │ │ │ ├── lc_400_nth_digit/ │ │ │ │ ├── lc_400_nth_digit_s1.cpp │ │ │ │ ├── lc_400_nth_digit_s2.cpp │ │ │ │ ├── lc_400_nth_digit_s3.cpp │ │ │ │ └── lc_400_nth_digit_s4.cpp │ │ │ ├── lc_409_longest_palindrome/ │ │ │ │ └── lc_409_longest_palindrome_s1.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 │ │ │ │ └── lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list_s2.cpp │ │ │ ├── lc_46_permutations/ │ │ │ │ └── lc_46_permutations_s1.cpp │ │ │ ├── lc_47_permutations_ii/ │ │ │ │ └── lc_47_permutations_ii_s1.cpp │ │ │ ├── lc_48_rotate_image/ │ │ │ │ ├── lc_48_rotate_image_s1.cpp │ │ │ │ ├── lc_48_rotate_image_s2.cpp │ │ │ │ └── lc_48_rotate_image_s3.cpp │ │ │ ├── lc_509_fibonacci_number/ │ │ │ │ └── lc_509_fibonacci_number_s1.cpp │ │ │ ├── lc_53_maximum_subarray/ │ │ │ │ └── lc_53_maximum_subarray_s1.cpp │ │ │ ├── lc_54_spiral_matrix/ │ │ │ │ └── lc_54_spiral_matrix_s1.cpp │ │ │ ├── lc_65_valid_number/ │ │ │ │ └── lc_65_valid_number_s1.cpp │ │ │ ├── lc_6_zigzag_conversion/ │ │ │ │ └── lc_6_zigzag_conversion_s1.cpp │ │ │ ├── lc_704_binary_search/ │ │ │ │ └── lc_704_binary_search_s1.cpp │ │ │ ├── lc_70_climbing_stairs/ │ │ │ │ └── lc_70_climbing_stairs_s1.cpp │ │ │ ├── lc_724_find_pivot_index/ │ │ │ │ └── lc_724_find_pivot_index_s1.cpp │ │ │ ├── lc_796_rotate_string/ │ │ │ │ └── lc_796_rotate_string_s1.cpp │ │ │ ├── lc_79_word_search/ │ │ │ │ └── lc_79_word_search_s1.cpp │ │ │ ├── lc_86_partition_list/ │ │ │ │ ├── lc_86_partition_list_s1.cpp │ │ │ │ └── lc_86_partition_list_s2.cpp │ │ │ ├── lc_876_middle_of_the_linked_list/ │ │ │ │ └── lc_876_middle_of_the_linked_list_s1.cpp │ │ │ ├── lc_8_string_to_integer_atoi/ │ │ │ │ └── lc_8_string_to_integer_atoi_s1.cpp │ │ │ └── lc_946_validate_stack_sequences/ │ │ │ └── lc_946_validate_stack_sequences_s1.cpp │ │ ├── java/ │ │ │ ├── include/ │ │ │ │ ├── ListNode.java │ │ │ │ ├── PrintUtil.java │ │ │ │ └── TreeNode.java │ │ │ ├── lc_101_symmetric_tree/ │ │ │ │ └── lc_101_symmetric_tree.java │ │ │ ├── lc_102_binary_tree_level_order_traversal/ │ │ │ │ └── lc_102_binary_tree_level_order_traversal.java │ │ │ ├── lc_103_binary_tree_zigzag_level_order_traversal/ │ │ │ │ ├── lc_103_binary_tree_zigzag_level_order_traversal_s1.java │ │ │ │ ├── lc_103_binary_tree_zigzag_level_order_traversal_s2.java │ │ │ │ └── lc_103_binary_tree_zigzag_level_order_traversal_s3.java │ │ │ ├── lc_104_maximum_depth_of_binary_tree/ │ │ │ │ ├── lc_104_maximum_depth_of_binary_tree_s1.java │ │ │ │ └── lc_104_maximum_depth_of_binary_tree_s2.java │ │ │ ├── lc_105_construct_binary_tree_from_preorder_and_inorder_traversal/ │ │ │ │ └── lc_105_construct_binary_tree_from_preorder_and_inorder_traversal.java │ │ │ ├── lc_10_regular_expression_matching/ │ │ │ │ ├── lc_10_regular_expression_matching_s1.java │ │ │ │ └── lc_10_regular_expression_matching_s2.java │ │ │ ├── lc_110_balanced_binary_tree/ │ │ │ │ ├── lc_110_balanced_binary_tree_s1.java │ │ │ │ └── lc_110_balanced_binary_tree_s2.java │ │ │ ├── lc_113_path_sum/ │ │ │ │ └── lc_113_path_sum.java │ │ │ ├── lc_11_container_with_most_water/ │ │ │ │ └── lc_11_container_with_most_water.java │ │ │ ├── lc_121_best_time_to_buy_and_sell_stock/ │ │ │ │ └── lc_121_best_time_to_buy_and_sell_stock.java │ │ │ ├── lc_122_best_time_to_buy_and_sell_stock/ │ │ │ │ └── lc_122_best_time_to_buy_and_sell_stock.java │ │ │ ├── lc_135_candy/ │ │ │ │ └── lc_135_candy.java │ │ │ ├── lc_136_single_number/ │ │ │ │ └── lc_136_single_number.java │ │ │ ├── lc_137_single_number/ │ │ │ │ ├── lc_137_single_number_s1.java │ │ │ │ └── lc_137_single_number_s2.java │ │ │ ├── lc_138_copy_list_with_random_pointer/ │ │ │ │ ├── lc_138_copy_list_with_random_pointer_s1.java │ │ │ │ ├── lc_138_copy_list_with_random_pointer_s2.java │ │ │ │ ├── lc_138_copy_list_with_random_pointer_s3.java │ │ │ │ ├── lc_138_copy_list_with_random_pointer_s4.java │ │ │ │ └── lc_138_copy_list_with_random_pointer_s5.java │ │ │ ├── lc_142_linked_list_cycle/ │ │ │ │ └── lc_142_linked_list_cycle.java │ │ │ ├── lc_1480_running_sum_of_1d_array/ │ │ │ │ └── lc_1480_running_sum_of_1d_array.java │ │ │ ├── lc_151_reverse_words_in_a_string/ │ │ │ │ ├── lc_151_reverse_words_in_a_string_s1.java │ │ │ │ └── lc_151_reverse_words_in_a_string_s2.java │ │ │ ├── lc_154_find_minimum_in_rotated_sorted_array/ │ │ │ │ ├── lc_154_find_minimum_in_rotated_sorted_array_s1.java │ │ │ │ └── lc_154_find_minimum_in_rotated_sorted_array_s2.java │ │ │ ├── lc_155_min_stack/ │ │ │ │ └── lc_155_min_stack.java │ │ │ ├── lc_15_three_sum/ │ │ │ │ └── lc_15_three_sum.java │ │ │ ├── lc_160_intersection_of_two_linked_lists/ │ │ │ │ └── lc_160_intersection_of_two_linked_lists.java │ │ │ ├── lc_167_two_sum/ │ │ │ │ └── lc_167_two_sum.java │ │ │ ├── lc_169_majority_element/ │ │ │ │ ├── lc_169_majority_element_s1.java │ │ │ │ └── lc_169_majority_element_s2.java │ │ │ ├── lc_179_largest_number/ │ │ │ │ ├── lc_179_largest_number_s1.java │ │ │ │ └── lc_179_largest_number_s2.java │ │ │ ├── lc_1823_find_the_winner_of_the_circular_game/ │ │ │ │ └── lc_1823_find_the_winner_of_the_circular_game.java │ │ │ ├── lc_191_number_of_1_bits/ │ │ │ │ ├── lc_191_number_of_1_bits_s1.java │ │ │ │ └── lc_191_number_of_1_bits_s2.java │ │ │ ├── lc_198_house_robber/ │ │ │ │ └── lc_198_house_robber.java │ │ │ ├── lc_205_isomorphic_strings/ │ │ │ │ └── lc_205_isomorphic_strings.java │ │ │ ├── lc_206_reverse_linked_list/ │ │ │ │ ├── lc_206_reverse_linked_list_s1.java │ │ │ │ └── lc_206_reverse_linked_list_s2.java │ │ │ ├── lc_207_course_schedule/ │ │ │ │ ├── lc_207_course_schedule_s1.java │ │ │ │ └── lc_207_course_schedule_s2.java │ │ │ ├── lc_20_valid_parentheses/ │ │ │ │ └── lc_20_valid_parentheses.java │ │ │ ├── lc_213_house_robber/ │ │ │ │ └── lc_213_house_robber.java │ │ │ ├── lc_215_kth_largest_element_in_an_array/ │ │ │ │ ├── lc_215_kth_largest_element_in_an_array_s1.java │ │ │ │ └── lc_215_kth_largest_element_in_an_array_s2.java │ │ │ ├── lc_21_merge_two_sorted_lists/ │ │ │ │ └── lc_21_merge_two_sorted_lists.java │ │ │ ├── lc_226_invert_binary_tree/ │ │ │ │ ├── lc_226_invert_binary_tree_s1.java │ │ │ │ └── lc_226_invert_binary_tree_s2.java │ │ │ ├── lc_230_kth_smallest_element_in_a_bst/ │ │ │ │ └── lc_230_kth_smallest_element_in_a_bst.java │ │ │ ├── lc_231_power_of_two/ │ │ │ │ └── lc_231_power_of_two.java │ │ │ ├── lc_232_implement_queue_using_stacks/ │ │ │ │ └── lc_232_implement_queue_using_stacks.java │ │ │ ├── lc_233_number_of_digit_one/ │ │ │ │ ├── lc_233_number_of_digit_one_s1.java │ │ │ │ ├── lc_233_number_of_digit_one_s2.java │ │ │ │ └── lc_233_number_of_digit_one_s3.java │ │ │ ├── lc_235_lowest_common_ancestor_of_bst/ │ │ │ │ ├── lc_235_lowest_common_ancestor_of_bst_s1.java │ │ │ │ ├── lc_235_lowest_common_ancestor_of_bst_s2.java │ │ │ │ └── lc_235_lowest_common_ancestor_of_bst_s3.java │ │ │ ├── lc_236_lowest_common_ancestor_of_binary_tree/ │ │ │ │ ├── lc_236_lowest_common_ancestor_of_binary_tree_s1.java │ │ │ │ └── lc_236_lowest_common_ancestor_of_binary_tree_s2.java │ │ │ ├── lc_237_delete_node_in_linked_list/ │ │ │ │ ├── lc_237_delete_node_in_linked_list_s1.java │ │ │ │ └── lc_237_delete_node_in_linked_list_s2.java │ │ │ ├── lc_238_product_of_array_except_self/ │ │ │ │ └── lc_238_product_of_array_except_self.java │ │ │ ├── lc_239_sliding_window_maximum/ │ │ │ │ ├── lc_239_sliding_window_maximum_s1.java │ │ │ │ └── lc_239_sliding_window_maximum_s2.java │ │ │ ├── lc_240_search_a_2d_matrix/ │ │ │ │ └── lc_240_search_a_2d_matrix.java │ │ │ ├── lc_242_valid_anagram/ │ │ │ │ ├── lc_242_valid_anagram_s1.java │ │ │ │ └── lc_242_valid_anagram_s2.java │ │ │ ├── lc_264_ugly_number/ │ │ │ │ └── lc_264_ugly_number.java │ │ │ ├── lc_266_palindrome_permutation/ │ │ │ │ ├── lc_266_palindrome_permutation_s1.java │ │ │ │ └── lc_266_palindrome_permutation_s2.java │ │ │ ├── lc_278_first_bad_version/ │ │ │ │ └── lc_278_first_bad_version.java │ │ │ ├── lc_287_find_the_duplicate_number/ │ │ │ │ ├── lc_287_find_the_duplicate_number_s1.java │ │ │ │ ├── lc_287_find_the_duplicate_number_s2.java │ │ │ │ └── lc_287_find_the_duplicate_number_s3.java │ │ │ ├── lc_295_find_median_from_data_stream/ │ │ │ │ └── lc_295_find_median_from_data_stream.java │ │ │ ├── lc_297_serialize_and_deserialize_binary_tree/ │ │ │ │ └── lc_297_serialize_and_deserialize_binary_tree.java │ │ │ ├── lc_300_longest_increasing_subsequence/ │ │ │ │ ├── lc_300_longest_increasing_subsequence_s1.java │ │ │ │ └── lc_300_longest_increasing_subsequence_s2.java │ │ │ ├── lc_343_integer_break/ │ │ │ │ └── lc_343_integer_break.java │ │ │ ├── lc_371_sum_of_two_integers/ │ │ │ │ └── lc_371_sum_of_two_integers.java │ │ │ ├── lc_387_first_unique_character_in_a_string/ │ │ │ │ └── lc_387_first_unique_character_in_a_string.java │ │ │ ├── lc_392_is_subsequence/ │ │ │ │ └── lc_392_is_subsequence.java │ │ │ ├── lc_394_decode_string/ │ │ │ │ ├── lc_394_decode_string_s1.java │ │ │ │ └── lc_394_decode_string_s2.java │ │ │ ├── lc_3_longest_substring_without_repeating_characters/ │ │ │ │ ├── lc_3_longest_substring_without_repeating_characters_s1.java │ │ │ │ └── lc_3_longest_substring_without_repeating_characters_s2.java │ │ │ ├── lc_400_nth_digit/ │ │ │ │ ├── lc_400_nth_digit_s1.java │ │ │ │ ├── lc_400_nth_digit_s2.java │ │ │ │ ├── lc_400_nth_digit_s3.java │ │ │ │ └── lc_400_nth_digit_s4.java │ │ │ ├── lc_409_longest_palindrome/ │ │ │ │ └── lc_409_longest_palindrome.java │ │ │ ├── lc_415_add_strings/ │ │ │ │ └── lc_415_add_strings.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 │ │ │ │ └── lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list_s2.java │ │ │ ├── lc_46_permutations/ │ │ │ │ └── lc_46_permutations.java │ │ │ ├── lc_47_permutations/ │ │ │ │ └── lc_47_permutations.java │ │ │ ├── lc_48_rotate_image/ │ │ │ │ ├── lc_48_rotate_image_s1.java │ │ │ │ ├── lc_48_rotate_image_s2.java │ │ │ │ └── lc_48_rotate_image_s3.java │ │ │ ├── lc_509_fibonacci_number/ │ │ │ │ └── lc_509_fibonacci_number.java │ │ │ ├── lc_50_powx_n/ │ │ │ │ └── lc_50_powx_n.java │ │ │ ├── lc_53_maximum_subarray/ │ │ │ │ └── lc_53_maximum_subarray.java │ │ │ ├── lc_54_spiral_matrix/ │ │ │ │ └── lc_54_spiral_matrix.java │ │ │ ├── lc_59_spiral_matrix/ │ │ │ │ └── lc_59_spiral_matrix.java │ │ │ ├── lc_64_minimum_path_sum/ │ │ │ │ └── lc_64_minimum_path_sum.java │ │ │ ├── lc_65_valid_number/ │ │ │ │ └── lc_65_valid_number.java │ │ │ ├── lc_6_zigzag_conversion/ │ │ │ │ └── lc_6_zigzag_conversion.java │ │ │ ├── lc_704_binary_search/ │ │ │ │ └── lc_704_binary_search.java │ │ │ ├── lc_70_climbing_stairs/ │ │ │ │ └── lc_70_climbing_stairs.java │ │ │ ├── lc_724_find_pivot_index/ │ │ │ │ └── lc_724_find_pivot_index.java │ │ │ ├── lc_796_rotate_string/ │ │ │ │ └── lc_796_rotate_string.java │ │ │ ├── lc_79_word_search/ │ │ │ │ └── lc_79_word_search.java │ │ │ ├── lc_86_partition_list/ │ │ │ │ ├── lc_86_partition_list_s1.java │ │ │ │ └── lc_86_partition_list_s2.java │ │ │ ├── lc_876_middle_of_the_linked_list/ │ │ │ │ └── lc_876_middle_of_the_linked_list.java │ │ │ ├── lc_89_gray_code/ │ │ │ │ └── lc_89_gray_code.java │ │ │ ├── lc_8_string_to_integer_atoi/ │ │ │ │ ├── lc_8_string_to_integer_atoi_s1.java │ │ │ │ └── lc_8_string_to_integer_atoi_s2.java │ │ │ └── lc_946_validate_stack_sequences/ │ │ │ └── lc_946_validate_stack_sequences.java │ │ └── python/ │ │ ├── fix_tests.py │ │ ├── include/ │ │ │ ├── __init__.py │ │ │ ├── binary_tree.py │ │ │ ├── linked_list.py │ │ │ └── print_util.py │ │ ├── lc_101_symmetric_tree.py │ │ ├── lc_102_binary_tree_level_order_traversal.py │ │ ├── lc_103_binary_tree_zigzag_level_order_traversal_s1.py │ │ ├── lc_103_binary_tree_zigzag_level_order_traversal_s2.py │ │ ├── lc_103_binary_tree_zigzag_level_order_traversal_s3.py │ │ ├── lc_104_maximum_depth_of_binary_tree_s1.py │ │ ├── lc_104_maximum_depth_of_binary_tree_s2.py │ │ ├── lc_105_construct_binary_tree_from_preorder_and_inorder_traversal.py │ │ ├── lc_10_regular_expression_matching_s1.py │ │ ├── lc_10_regular_expression_matching_s2.py │ │ ├── lc_110_balanced_binary_tree_s1.py │ │ ├── lc_110_balanced_binary_tree_s2.py │ │ ├── lc_113_path_sum_ii.py │ │ ├── lc_11_container_with_most_water.py │ │ ├── lc_121_best_time_to_buy_and_sell_stock.py │ │ ├── lc_122_best_time_to_buy_and_sell_stock_ii.py │ │ ├── lc_135_candy.py │ │ ├── lc_136_single_number.py │ │ ├── lc_137_single_number_ii_s1.py │ │ ├── lc_137_single_number_ii_s2.py │ │ ├── lc_138_copy_list_with_random_pointer_s1.py │ │ ├── lc_138_copy_list_with_random_pointer_s2.py │ │ ├── lc_138_copy_list_with_random_pointer_s3.py │ │ ├── lc_138_copy_list_with_random_pointer_s4.py │ │ ├── lc_138_copy_list_with_random_pointer_s5.py │ │ ├── lc_142_linked_list_cycle_ii.py │ │ ├── lc_1480_running_sum_of_1d_array.py │ │ ├── lc_151_reverse_words_in_a_string_s1.py │ │ ├── lc_151_reverse_words_in_a_string_s2.py │ │ ├── lc_151_reverse_words_in_a_string_s3.py │ │ ├── lc_154_find_minimum_in_rotated_sorted_array_ii_s1.py │ │ ├── lc_154_find_minimum_in_rotated_sorted_array_ii_s2.py │ │ ├── lc_155_min_stack.py │ │ ├── lc_15_three_sum.py │ │ ├── lc_160_intersection_of_two_linked_lists.py │ │ ├── lc_167_two_sum_ii.py │ │ ├── lc_169_majority_element_s1.py │ │ ├── lc_169_majority_element_s2.py │ │ ├── lc_179_largest_number_s1.py │ │ ├── lc_179_largest_number_s2.py │ │ ├── lc_1823_find_the_winner_of_the_circular_game.py │ │ ├── lc_191_number_of_1_bits_s1.py │ │ ├── lc_191_number_of_1_bits_s2.py │ │ ├── lc_198_house_robber.py │ │ ├── lc_205_isomorphic_strings.py │ │ ├── lc_206_reverse_linked_list_s1.py │ │ ├── lc_206_reverse_linked_list_s2.py │ │ ├── lc_206_reverse_linked_list_s3.py │ │ ├── lc_207_course_schedule_s1.py │ │ ├── lc_207_course_schedule_s2.py │ │ ├── lc_20_valid_parentheses.py │ │ ├── lc_213_house_robber_ii.py │ │ ├── lc_215_kth_largest_element_in_an_array_s1.py │ │ ├── lc_215_kth_largest_element_in_an_array_s2.py │ │ ├── lc_21_merge_two_sorted_lists.py │ │ ├── lc_226_invert_binary_tree_s1.py │ │ ├── lc_226_invert_binary_tree_s2.py │ │ ├── lc_226_invert_binary_tree_s3.py │ │ ├── lc_230_kth_smallest_element_in_a_bst.py │ │ ├── lc_231_power_of_two.py │ │ ├── lc_232_implement_queue_using_stacks.py │ │ ├── lc_233_number_of_digit_one_s1.py │ │ ├── lc_233_number_of_digit_one_s2.py │ │ ├── lc_233_number_of_digit_one_s3.py │ │ ├── lc_235_lowest_common_ancestor_of_a_binary_search_tree_s1.py │ │ ├── lc_235_lowest_common_ancestor_of_a_binary_search_tree_s2.py │ │ ├── lc_235_lowest_common_ancestor_of_a_binary_search_tree_s3.py │ │ ├── lc_236_lowest_common_ancestor_of_a_binary_tree_s1.py │ │ ├── lc_236_lowest_common_ancestor_of_a_binary_tree_s2.py │ │ ├── lc_237_delete_node_in_a_linked_list_s1.py │ │ ├── lc_237_delete_node_in_a_linked_list_s2.py │ │ ├── lc_238_product_of_array_except_self.py │ │ ├── lc_239_sliding_window_maximum_s1.py │ │ ├── lc_239_sliding_window_maximum_s2.py │ │ ├── lc_240_search_a_2d_matrix_ii.py │ │ ├── lc_242_valid_anagram_s1.py │ │ ├── lc_242_valid_anagram_s2.py │ │ ├── lc_264_ugly_number_ii.py │ │ ├── lc_266_palindrome_permutation_s1.py │ │ ├── lc_266_palindrome_permutation_s2.py │ │ ├── lc_278_first_bad_version.py │ │ ├── lc_287_find_the_duplicate_number_s1.py │ │ ├── lc_287_find_the_duplicate_number_s2.py │ │ ├── lc_287_find_the_duplicate_number_s3.py │ │ ├── lc_295_find_median_from_data_stream_s1.py │ │ ├── lc_295_find_median_from_data_stream_s2.py │ │ ├── lc_297_serialize_and_deserialize_binary_tree.py │ │ ├── lc_300_longest_increasing_subsequence_s1.py │ │ ├── lc_300_longest_increasing_subsequence_s2.py │ │ ├── lc_343_integer_break.py │ │ ├── lc_371_sum_of_two_integers.py │ │ ├── lc_387_first_unique_character_in_a_string.py │ │ ├── lc_392_is_subsequence.py │ │ ├── lc_394_decode_string_s1.py │ │ ├── lc_394_decode_string_s2.py │ │ ├── lc_39_combination_sum_s1.py │ │ ├── lc_39_combination_sum_s2.py │ │ ├── lc_3_longest_substring_without_repeating_characters_s1.py │ │ ├── lc_3_longest_substring_without_repeating_characters_s2.py │ │ ├── lc_400_nth_digit_s1.py │ │ ├── lc_400_nth_digit_s2.py │ │ ├── lc_400_nth_digit_s3.py │ │ ├── lc_400_nth_digit_s4.py │ │ ├── lc_409_longest_palindrome.py │ │ ├── lc_40_combination_sum_ii_s1.py │ │ ├── lc_40_combination_sum_ii_s2.py │ │ ├── lc_415_add_strings.py │ │ ├── lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list_s1.py │ │ ├── lc_426_convert_binary_search_tree_to_sorted_doubly_linked_list_s2.py │ │ ├── lc_46_permutations.py │ │ ├── lc_47_permutations_ii.py │ │ ├── lc_48_rotate_image_s1.py │ │ ├── lc_48_rotate_image_s2.py │ │ ├── lc_48_rotate_image_s3.py │ │ ├── lc_509_fibonacci_number.py │ │ ├── lc_50_powx_n.py │ │ ├── lc_53_maximum_subarray.py │ │ ├── lc_54_spiral_matrix.py │ │ ├── lc_59_spiral_matrix_ii.py │ │ ├── lc_64_minimum_path_sum.py │ │ ├── lc_65_valid_number.py │ │ ├── lc_6_zigzag_conversion.py │ │ ├── lc_704_binary_search.py │ │ ├── lc_70_climbing_stairs.py │ │ ├── lc_724_find_pivot_index.py │ │ ├── lc_768_max_chunks_to_make_sorted_ii.py │ │ ├── lc_796_rotate_string.py │ │ ├── lc_79_word_search.py │ │ ├── lc_86_partition_list_s1.py │ │ ├── lc_86_partition_list_s2.py │ │ ├── lc_876_middle_of_the_linked_list.py │ │ ├── lc_89_gray_code.py │ │ ├── lc_8_string_to_integer_atoi_s1.py │ │ ├── lc_8_string_to_integer_atoi_s2.py │ │ └── lc_946_validate_stack_sequences.py │ └── docs/ │ ├── 10. 正则表达式匹配.md │ ├── 101. 对称二叉树.md │ ├── 102. 二叉树的层序遍历.md │ ├── 103. 二叉树的锯齿形层序遍历.md │ ├── 104. 二叉树的最大深度.md │ ├── 105. 从前序与中序遍历序列构造二叉树.md │ ├── 11. 盛最多水的容器.md │ ├── 110. 平衡二叉树.md │ ├── 113. 路径总和 II.md │ ├── 121. 买卖股票的最佳时机.md │ ├── 122. 买卖股票的最佳时机 II .md │ ├── 135. 分发糖果.md │ ├── 136. 只出现一次的数字.md │ ├── 137. 只出现一次的数字 II.md │ ├── 138. 复制带随机指针的链表.md │ ├── 142. 环形链表 II.md │ ├── 1480. 一维数组的动态和.md │ ├── 15. 三数之和.md │ ├── 151. 反转字符串中的单词.md │ ├── 154. 寻找旋转排序数组中的最小值 II.md │ ├── 155. 最小栈 .md │ ├── 160. 相交链表.md │ ├── 167. 两数之和 II.md │ ├── 169. 多数元素.md │ ├── 179. 最大数.md │ ├── 1823. 找出游戏的获胜者.md │ ├── 191. 位1的个数.md │ ├── 198. 打家劫舍.md │ ├── 20. 有效的括号.md │ ├── 205. 同构字符串.md │ ├── 206. 反转链表.md │ ├── 207. 课程表.md │ ├── 21. 合并两个有序链表.md │ ├── 213. 打家劫舍 II.md │ ├── 215. 数组中的第K个最大元素.md │ ├── 226. 翻转二叉树.md │ ├── 230. 二叉搜索树中第K小的元素.md │ ├── 231. 2 的幂.md │ ├── 232. 用栈实现队列.md │ ├── 233. 数字 1 的个数.md │ ├── 235. 二叉搜索树的最近公共祖先.md │ ├── 236. 二叉树的最近公共祖先.md │ ├── 237. 删除链表中的节点.md │ ├── 238. 除自身以外数组的乘积.md │ ├── 239. 滑动窗口最大值.md │ ├── 240. 搜索二维矩阵 II.md │ ├── 242. 有效的字母异位词.md │ ├── 264. 丑数 II .md │ ├── 266. 回文排列.md │ ├── 278. 第一个错误的版本.md │ ├── 287. 寻找重复数.md │ ├── 295. 数据流的中位数.md │ ├── 297. 二叉树的序列化与反序列化.md │ ├── 3. 无重复字符的最长子串.md │ ├── 300. 最长递增子序列.md │ ├── 343. 整数拆分.md │ ├── 371. 两整数之和.md │ ├── 387. 字符串中的第一个唯一字符.md │ ├── 39. 组合总和.md │ ├── 392. 判断子序列.md │ ├── 394. 字符串解码.md │ ├── 40. 组合总和 II.md │ ├── 400. 第 N 位数字.md │ ├── 409. 最长回文串.md │ ├── 415. 字符串相加.md │ ├── 426. 将二叉搜索树转化为排序的双向链表.md │ ├── 46. 全排列.md │ ├── 47. 全排列 II.md │ ├── 48. 旋转图像.md │ ├── 50. Pow(x, n).md │ ├── 509. 斐波那契数.md │ ├── 53. 最大子数组和.md │ ├── 54. 螺旋矩阵.md │ ├── 59. 螺旋矩阵 II.md │ ├── 6. N 字形变换.md │ ├── 64. 最小路径和.md │ ├── 65. 有效数字.md │ ├── 70. 爬楼梯.md │ ├── 704. 二分查找.md │ ├── 724. 寻找数组的中心下标.md │ ├── 768. 最多能完成排序的块 II.md │ ├── 79. 单词搜索.md │ ├── 796. 旋转字符串.md │ ├── 8. 字符串转换整数 (atoi).md │ ├── 86. 分隔链表.md │ ├── 876. 链表的中间结点.md │ ├── 89. 格雷编码.md │ └── 946. 验证栈序列.md └── sword_for_offer/ ├── codes/ │ ├── cpp/ │ │ ├── include/ │ │ │ ├── ListNode.hpp │ │ │ ├── PrintUtil.hpp │ │ │ ├── TreeNode.hpp │ │ │ └── include.hpp │ │ ├── sfo_03_find_duplicate_numbers_in_an_array_s1/ │ │ │ └── sfo_03_find_duplicate_numbers_in_an_array_s1.cpp │ │ ├── sfo_03_find_duplicate_numbers_in_an_array_s2/ │ │ │ └── sfo_03_find_duplicate_numbers_in_an_array_s2.cpp │ │ ├── sfo_04_find_a_number_in_2d_matrix_s1/ │ │ │ └── sfo_04_find_a_number_in_2d_matrix_s1.cpp │ │ ├── sfo_05_replace_spaces_s1/ │ │ │ └── sfo_05_replace_spaces_s1.cpp │ │ ├── sfo_06_print_a_linked_list_in_reverse_order_s1/ │ │ │ └── sfo_06_print_a_linked_list_in_reverse_order_s1.cpp │ │ ├── sfo_06_print_a_linked_list_in_reverse_order_s2/ │ │ │ └── sfo_06_print_a_linked_list_in_reverse_order_s2.cpp │ │ ├── sfo_07_reconstruct_binary_tree_s1/ │ │ │ └── sfo_07_reconstruct_binary_tree_s1.cpp │ │ ├── sfo_09_implement_a_queue_using_two_stacks_s1/ │ │ │ └── sfo_09_implement_a_queue_using_two_stacks_s1.cpp │ │ ├── sfo_10i_fibonacci_numbers_s1/ │ │ │ └── sfo_10i_fibonacci_numbers_s1.cpp │ │ ├── sfo_10ii_frog_jump_s1/ │ │ │ └── sfo_10ii_frog_jump_s1.cpp │ │ ├── sfo_11_find_minimum_in_rotated_sorted_array_s1/ │ │ │ └── sfo_11_find_minimum_in_rotated_sorted_array_s1.cpp │ │ ├── sfo_11_find_minimum_in_rotated_sorted_array_s2/ │ │ │ └── sfo_11_find_minimum_in_rotated_sorted_array_s2.cpp │ │ ├── sfo_12_word_search_s1/ │ │ │ └── sfo_12_word_search_s1.cpp │ │ ├── sfo_13_range_of_motion_of_a_robot_s1/ │ │ │ └── sfo_13_range_of_motion_of_a_robot_s1.cpp │ │ ├── sfo_13_range_of_motion_of_a_robot_s2/ │ │ │ └── sfo_13_range_of_motion_of_a_robot_s2.cpp │ │ ├── sfo_14i_cut_the_rope_i_s1/ │ │ │ └── sfo_14i_cut_the_rope_i_s1.cpp │ │ ├── sfo_14ii_cut_the_rope_ii_s1/ │ │ │ └── sfo_14ii_cut_the_rope_ii_s1.cpp │ │ ├── sfo_15_number_of_1_bits_s1/ │ │ │ └── sfo_15_number_of_1_bits_s1.cpp │ │ ├── sfo_15_number_of_1_bits_s2/ │ │ │ └── sfo_15_number_of_1_bits_s2.cpp │ │ ├── sfo_16_powers_of_integers_s1/ │ │ │ └── sfo_16_powers_of_integers_s1.cpp │ │ ├── sfo_18_delete_a_node_from_a_linked_list_s1/ │ │ │ └── sfo_18_delete_a_node_from_a_linked_list_s1.cpp │ │ ├── sfo_19_regular_expression_matching_s1/ │ │ │ └── sfo_19_regular_expression_matching_s1.cpp │ │ ├── sfo_19_regular_expression_matching_s2/ │ │ │ └── sfo_19_regular_expression_matching_s2.cpp │ │ ├── sfo_21_adjust_the_order_of_numbers_in_an_array_s1/ │ │ │ └── sfo_21_adjust_the_order_of_numbers_in_an_array_s1.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 │ │ ├── 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 │ │ ├── sfo_24_reverse_a_linked_list_s1/ │ │ │ └── sfo_24_reverse_a_linked_list_s1.cpp │ │ ├── sfo_24_reverse_a_linked_list_s2/ │ │ │ └── sfo_24_reverse_a_linked_list_s2.cpp │ │ ├── sfo_25_combine_two_sorted_linked_lists_s1/ │ │ │ └── sfo_25_combine_two_sorted_linked_lists_s1.cpp │ │ ├── sfo_26_substructure_of_a_binary_tree_s1/ │ │ │ └── sfo_26_substructure_of_a_binary_tree_s1.cpp │ │ ├── sfo_27_mirror_of_a_binary_tree_s1/ │ │ │ └── sfo_27_mirror_of_a_binary_tree_s1.cpp │ │ ├── sfo_27_mirror_of_a_binary_tree_s2/ │ │ │ └── sfo_27_mirror_of_a_binary_tree_s2.cpp │ │ ├── sfo_28_symmetric_binary_tree_s1/ │ │ │ └── sfo_28_symmetric_binary_tree_s1.cpp │ │ ├── sfo_29_print_a_given_matrix_in_spiral_form_s1/ │ │ │ └── sfo_29_print_a_given_matrix_in_spiral_form_s1.cpp │ │ ├── sfo_30_min_stack_s1/ │ │ │ └── sfo_30_min_stack_s1.cpp │ │ ├── sfo_31_validate_stack_sequences_s1/ │ │ │ └── sfo_31_validate_stack_sequences_s1.cpp │ │ ├── sfo_32i_print_a_binary_tree_topbottom_i_s1/ │ │ │ └── sfo_32i_print_a_binary_tree_topbottom_i_s1.cpp │ │ ├── sfo_32ii_print_a_binary_tree_topbottom_ii_s1/ │ │ │ └── sfo_32ii_print_a_binary_tree_topbottom_ii_s1.cpp │ │ ├── sfo_32iii_print_a_binary_tree_topbottom_iii_s1/ │ │ │ └── sfo_32iii_print_a_binary_tree_topbottom_iii_s1.cpp │ │ ├── sfo_32iii_print_a_binary_tree_topbottom_iii_s2/ │ │ │ └── sfo_32iii_print_a_binary_tree_topbottom_iii_s2.cpp │ │ ├── sfo_33_postorder_traversal_of_a_binary_search_tree_s1/ │ │ │ └── sfo_33_postorder_traversal_of_a_binary_search_tree_s1.cpp │ │ ├── sfo_33_postorder_traversal_of_a_binary_search_tree_s2/ │ │ │ └── sfo_33_postorder_traversal_of_a_binary_search_tree_s2.cpp │ │ ├── sfo_34_all_xsum_paths_in_a_binary_tree_s1/ │ │ │ └── sfo_34_all_xsum_paths_in_a_binary_tree_s1.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 │ │ ├── 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 │ │ ├── sfo_36_binary_search_tree_and_doubly_linked_list_s1/ │ │ │ └── sfo_36_binary_search_tree_and_doubly_linked_list_s1.cpp │ │ ├── sfo_37_serialize_and_deserialize_a_binary_tree_s1/ │ │ │ └── sfo_37_serialize_and_deserialize_a_binary_tree_s1.cpp │ │ ├── sfo_38_all_permutations_of_a_string_s1/ │ │ │ └── sfo_38_all_permutations_of_a_string_s1.cpp │ │ ├── sfo_39_the_majority_element_in_an_array_s1/ │ │ │ └── sfo_39_the_majority_element_in_an_array_s1.cpp │ │ ├── sfo_39_the_majority_element_in_an_array_s2/ │ │ │ └── sfo_39_the_majority_element_in_an_array_s2.cpp │ │ ├── sfo_40_the_smallest_k_numbers_s1/ │ │ │ └── sfo_40_the_smallest_k_numbers_s1.cpp │ │ ├── sfo_40_the_smallest_k_numbers_s2/ │ │ │ └── sfo_40_the_smallest_k_numbers_s2.cpp │ │ ├── sfo_41_find_median_from_data_stream_s1/ │ │ │ └── sfo_41_find_median_from_data_stream_s1.cpp │ │ ├── sfo_42_largest_sum_contiguous_subarray_s1/ │ │ │ └── sfo_42_largest_sum_contiguous_subarray_s1.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 │ │ ├── sfo_44_nth_digit_s1/ │ │ │ └── sfo_44_nth_digit_s1.cpp │ │ ├── sfo_45_arrange_an_array_into_the_smallest_number_s1/ │ │ │ └── sfo_45_arrange_an_array_into_the_smallest_number_s1.cpp │ │ ├── sfo_45_arrange_an_array_into_the_smallest_number_s2/ │ │ │ └── sfo_45_arrange_an_array_into_the_smallest_number_s2.cpp │ │ ├── sfo_46_translate_numbers_into_strings_s1/ │ │ │ └── sfo_46_translate_numbers_into_strings_s1.cpp │ │ ├── sfo_46_translate_numbers_into_strings_s2/ │ │ │ └── sfo_46_translate_numbers_into_strings_s2.cpp │ │ ├── sfo_46_translate_numbers_into_strings_s3/ │ │ │ └── sfo_46_translate_numbers_into_strings_s3.cpp │ │ ├── sfo_47_the_maximum_value_of_gifts_s1/ │ │ │ └── sfo_47_the_maximum_value_of_gifts_s1.cpp │ │ ├── sfo_47_the_maximum_value_of_gifts_s2/ │ │ │ └── sfo_47_the_maximum_value_of_gifts_s2.cpp │ │ ├── sfo_48_the_longest_substring_without_repeated_characters_s1/ │ │ │ └── sfo_48_the_longest_substring_without_repeated_characters_s1.cpp │ │ ├── sfo_48_the_longest_substring_without_repeated_characters_s2/ │ │ │ └── sfo_48_the_longest_substring_without_repeated_characters_s2.cpp │ │ ├── sfo_48_the_longest_substring_without_repeated_characters_s3/ │ │ │ └── sfo_48_the_longest_substring_without_repeated_characters_s3.cpp │ │ ├── sfo_49_ugly_numbers_s1/ │ │ │ └── sfo_49_ugly_numbers_s1.cpp │ │ ├── sfo_50_find_the_first_nonrepeating_character_in_a_string_s1/ │ │ │ └── sfo_50_find_the_first_nonrepeating_character_in_a_string_s1.cpp │ │ ├── sfo_50_find_the_first_nonrepeating_character_in_a_string_s2/ │ │ │ └── sfo_50_find_the_first_nonrepeating_character_in_a_string_s2.cpp │ │ ├── sfo_51_reversed_pairs_in_an_array_s1/ │ │ │ └── sfo_51_reversed_pairs_in_an_array_s1.cpp │ │ ├── sfo_52_the_first_common_node_in_two_linked_lists_s1/ │ │ │ └── sfo_52_the_first_common_node_in_two_linked_lists_s1.cpp │ │ ├── sfo_53i_find_a_number_in_a_sorted_array_s1/ │ │ │ └── sfo_53i_find_a_number_in_a_sorted_array_s1.cpp │ │ ├── sfo_53i_find_a_number_in_a_sorted_array_s2/ │ │ │ └── sfo_53i_find_a_number_in_a_sorted_array_s2.cpp │ │ ├── sfo_53ii_the_missing_number_from_0_to_n1_s1/ │ │ │ └── sfo_53ii_the_missing_number_from_0_to_n1_s1.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 │ │ ├── sfo_55i_depth_of_a_binary_tree_s1/ │ │ │ └── sfo_55i_depth_of_a_binary_tree_s1.cpp │ │ ├── sfo_55i_depth_of_a_binary_tree_s2/ │ │ │ └── sfo_55i_depth_of_a_binary_tree_s2.cpp │ │ ├── sfo_55ii_balanced_binary_tree_s1/ │ │ │ └── sfo_55ii_balanced_binary_tree_s1.cpp │ │ ├── sfo_55ii_balanced_binary_tree_s2/ │ │ │ └── sfo_55ii_balanced_binary_tree_s2.cpp │ │ ├── sfo_56i_single_number_i_s1/ │ │ │ └── sfo_56i_single_number_i_s1.cpp │ │ ├── sfo_56ii_single_number_ii_s1/ │ │ │ └── sfo_56ii_single_number_ii_s1.cpp │ │ ├── sfo_56ii_single_number_ii_s2/ │ │ │ └── sfo_56ii_single_number_ii_s2.cpp │ │ ├── sfo_57_two_numbers_with_sum_s_s1/ │ │ │ └── sfo_57_two_numbers_with_sum_s_s1.cpp │ │ ├── sfo_57ii_consecutive_numbers_with_sum_s_s1/ │ │ │ └── sfo_57ii_consecutive_numbers_with_sum_s_s1.cpp │ │ ├── sfo_57ii_consecutive_numbers_with_sum_s_s2/ │ │ │ └── sfo_57ii_consecutive_numbers_with_sum_s_s2.cpp │ │ ├── sfo_58ii_left_rotation_of_a_string_s1/ │ │ │ └── sfo_58ii_left_rotation_of_a_string_s1.cpp │ │ ├── sfo_58ii_left_rotation_of_a_string_s2/ │ │ │ └── sfo_58ii_left_rotation_of_a_string_s2.cpp │ │ ├── sfo_58ii_left_rotation_of_a_string_s3/ │ │ │ └── sfo_58ii_left_rotation_of_a_string_s3.cpp │ │ ├── sfo_59ii_max_queue_s1/ │ │ │ └── sfo_59ii_max_queue_s1.cpp │ │ ├── sfo_60_probabilities_for_rolling_n_dices_s1/ │ │ │ └── sfo_60_probabilities_for_rolling_n_dices_s1.cpp │ │ ├── sfo_61_straight_in_poker_s1/ │ │ │ └── sfo_61_straight_in_poker_s1.cpp │ │ ├── sfo_61_straight_in_poker_s2/ │ │ │ └── sfo_61_straight_in_poker_s2.cpp │ │ ├── sfo_62_josephus_problem_s1/ │ │ │ └── sfo_62_josephus_problem_s1.cpp │ │ ├── sfo_63_the_maximum_profit_of_stocks_s1/ │ │ │ └── sfo_63_the_maximum_profit_of_stocks_s1.cpp │ │ ├── sfo_64_solve_1_2___n_s1/ │ │ │ └── sfo_64_solve_1_2___n_s1.cpp │ │ ├── sfo_65_implement_addition_operation_without_arithmetic_operators_s1/ │ │ │ └── sfo_65_implement_addition_operation_without_arithmetic_operators_s1.cpp │ │ ├── sfo_66_a_product_array_puzzle_s1/ │ │ │ └── sfo_66_a_product_array_puzzle_s1.cpp │ │ ├── sfo_67_convert_string_to_int_s1/ │ │ │ └── sfo_67_convert_string_to_int_s1.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 │ │ ├── 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 │ │ ├── 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 │ │ ├── sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s1/ │ │ │ └── sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s1.cpp │ │ └── sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s2/ │ │ └── sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s2.cpp │ ├── java/ │ │ ├── include/ │ │ │ ├── ListNode.java │ │ │ ├── PrintUtil.java │ │ │ └── TreeNode.java │ │ ├── sfo_03_find_duplicate_numbers_in_an_array_s1/ │ │ │ └── sfo_03_find_duplicate_numbers_in_an_array_s1.java │ │ ├── sfo_03_find_duplicate_numbers_in_an_array_s2/ │ │ │ └── sfo_03_find_duplicate_numbers_in_an_array_s2.java │ │ ├── sfo_04_find_a_number_in_2d_matrix_s1/ │ │ │ └── sfo_04_find_a_number_in_2d_matrix_s1.java │ │ ├── sfo_05_replace_spaces_s1/ │ │ │ └── sfo_05_replace_spaces_s1.java │ │ ├── sfo_06_print_a_linked_list_in_reverse_order_s1/ │ │ │ └── sfo_06_print_a_linked_list_in_reverse_order_s1.java │ │ ├── sfo_06_print_a_linked_list_in_reverse_order_s2/ │ │ │ └── sfo_06_print_a_linked_list_in_reverse_order_s2.java │ │ ├── sfo_07_reconstruct_binary_tree_s1/ │ │ │ └── sfo_07_reconstruct_binary_tree_s1.java │ │ ├── sfo_09_implement_a_queue_using_two_stacks_s1/ │ │ │ └── sfo_09_implement_a_queue_using_two_stacks_s1.java │ │ ├── sfo_10i_fibonacci_numbers_s1/ │ │ │ └── sfo_10i_fibonacci_numbers_s1.java │ │ ├── sfo_10ii_frog_jump_s1/ │ │ │ └── sfo_10ii_frog_jump_s1.java │ │ ├── sfo_11_find_minimum_in_rotated_sorted_array_s1/ │ │ │ └── sfo_11_find_minimum_in_rotated_sorted_array_s1.java │ │ ├── sfo_11_find_minimum_in_rotated_sorted_array_s2/ │ │ │ └── sfo_11_find_minimum_in_rotated_sorted_array_s2.java │ │ ├── sfo_12_word_search_s1/ │ │ │ └── sfo_12_word_search_s1.java │ │ ├── sfo_13_range_of_motion_of_a_robot_s1/ │ │ │ └── sfo_13_range_of_motion_of_a_robot_s1.java │ │ ├── sfo_13_range_of_motion_of_a_robot_s2/ │ │ │ └── sfo_13_range_of_motion_of_a_robot_s2.java │ │ ├── sfo_14i_cut_the_rope_i_s1/ │ │ │ └── sfo_14i_cut_the_rope_i_s1.java │ │ ├── sfo_14ii_cut_the_rope_ii_s1/ │ │ │ └── sfo_14ii_cut_the_rope_ii_s1.java │ │ ├── sfo_15_number_of_1_bits_s1/ │ │ │ └── sfo_15_number_of_1_bits_s1.java │ │ ├── sfo_15_number_of_1_bits_s2/ │ │ │ └── sfo_15_number_of_1_bits_s2.java │ │ ├── sfo_16_powers_of_integers_s1/ │ │ │ └── sfo_16_powers_of_integers_s1.java │ │ ├── sfo_17_print_from_1_to_the_largest_n_digits_s1/ │ │ │ └── sfo_17_print_from_1_to_the_largest_n_digits_s1.java │ │ ├── sfo_17_print_from_1_to_the_largest_n_digits_s2/ │ │ │ └── sfo_17_print_from_1_to_the_largest_n_digits_s2.java │ │ ├── sfo_17_print_from_1_to_the_largest_n_digits_s3/ │ │ │ └── sfo_17_print_from_1_to_the_largest_n_digits_s3.java │ │ ├── sfo_17_print_from_1_to_the_largest_n_digits_s4/ │ │ │ └── sfo_17_print_from_1_to_the_largest_n_digits_s4.java │ │ ├── sfo_18_delete_a_node_from_a_linked_list_s1/ │ │ │ └── sfo_18_delete_a_node_from_a_linked_list_s1.java │ │ ├── sfo_19_regular_expression_matching_s1/ │ │ │ └── sfo_19_regular_expression_matching_s1.java │ │ ├── sfo_19_regular_expression_matching_s2/ │ │ │ └── sfo_19_regular_expression_matching_s2.java │ │ ├── sfo_20_a_string_representing_a_numeric_value_s1/ │ │ │ └── sfo_20_a_string_representing_a_numeric_value_s1.java │ │ ├── sfo_21_adjust_the_order_of_numbers_in_an_array_s1/ │ │ │ └── sfo_21_adjust_the_order_of_numbers_in_an_array_s1.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 │ │ ├── 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 │ │ ├── sfo_24_reverse_a_linked_list_s1/ │ │ │ └── sfo_24_reverse_a_linked_list_s1.java │ │ ├── sfo_24_reverse_a_linked_list_s2/ │ │ │ └── sfo_24_reverse_a_linked_list_s2.java │ │ ├── sfo_25_combine_two_sorted_linked_lists_s1/ │ │ │ └── sfo_25_combine_two_sorted_linked_lists_s1.java │ │ ├── sfo_26_substructure_of_a_binary_tree_s1/ │ │ │ └── sfo_26_substructure_of_a_binary_tree_s1.java │ │ ├── sfo_27_mirror_of_a_binary_tree_s1/ │ │ │ └── sfo_27_mirror_of_a_binary_tree_s1.java │ │ ├── sfo_27_mirror_of_a_binary_tree_s2/ │ │ │ └── sfo_27_mirror_of_a_binary_tree_s2.java │ │ ├── sfo_28_symmetric_binary_tree_s1/ │ │ │ └── sfo_28_symmetric_binary_tree_s1.java │ │ ├── sfo_29_print_a_given_matrix_in_spiral_form_s1/ │ │ │ └── sfo_29_print_a_given_matrix_in_spiral_form_s1.java │ │ ├── sfo_30_min_stack_s1/ │ │ │ └── sfo_30_min_stack_s1.java │ │ ├── sfo_31_validate_stack_sequences_s1/ │ │ │ └── sfo_31_validate_stack_sequences_s1.java │ │ ├── sfo_32i_print_a_binary_tree_topbottom_i_s1/ │ │ │ └── sfo_32i_print_a_binary_tree_topbottom_i_s1.java │ │ ├── sfo_32ii_print_a_binary_tree_topbottom_ii_s1/ │ │ │ └── sfo_32ii_print_a_binary_tree_topbottom_ii_s1.java │ │ ├── sfo_32iii_print_a_binary_tree_topbottom_iii_s1/ │ │ │ └── sfo_32iii_print_a_binary_tree_topbottom_iii_s1.java │ │ ├── sfo_32iii_print_a_binary_tree_topbottom_iii_s2/ │ │ │ └── sfo_32iii_print_a_binary_tree_topbottom_iii_s2.java │ │ ├── sfo_32iii_print_a_binary_tree_topbottom_iii_s3/ │ │ │ └── sfo_32iii_print_a_binary_tree_topbottom_iii_s3.java │ │ ├── sfo_33_postorder_traversal_of_a_binary_search_tree_s1/ │ │ │ └── sfo_33_postorder_traversal_of_a_binary_search_tree_s1.java │ │ ├── sfo_33_postorder_traversal_of_a_binary_search_tree_s2/ │ │ │ └── sfo_33_postorder_traversal_of_a_binary_search_tree_s2.java │ │ ├── sfo_34_all_xsum_paths_in_a_binary_tree_s1/ │ │ │ └── sfo_34_all_xsum_paths_in_a_binary_tree_s1.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 │ │ ├── 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 │ │ ├── sfo_36_binary_search_tree_and_doubly_linked_list_s1/ │ │ │ └── sfo_36_binary_search_tree_and_doubly_linked_list_s1.java │ │ ├── sfo_37_serialize_and_deserialize_a_binary_tree_s1/ │ │ │ └── sfo_37_serialize_and_deserialize_a_binary_tree_s1.java │ │ ├── sfo_38_all_permutations_of_a_string_s1/ │ │ │ └── sfo_38_all_permutations_of_a_string_s1.java │ │ ├── sfo_39_the_majority_element_in_an_array_s1/ │ │ │ └── sfo_39_the_majority_element_in_an_array_s1.java │ │ ├── sfo_39_the_majority_element_in_an_array_s2/ │ │ │ └── sfo_39_the_majority_element_in_an_array_s2.java │ │ ├── sfo_40_the_smallest_k_numbers_s1/ │ │ │ └── sfo_40_the_smallest_k_numbers_s1.java │ │ ├── sfo_40_the_smallest_k_numbers_s2/ │ │ │ └── sfo_40_the_smallest_k_numbers_s2.java │ │ ├── sfo_41_find_median_from_data_stream_s1/ │ │ │ └── sfo_41_find_median_from_data_stream_s1.java │ │ ├── sfo_42_largest_sum_contiguous_subarray_s1/ │ │ │ └── sfo_42_largest_sum_contiguous_subarray_s1.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 │ │ ├── sfo_44_nth_digit_s1/ │ │ │ └── sfo_44_nth_digit_s1.java │ │ ├── sfo_45_arrange_an_array_into_the_smallest_number_s1/ │ │ │ └── sfo_45_arrange_an_array_into_the_smallest_number_s1.java │ │ ├── sfo_45_arrange_an_array_into_the_smallest_number_s2/ │ │ │ └── sfo_45_arrange_an_array_into_the_smallest_number_s2.java │ │ ├── sfo_46_translate_numbers_into_strings_s1/ │ │ │ └── sfo_46_translate_numbers_into_strings_s1.java │ │ ├── sfo_46_translate_numbers_into_strings_s2/ │ │ │ └── sfo_46_translate_numbers_into_strings_s2.java │ │ ├── sfo_46_translate_numbers_into_strings_s3/ │ │ │ └── sfo_46_translate_numbers_into_strings_s3.java │ │ ├── sfo_47_the_maximum_value_of_gifts_s1/ │ │ │ └── sfo_47_the_maximum_value_of_gifts_s1.java │ │ ├── sfo_47_the_maximum_value_of_gifts_s2/ │ │ │ └── sfo_47_the_maximum_value_of_gifts_s2.java │ │ ├── sfo_48_the_longest_substring_without_repeated_characters_s1/ │ │ │ └── sfo_48_the_longest_substring_without_repeated_characters_s1.java │ │ ├── sfo_48_the_longest_substring_without_repeated_characters_s2/ │ │ │ └── sfo_48_the_longest_substring_without_repeated_characters_s2.java │ │ ├── sfo_48_the_longest_substring_without_repeated_characters_s3/ │ │ │ └── sfo_48_the_longest_substring_without_repeated_characters_s3.java │ │ ├── sfo_49_ugly_numbers_s1/ │ │ │ └── sfo_49_ugly_numbers_s1.java │ │ ├── sfo_50_find_the_first_nonrepeating_character_in_a_string_s1/ │ │ │ └── sfo_50_find_the_first_nonrepeating_character_in_a_string_s1.java │ │ ├── sfo_50_find_the_first_nonrepeating_character_in_a_string_s2/ │ │ │ └── sfo_50_find_the_first_nonrepeating_character_in_a_string_s2.java │ │ ├── sfo_51_reversed_pairs_in_an_array_s1/ │ │ │ └── sfo_51_reversed_pairs_in_an_array_s1.java │ │ ├── sfo_52_the_first_common_node_in_two_linked_lists_s1/ │ │ │ └── sfo_52_the_first_common_node_in_two_linked_lists_s1.java │ │ ├── sfo_53i_find_a_number_in_a_sorted_array_s1/ │ │ │ └── sfo_53i_find_a_number_in_a_sorted_array_s1.java │ │ ├── sfo_53i_find_a_number_in_a_sorted_array_s2/ │ │ │ └── sfo_53i_find_a_number_in_a_sorted_array_s2.java │ │ ├── sfo_53ii_the_missing_number_from_0_to_n1_s1/ │ │ │ └── sfo_53ii_the_missing_number_from_0_to_n1_s1.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 │ │ ├── sfo_55i_depth_of_a_binary_tree_s1/ │ │ │ └── sfo_55i_depth_of_a_binary_tree_s1.java │ │ ├── sfo_55i_depth_of_a_binary_tree_s2/ │ │ │ └── sfo_55i_depth_of_a_binary_tree_s2.java │ │ ├── sfo_55ii_balanced_binary_tree_s1/ │ │ │ └── sfo_55ii_balanced_binary_tree_s1.java │ │ ├── sfo_55ii_balanced_binary_tree_s2/ │ │ │ └── sfo_55ii_balanced_binary_tree_s2.java │ │ ├── sfo_56i_single_number_i_s1/ │ │ │ └── sfo_56i_single_number_i_s1.java │ │ ├── sfo_56ii_single_number_ii_s1/ │ │ │ └── sfo_56ii_single_number_ii_s1.java │ │ ├── sfo_56ii_single_number_ii_s2/ │ │ │ └── sfo_56ii_single_number_ii_s2.java │ │ ├── sfo_57_two_numbers_with_sum_s_s1/ │ │ │ └── sfo_57_two_numbers_with_sum_s_s1.java │ │ ├── sfo_57ii_consecutive_numbers_with_sum_s_s1/ │ │ │ └── sfo_57ii_consecutive_numbers_with_sum_s_s1.java │ │ ├── sfo_57ii_consecutive_numbers_with_sum_s_s2/ │ │ │ └── sfo_57ii_consecutive_numbers_with_sum_s_s2.java │ │ ├── sfo_58i_reverse_order_of_words_s1/ │ │ │ └── sfo_58i_reverse_order_of_words_s1.java │ │ ├── sfo_58i_reverse_order_of_words_s2/ │ │ │ └── sfo_58i_reverse_order_of_words_s2.java │ │ ├── sfo_58ii_left_rotation_of_a_string_s1/ │ │ │ └── sfo_58ii_left_rotation_of_a_string_s1.java │ │ ├── sfo_58ii_left_rotation_of_a_string_s2/ │ │ │ └── sfo_58ii_left_rotation_of_a_string_s2.java │ │ ├── sfo_58ii_left_rotation_of_a_string_s3/ │ │ │ └── sfo_58ii_left_rotation_of_a_string_s3.java │ │ ├── sfo_58ii_left_rotation_of_a_string_s4/ │ │ │ └── sfo_58ii_left_rotation_of_a_string_s4.java │ │ ├── sfo_58ii_left_rotation_of_a_string_s5/ │ │ │ └── sfo_58ii_left_rotation_of_a_string_s5.java │ │ ├── sfo_59i_sliding_window_maximum_s1/ │ │ │ └── sfo_59i_sliding_window_maximum_s1.java │ │ ├── sfo_59i_sliding_window_maximum_s2/ │ │ │ └── sfo_59i_sliding_window_maximum_s2.java │ │ ├── sfo_59ii_max_queue_s1/ │ │ │ └── sfo_59ii_max_queue_s1.java │ │ ├── sfo_60_probabilities_for_rolling_n_dices_s1/ │ │ │ └── sfo_60_probabilities_for_rolling_n_dices_s1.java │ │ ├── sfo_61_straight_in_poker_s1/ │ │ │ └── sfo_61_straight_in_poker_s1.java │ │ ├── sfo_61_straight_in_poker_s2/ │ │ │ └── sfo_61_straight_in_poker_s2.java │ │ ├── sfo_62_josephus_problem_s1/ │ │ │ └── sfo_62_josephus_problem_s1.java │ │ ├── sfo_63_the_maximum_profit_of_stocks_s1/ │ │ │ └── sfo_63_the_maximum_profit_of_stocks_s1.java │ │ ├── sfo_64_solve_1_2___n_s1/ │ │ │ └── sfo_64_solve_1_2___n_s1.java │ │ ├── sfo_64_solve_1_2___n_s2/ │ │ │ └── sfo_64_solve_1_2___n_s2.java │ │ ├── sfo_65_implement_addition_operation_without_arithmetic_operators_s1/ │ │ │ └── sfo_65_implement_addition_operation_without_arithmetic_operators_s1.java │ │ ├── sfo_66_a_product_array_puzzle_s1/ │ │ │ └── sfo_66_a_product_array_puzzle_s1.java │ │ ├── sfo_67_convert_string_to_int_s1/ │ │ │ └── sfo_67_convert_string_to_int_s1.java │ │ ├── sfo_67_convert_string_to_int_s2/ │ │ │ └── sfo_67_convert_string_to_int_s2.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 │ │ ├── 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 │ │ ├── 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 │ │ ├── sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s1/ │ │ │ └── sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s1.java │ │ └── sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s2/ │ │ └── sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s2.java │ └── python/ │ ├── include/ │ │ ├── __init__.py │ │ ├── binary_tree.py │ │ ├── linked_list.py │ │ └── print_util.py │ ├── sfo_03_find_duplicate_numbers_in_an_array_s1.py │ ├── sfo_03_find_duplicate_numbers_in_an_array_s2.py │ ├── sfo_04_find_a_number_in_2d_matrix_s1.py │ ├── sfo_05_replace_spaces_s1.py │ ├── sfo_06_print_a_linked_list_in_reverse_order_s1.py │ ├── sfo_06_print_a_linked_list_in_reverse_order_s2.py │ ├── sfo_07_reconstruct_binary_tree_s1.py │ ├── sfo_09_implement_a_queue_using_two_stacks_s1.py │ ├── sfo_10i_fibonacci_numbers_s1.py │ ├── sfo_10i_fibonacci_numbers_s2.py │ ├── sfo_10ii_frog_jump_s1.py │ ├── sfo_10ii_frog_jump_s2.py │ ├── sfo_11_find_minimum_in_rotated_sorted_array_s1.py │ ├── sfo_11_find_minimum_in_rotated_sorted_array_s2.py │ ├── sfo_12_word_search_s1.py │ ├── sfo_13_range_of_motion_of_a_robot_s1.py │ ├── sfo_13_range_of_motion_of_a_robot_s2.py │ ├── sfo_14i_cut_the_rope_i_s1.py │ ├── sfo_14ii_cut_the_rope_ii_s1.py │ ├── sfo_14ii_cut_the_rope_ii_s2.py │ ├── sfo_15_number_of_1_bits_s1.py │ ├── sfo_15_number_of_1_bits_s2.py │ ├── sfo_16_powers_of_integers_s1.py │ ├── sfo_17_print_from_1_to_the_largest_n_digits_s1.py │ ├── sfo_17_print_from_1_to_the_largest_n_digits_s2.py │ ├── sfo_17_print_from_1_to_the_largest_n_digits_s3.py │ ├── sfo_17_print_from_1_to_the_largest_n_digits_s4.py │ ├── sfo_18_delete_a_node_from_a_linked_list_s1.py │ ├── sfo_19_regular_expression_matching_s1.py │ ├── sfo_19_regular_expression_matching_s2.py │ ├── sfo_20_a_string_representing_a_numeric_value_s1.py │ ├── sfo_21_adjust_the_order_of_numbers_in_an_array_s1.py │ ├── sfo_22_the_kth_node_from_the_end_of_a_linked_list_s1.py │ ├── sfo_22_the_kth_node_from_the_end_of_a_linked_list_s2.py │ ├── sfo_24_reverse_a_linked_list_s1.py │ ├── sfo_24_reverse_a_linked_list_s2.py │ ├── sfo_24_reverse_a_linked_list_s3.py │ ├── sfo_25_combine_two_sorted_linked_lists_s1.py │ ├── sfo_26_substructure_of_a_binary_tree_s1.py │ ├── sfo_27_mirror_of_a_binary_tree_s1.py │ ├── sfo_27_mirror_of_a_binary_tree_s2.py │ ├── sfo_27_mirror_of_a_binary_tree_s3.py │ ├── sfo_28_symmetric_binary_tree_s1.py │ ├── sfo_29_print_a_given_matrix_in_spiral_form_s1.py │ ├── sfo_30_min_stack_s1.py │ ├── sfo_31_validate_stack_sequences_s1.py │ ├── sfo_32i_print_a_binary_tree_topbottom_i_s1.py │ ├── sfo_32ii_print_a_binary_tree_topbottom_ii_s1.py │ ├── sfo_32iii_print_a_binary_tree_topbottom_iii_s1.py │ ├── sfo_32iii_print_a_binary_tree_topbottom_iii_s2.py │ ├── sfo_32iii_print_a_binary_tree_topbottom_iii_s3.py │ ├── sfo_33_postorder_traversal_of_a_binary_search_tree_s1.py │ ├── sfo_33_postorder_traversal_of_a_binary_search_tree_s2.py │ ├── sfo_34_all_xsum_paths_in_a_binary_tree_s1.py │ ├── sfo_35_clone_a_linked_list_with_next_and_random_pointer_s1.py │ ├── sfo_35_clone_a_linked_list_with_next_and_random_pointer_s2.py │ ├── sfo_36_binary_search_tree_and_doubly_linked_list_s1.py │ ├── sfo_37_serialize_and_deserialize_a_binary_tree_s1.py │ ├── sfo_38_all_permutations_of_a_string_s1.py │ ├── sfo_39_the_majority_element_in_an_array_s1.py │ ├── sfo_39_the_majority_element_in_an_array_s2.py │ ├── sfo_40_the_smallest_k_numbers_s1.py │ ├── sfo_40_the_smallest_k_numbers_s2.py │ ├── sfo_41_find_median_from_data_stream_s1.py │ ├── sfo_41_find_median_from_data_stream_s2.py │ ├── sfo_42_largest_sum_contiguous_subarray_s1.py │ ├── sfo_43_total_number_of_1_in_integers_from_1_to_n_s1.py │ ├── sfo_44_nth_digit_s1.py │ ├── sfo_45_arrange_an_array_into_the_smallest_number_s1.py │ ├── sfo_45_arrange_an_array_into_the_smallest_number_s2.py │ ├── sfo_46_translate_numbers_into_strings_s1.py │ ├── sfo_46_translate_numbers_into_strings_s2.py │ ├── sfo_46_translate_numbers_into_strings_s3.py │ ├── sfo_46_translate_numbers_into_strings_s4.py │ ├── sfo_46_translate_numbers_into_strings_s5.py │ ├── sfo_47_the_maximum_value_of_gifts_s1.py │ ├── sfo_47_the_maximum_value_of_gifts_s2.py │ ├── sfo_48_the_longest_substring_without_repeated_characters_s1.py │ ├── sfo_48_the_longest_substring_without_repeated_characters_s2.py │ ├── sfo_48_the_longest_substring_without_repeated_characters_s3.py │ ├── sfo_49_ugly_numbers_s1.py │ ├── sfo_50_find_the_first_nonrepeating_character_in_a_string_s1.py │ ├── sfo_50_find_the_first_nonrepeating_character_in_a_string_s2.py │ ├── sfo_50_find_the_first_nonrepeating_character_in_a_string_s3.py │ ├── sfo_51_reversed_pairs_in_an_array_s1.py │ ├── sfo_52_the_first_common_node_in_two_linked_lists_s1.py │ ├── sfo_53i_find_a_number_in_a_sorted_array_s1.py │ ├── sfo_53i_find_a_number_in_a_sorted_array_s2.py │ ├── sfo_53ii_the_missing_number_from_0_to_n1_s1.py │ ├── sfo_54_the_kth_largest_node_of_a_binary_search_tree_s1.py │ ├── sfo_55i_depth_of_a_binary_tree_s1.py │ ├── sfo_55i_depth_of_a_binary_tree_s2.py │ ├── sfo_55ii_balanced_binary_tree_s1.py │ ├── sfo_55ii_balanced_binary_tree_s2.py │ ├── sfo_56i_single_number_i_s1.py │ ├── sfo_56ii_single_number_ii_s1.py │ ├── sfo_56ii_single_number_ii_s2.py │ ├── sfo_57_two_numbers_with_sum_s_s1.py │ ├── sfo_57ii_consecutive_numbers_with_sum_s_s1.py │ ├── sfo_57ii_consecutive_numbers_with_sum_s_s2.py │ ├── sfo_58i_reverse_order_of_words_s1.py │ ├── sfo_58i_reverse_order_of_words_s2.py │ ├── sfo_58i_reverse_order_of_words_s3.py │ ├── sfo_58ii_left_rotation_of_a_string_s1.py │ ├── sfo_58ii_left_rotation_of_a_string_s2.py │ ├── sfo_58ii_left_rotation_of_a_string_s3.py │ ├── sfo_58ii_left_rotation_of_a_string_s4.py │ ├── sfo_58ii_left_rotation_of_a_string_s5.py │ ├── sfo_59i_sliding_window_maximum_s1.py │ ├── sfo_59i_sliding_window_maximum_s2.py │ ├── sfo_59ii_max_queue_s1.py │ ├── sfo_60_probabilities_for_rolling_n_dices_s1.py │ ├── sfo_61_straight_in_poker_s1.py │ ├── sfo_61_straight_in_poker_s2.py │ ├── sfo_62_josephus_problem_s1.py │ ├── sfo_63_the_maximum_profit_of_stocks_s1.py │ ├── sfo_64_solve_1_2___n_s1.py │ ├── sfo_65_implement_addition_operation_without_arithmetic_operators_s1.py │ ├── sfo_66_a_product_array_puzzle_s1.py │ ├── sfo_67_convert_string_to_int_s1.py │ ├── sfo_67_convert_string_to_int_s2.py │ ├── sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s1.py │ ├── sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s2.py │ ├── sfo_68i_the_nearest_common_ancestor_of_a_binary_search_tree_s3.py │ ├── sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s1.py │ └── sfo_68ii_the_nearest_common_ancestor_of_a_binary_tree_s2.py ├── docs/ │ ├── 剑指 Offer 03. 数组中重复的数字.md │ ├── 剑指 Offer 04. 二维数组中的查找.md │ ├── 剑指 Offer 05. 替换空格.md │ ├── 剑指 Offer 06. 从尾到头打印链表.md │ ├── 剑指 Offer 07. 重建二叉树.md │ ├── 剑指 Offer 09. 用两个栈实现队列.md │ ├── 剑指 Offer 10- I. 斐波那契数列.md │ ├── 剑指 Offer 10- II. 青蛙跳台阶问题.md │ ├── 剑指 Offer 11. 旋转数组的最小数字.md │ ├── 剑指 Offer 12. 矩阵中的路径.md │ ├── 剑指 Offer 13. 机器人的运动范围.md │ ├── 剑指 Offer 14- I. 剪绳子.md │ ├── 剑指 Offer 14- II. 剪绳子 II.md │ ├── 剑指 Offer 15. 二进制中 1 的个数.md │ ├── 剑指 Offer 16. 数值的整数次方.md │ ├── 剑指 Offer 17. 打印从 1 到最大的 n 位数.md │ ├── 剑指 Offer 18. 删除链表的节点.md │ ├── 剑指 Offer 19. 正则表达式匹配.md │ ├── 剑指 Offer 20. 表示数值的字符串.md │ ├── 剑指 Offer 21. 调整数组顺序使奇数位于偶数前面.md │ ├── 剑指 Offer 22. 链表中倒数第 k 个节点.md │ ├── 剑指 Offer 24. 反转链表.md │ ├── 剑指 Offer 25. 合并两个排序的链表.md │ ├── 剑指 Offer 26. 树的子结构.md │ ├── 剑指 Offer 27. 二叉树的镜像.md │ ├── 剑指 Offer 28. 对称的二叉树.md │ ├── 剑指 Offer 29. 顺时针打印矩阵.md │ ├── 剑指 Offer 30. 包含 min 函数的栈.md │ ├── 剑指 Offer 31. 栈的压入、弹出序列.md │ ├── 剑指 Offer 32 - I. 从上到下打印二叉树.md │ ├── 剑指 Offer 32 - II. 从上到下打印二叉树 II.md │ ├── 剑指 Offer 32 - III. 从上到下打印二叉树 III.md │ ├── 剑指 Offer 33. 二叉搜索树的后序遍历序列.md │ ├── 剑指 Offer 34. 二叉树中和为某一值的路径.md │ ├── 剑指 Offer 35. 复杂链表的复制.md │ ├── 剑指 Offer 36. 二叉搜索树与双向链表.md │ ├── 剑指 Offer 37. 序列化二叉树.md │ ├── 剑指 Offer 38. 字符串的排列.md │ ├── 剑指 Offer 39. 数组中出现次数超过一半的数字.md │ ├── 剑指 Offer 40. 最小的 k 个数.md │ ├── 剑指 Offer 41. 数据流中的中位数.md │ ├── 剑指 Offer 42. 连续子数组的最大和.md │ ├── 剑指 Offer 43. 1~n 整数中 1 出现的次数.md │ ├── 剑指 Offer 44. 数字序列中某一位的数字.md │ ├── 剑指 Offer 45. 把数组排成最小的数.md │ ├── 剑指 Offer 46. 把数字翻译成字符串.md │ ├── 剑指 Offer 47. 礼物的最大价值.md │ ├── 剑指 Offer 48. 最长不含重复字符的子字符串.md │ ├── 剑指 Offer 49. 丑数.md │ ├── 剑指 Offer 50. 第一个只出现一次的字符.md │ ├── 剑指 Offer 51. 数组中的逆序对.md │ ├── 剑指 Offer 52. 两个链表的第一个公共节点.md │ ├── 剑指 Offer 53 - I. 在排序数组中查找数字 I.md │ ├── 剑指 Offer 53 - II. 0~n-1 中缺失的数字.md │ ├── 剑指 Offer 54. 二叉搜索树的第 k 大节点.md │ ├── 剑指 Offer 55 - I. 二叉树的深度.md │ ├── 剑指 Offer 55 - II. 平衡二叉树.md │ ├── 剑指 Offer 56 - I. 数组中数字出现的次数.md │ ├── 剑指 Offer 56 - II. 数组中数字出现的次数 II.md │ ├── 剑指 Offer 57 - II. 和为 s 的连续正数序列.md │ ├── 剑指 Offer 57. 和为 s 的两个数字.md │ ├── 剑指 Offer 58 - I. 翻转单词顺序.md │ ├── 剑指 Offer 58 - II. 左旋转字符串.md │ ├── 剑指 Offer 59 - I. 滑动窗口的最大值.md │ ├── 剑指 Offer 59 - II. 队列的最大值.md │ ├── 剑指 Offer 60. n 个骰子的点数.md │ ├── 剑指 Offer 61. 扑克牌中的顺子.md │ ├── 剑指 Offer 62. 圆圈中最后剩下的数字.md │ ├── 剑指 Offer 63. 股票的最大利润.md │ ├── 剑指 Offer 64. 求 1 + 2 + … + n.md │ ├── 剑指 Offer 65. 不用加减乘除做加法.md │ ├── 剑指 Offer 66. 构建乘积数组.md │ ├── 剑指 Offer 67. 把字符串转换成整数.md │ ├── 剑指 Offer 68 - I. 二叉搜索树的最近公共祖先.md │ └── 剑指 Offer 68 - II. 二叉树的最近公共祖先.md ├── 剑指 Offer 刷题计划.md └── 剑指 Offer 题目分类.md