摘要: 1057. Campus Bikes Medium On a campus represented on the X-Y plane, there are n workers and m bikes, with n <= m. You are given an array workers of le 阅读全文
posted @ 2022-06-27 06:42 xiaoyongyong 阅读(34) 评论(0) 推荐(0)
摘要: 881. Boats to Save People Medium You are given an array people where people[i] is the weight of the ith person, and an infinite number of boats where 阅读全文
posted @ 2022-06-27 05:59 xiaoyongyong 阅读(68) 评论(0) 推荐(0)
摘要: 31. Next Permutation Medium A permutation of an array of integers is an arrangement of its members into a sequence or linear order. For example, for a 阅读全文
posted @ 2022-06-19 02:52 xiaoyongyong 阅读(45) 评论(0) 推荐(0)
摘要: 1570. Dot Product of Two Sparse Vectors Medium 858114Add to ListShare Given two sparse vectors, compute their dot product. Implement class SparseVecto 阅读全文
posted @ 2022-06-19 01:22 xiaoyongyong 阅读(37) 评论(0) 推荐(0)
摘要: 214. Shortest Palindrome Hard You are given a string s. You can convert s to a palindrome by adding characters in front of it. Return the shortest pal 阅读全文
posted @ 2022-06-13 02:31 xiaoyongyong 阅读(391) 评论(0) 推荐(0)
摘要: 2116. Check if a Parentheses String Can Be Valid Medium A parentheses string is a non-empty string consisting only of '(' and ')'. It is valid if any  阅读全文
posted @ 2022-06-06 08:19 xiaoyongyong 阅读(87) 评论(0) 推荐(0)
摘要: 318. Maximum Product of Word Lengths Given a string array words, return the maximum value of length(word[i]) * length(word[j]) where the two words do 阅读全文
posted @ 2022-05-30 00:47 xiaoyongyong 阅读(68) 评论(0) 推荐(0)
摘要: 定义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 阅读(21) 评论(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 阅读(60) 评论(0) 推荐(0)