xinyu04

导航

2022年8月17日 #

LeetCode 347 Top K Frequent Elements

摘要: Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. Solution 此题要求时间复杂度低于 $O(n\l 阅读全文

posted @ 2022-08-17 17:14 Blackzxy 阅读(11) 评论(0) 推荐(0) 编辑

MathProblem 38 Meeting at a restaurant problem

摘要: Two people arrive in a restaurant independently. Each arrives a random time between 5pm and 6pm, distributed uniformaly (no moment in this range is an 阅读全文

posted @ 2022-08-17 05:12 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑

MathProblem 37 Common birthday problem

摘要: What is the minimum number of people do you need, chosen at random, so that there is at least a 50% chance that at least two have the same birthday. A 阅读全文

posted @ 2022-08-17 04:55 Blackzxy 阅读(10) 评论(0) 推荐(0) 编辑

LeetCode 127 Word Ladder

摘要: A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk su 阅读全文

posted @ 2022-08-17 04:02 Blackzxy 阅读(12) 评论(0) 推荐(0) 编辑