文件名称:leetcode2sumc-LeetCode:练习商务面试
文件大小:19KB
文件格式:ZIP
更新时间:2024-07-26 11:38:10
系统开源
leetcode
2
sum
c
LeetCode规划
LEETCODE
PATTERNS
从LeetCode学演算法
Leetcode笔记
Leetcode
经典题目
程式题
1)
reverse
string
Input:
["h","e","l","l","o"]
Output:
["o","l","l","e","h"]
使用内部swap
class
Solution(object):
def
reverseString(self,
s):
"""
:type
s:
List[str]
:rtype:
None
Do
not
return
anything,
modify
s
in-place
instead.
"""
i
=
0
j
=
len(s)-1
while(i
【文件预览】:
LeetCode-master
----DFS()
--------README.md(8B)
----linked list()
--------README.md(8B)
----Two Pointers()
--------README.md(8B)
----Dynamic Programming()
--------README.md(22B)
--------70-Climbing Stairs.py(879B)
----Trie()
--------README.md(8B)
----README.md(14KB)
----Intervals()
--------README.md(8B)
----BFS()
--------README.md(8B)
----Binary Search()
--------README.md(8B)
----Fast & Slow Pointers()
--------README.md(8B)
----Tree()
--------103. Binary Tree Zigzag Level Order Traversal.py(1KB)
--------543. Diameter of Binary Tree.py(1KB)
--------104. Maximum Depth of Binary Tree.py(1KB)
--------235. Lowest Common Ancestor of a Binary Search Tree.py(2KB)
--------102. Binary Tree Level Order Traversal.py(1KB)
----Backtracking()
--------README.md(15B)
--------784-Letter Case Permutation.py(1KB)
----Arrays()
--------268-Missing Number.py(544B)
--------268_Missing_Number.cpp(886B)
--------136_Single_Number.cpp(862B)
--------217_Contains_Duplicate.cpp(835B)
--------README.md(12B)
--------448-Find All Numbers Disappeared in an Array.py(1018B)
--------136-Single Number.py(613B)
--------217-Contains Duplicate.py(576B)
--------448_Numbers_Disappeared.cpp(2KB)