没有合适的资源?快使用搜索试试~ 我知道了~
leetcoderuntimeerrorjava-leetcode:面试准备的数据结构和算法
共78个文件
py:52个
md:16个
png:6个
需积分: 10 0 下载量 133 浏览量
2021-07-07
08:37:46
上传
评论
收藏 172KB ZIP 举报
温馨提示
leetcode 运行时错误 java Leetcode Python 面试准备 函数声明中的那些约定是什么? from typing import List class Solution : def singleNumber ( self , nums : List [ int ]) -> int : 它是所谓的“类型提示”(或“函数注释”;自 Python 3.0 起可用)。 -> List[int] 意味着函数应该返回一个整数列表。 nums: List[int], target: int 表示 nums 应该是一个整数列表,而那个目标应该是一个整数。 不过,这不是一个硬性要求,即您仍然可以使用为这些参数传递的不同类型的对象来调用函数,并且该函数也可以返回与整数列表不同的内容(与 Java 等其他语言中提供错误类型的语言不同)会导致编译错误)。 换句话说:类型提示与程序执行无关,它们在运行时被忽略(忽略类型提示只是默认行为,但它们在运行时通过annotations可用,因此您可以对它们做一些事情)。 类型提示可以表达作者的意图,并且可以在程序执行之前通过诸如 mypy 之类的工具
资源推荐
资源详情
资源评论
收起资源包目录
leetcode-master.zip (78个子文件)
leetcode-master
unsorted
eq_cubes.py 377B
reverse_str_inplace
reverse_string.py 832B
decode_ways
decode_ways_explain.py 769B
README.md 3KB
decode_ways_refactored.py 354B
single_number
single_number.py 546B
greedy_algorithms
lemonade_change
Solution.md 803B
README.md 528B
lemonade_change.py 434B
remove_kdigits
remove_kdigits_clean.py 597B
README.md 779B
remove_kdigits.py 3KB
search
2stars
img
telephone-keypad.png 25KB
letter_combo.py 1KB
README.md 525B
leetpy
medium
test_atoi.py 1KB
test_sum_nodes_with_even_grandparent.py 223B
hard
test_valid_number.py 861B
easy
test_convert_int_to_sum_of_two_no_zero_int.py 494B
test_reshape_the_matrix.py 1KB
test_add_two_numbers.py 2KB
test_decompress_run_length_encoded_list.py 3KB
test_split_string_in_balanced_strings.py 486B
test_valid_parentheses.py 823B
test_remove_duplicate_from_sorted_array.py 639B
test_defang_ip_address.py 216B
test_median_of_two_sorted_arrays.py 1KB
test_reverse_integer.py 414B
test_find_numbers_even_digits.py 264B
test_palindrome_number.py 216B
test_longest_common_prefix.py 697B
test_roman_to_integer.py 1005B
test_decrypt_string_from_alphabet_to_integer_mapping.py 635B
test_two_sum.py 524B
test_maximum_number_69.py 523B
test_subtract_the product_and_sum_of_digits_of_int.py 245B
hashtable
two_sum
README.md 340B
two_sum.py 478B
tree
binary_tree_inorder_traversal
binary-tree-inorder-traversal-recursive.py 497B
README.md 281B
binary-tree-inorder-traversal-iterative.py 541B
List
add_two_numbers
README.md 3KB
add_two_numbers.py 758B
2_add_two_numbers.svg 10KB
divide_conquer
majority_element
majority_element.py 1KB
README.md 430B
majority_element_clean.py 663B
graph
clone_graph
images
graph-1.png 3KB
graph.png 2KB
133_clone_graph_question.png 71KB
clone_graph.py 4KB
README.md 2KB
clone_graph_clean.py 672B
scratchpad.py 0B
README.md 2KB
Pipfile 151B
recursion
fibonacci_number
README.md 2KB
fibonacci_number.py 134B
fibonacciRecursion5.png 16KB
binary_search_tree
validate_binary_search_tree
validate_binary_searcth_tree_remix.py 529B
validate_binary_search_tree.py 883B
README.md 669B
max_depth
maximum_depth_binary_tree.py 834B
two_pointers
container_with_most_water
question_11.jpg 18KB
container_with_most_water.py 1KB
README.md 649B
binary_search
search_insert_position
search_insert_position.py 2KB
README.md 443B
search_insert_pos-clean.py 255B
dynamic_programming
unique_paths
unique_paths_clean.py 280B
unique_paths_detailed.py 1KB
unique_paths_explain.py 881B
unique_paths_fastest.py 268B
README.md 355B
unique_paths.png 9KB
climbing_stairs
climbing_stairs.py 2KB
climbing_stairs_clean.py 216B
.gitignore 29B
共 78 条
- 1
资源评论
weixin_38501916
- 粉丝: 1
- 资源: 935
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功