摘要: 定义set emptySet = set() mySet = {'a','b','c'} tuple, 与list类似,但是是immutable的 如果你将一个list添加到set,就会报错;但是如果你将tuple添加到set是ok的,因为tuple 不可改变因此它的hash值是固定的 alist 阅读全文
posted @ 2022-05-16 06:16 xiaoyongyong 阅读(25) 评论(0) 推荐(0)
摘要: Makefile 中 .PHONY的作用 https://www.cnblogs.com/idorax/p/9306528.html 阅读全文
posted @ 2022-03-18 22:40 xiaoyongyong 阅读(23) 评论(0) 推荐(0)
摘要: 1861. Rotating the Box Medium You are given an m x n matrix of characters box representing a side-view of a box. Each cell of the box is one of the fo 阅读全文
posted @ 2022-02-23 10:55 xiaoyongyong 阅读(64) 评论(0) 推荐(0)
摘要: 341. Flatten Nested List Iterator Medium 29571025Add to ListShare You are given a nested list of integers nestedList. Each element is either an intege 阅读全文
posted @ 2022-02-20 23:28 xiaoyongyong 阅读(40) 评论(0) 推荐(0)
摘要: 53. Maximum Subarray Easy Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and ret 阅读全文
posted @ 2022-02-20 04:00 xiaoyongyong 阅读(93) 评论(0) 推荐(0)
摘要: 295. Find Median from Data Stream Hard 6150114Add to ListShare The median is the middle value in an ordered integer list. If the size of the list is e 阅读全文
posted @ 2022-02-04 05:06 xiaoyongyong 阅读(51) 评论(0) 推荐(0)
摘要: 198. House Robber Medium 10797236Add to ListShare You are a professional robber planning to rob houses along a street. Each house has a certain amount 阅读全文
posted @ 2022-02-04 04:47 xiaoyongyong 阅读(37) 评论(0) 推荐(0)
摘要: 399. Evaluate Division Medium You are given an array of variable pairs equations and an array of real numbers values, where equations[i] = [Ai, Bi] an 阅读全文
posted @ 2022-01-28 13:19 xiaoyongyong 阅读(36) 评论(0) 推荐(0)
摘要: composition vs inheritance composition mean A has B or A contains B. (A has a property whose type is B) inheritance mean A is B. (A extend B) 优缺点对比: c 阅读全文
posted @ 2022-01-26 11:42 xiaoyongyong 阅读(65) 评论(0) 推荐(0)
摘要: 269. Alien Dictionary There is a new alien language that uses the English alphabet. However, the order among the letters is unknown to you. You are gi 阅读全文
posted @ 2022-01-22 15:48 xiaoyongyong 阅读(83) 评论(0) 推荐(0)