【文件属性】:
文件名称:leetcode2sumc-LeetCode:LeetCode问题
文件大小:32KB
文件格式:ZIP
更新时间:2021-07-06 17:55:09
系统开源
leetcode
2
和
c
力码
LeetCode
问题的
C++
和
Python
3
解决方案。
新问题会不断补充。
要编译C++解决方案,请运行:
gcc
-Wall
path/to/the.cpp
-o
main
-lc++
-std=c++11
./main
注意:为并添加parse_input.cpp像这样:
gcc
-Wall
path/to/the.cpp
path/to/parse_input.cpp
-o
main
-lc++
-std=c++11
./main
对于Python
3,只需执行以下操作:
python3
path/to/the.py
并按照提示操作。
目录
数组
问题
解决方案
时间复杂度
空间复杂度
O(N
2
)
O(1)
上)
O(1)
上)
O(1)
上)
O(1)
链表
问题
解决方案
时间复杂度
空间复杂度
O(M
+
N)
O(max(M,
N))
上)
O(1)
O(N+M)
O(1)
上)
O(1)
数学
问题
解决方案
时间复杂度
空间复杂度
上)
O(1)
O(logk)
O(1)
排序
问题
解决方案
时间复杂度
空间复杂度
【文件预览】:
LeetCode-master
----Math()
--------1414_min_fibonacci_numbers.cpp(2KB)
--------509_fibonacci_number.py(372B)
--------509_fibonacci_number.cpp(470B)
--------1414_min_fibonacci_numbers.py(897B)
----LICENSE(1KB)
----Sorting()
--------75_sort_colors.py(997B)
--------179_largest_number.cpp(1KB)
--------179_largest_number.py(582B)
--------75_sort_colors.cpp(1KB)
----Trees()
--------parse_input.h(618B)
--------199_right_side_view.cpp(1KB)
--------parse_input.py(1KB)
--------102_level_order_traversal.cpp(1KB)
--------94_inorder_traversal.py(1KB)
--------104_max_depth.cpp(1KB)
--------102_level_order_traversal.py(1009B)
--------111_min_depth.py(1KB)
--------parse_input.cpp(1KB)
--------94_inorder_traversal.cpp(2KB)
--------199_right_side_view.py(901B)
--------111_min_depth.cpp(2KB)
--------104_max_depth.py(1KB)
----.gitignore(86B)
----Strings()
--------771_jewels_and_stones.py(430B)
--------438_all_anagrams.cpp(2KB)
--------921_min_add_to_make_valid.cpp(643B)
--------299_bulls_and_cows.py(808B)
--------438_all_anagrams.py(1KB)
--------299_bulls_and_cows.cpp(1KB)
--------20_valid_parentheses.py(601B)
--------921_min_add_to_make_valid.py(525B)
--------771_jewels_and_stones.cpp(717B)
--------20_valid_parentheses.cpp(888B)
----Arrays()
--------48_rotate_image.cpp(2KB)
--------283_move_zeroes.cpp(911B)
--------53_max_subarray.py(543B)
--------283_move_zeroes.py(644B)
--------55_jump_game.py(576B)
--------55_jump_game.cpp(903B)
--------48_rotate_image.py(1KB)
--------53_max_subarray.cpp(910B)
----README.md(5KB)
----LinkedLists()
--------parse_input.h(383B)
--------parse_input.py(755B)
--------2_add_two_numbers.py(1017B)
--------206_reverse.cpp(740B)
--------2_add_two_numbers.cpp(1KB)
--------19_remove_nth_node.cpp(1KB)
--------206_reverse.py(460B)
--------parse_input.cpp(491B)
--------21_merge_2sorted.cpp(1KB)
--------21_merge_2sorted.py(907B)
--------19_remove_nth_node.py(759B)