xinyu04

导航

2022年7月30日 #

MathProblem 13 Wine and cigar problem

摘要: Joe's happiness is proportional to the function $w^2*c$ ($w$ squared * $c$), where $w$ stands for daily consumption of glasses of wine, and $c$ stands 阅读全文

posted @ 2022-07-30 23:45 Blackzxy 阅读(14) 评论(0) 推荐(0) 编辑

LeetCode 238 Product of Array Except Self 前缀积&后缀积

摘要: Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. The produc 阅读全文

posted @ 2022-07-30 20:09 Blackzxy 阅读(11) 评论(0) 推荐(0) 编辑

LeetCode 82 Remove Duplicates from Sorted List II 链表删除重复元素

摘要: Given the head of a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Return the 阅读全文

posted @ 2022-07-30 17:11 Blackzxy 阅读(4) 评论(0) 推荐(0) 编辑

MathProblem 12 Three men, a bell boy, and a motel room problem

摘要: Three men walk into a motel and ask for a room. The desk clerk says a room is 30 so each man pays 10 towards the cost. Later, the clerk realizes he ma 阅读全文

posted @ 2022-07-30 05:34 Blackzxy 阅读(19) 评论(0) 推荐(0) 编辑

MathProblem 9 Chicken McNugget problem

摘要: At McDonalds you can order Chicken McNuggets in boxes of $6$, $9$, and $20$. What is the largest number such that you can not order any combination of 阅读全文

posted @ 2022-07-30 05:04 Blackzxy 阅读(41) 评论(0) 推荐(0) 编辑

LeetCode 152 Maximum Product Subarray 思维

摘要: Given an integer array nums, find a contiguous non-empty subarray within the array that has the largest product, and return the product. The test case 阅读全文

posted @ 2022-07-30 03:09 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑