摘要: Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar 阅读全文
posted @ 2020-07-20 22:00 Schwifty 阅读(117) 评论(0) 推荐(0)
摘要: Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwe 阅读全文
posted @ 2020-07-20 10:45 Schwifty 阅读(123) 评论(0) 推荐(0)
摘要: Given a tree (i.e. a connected, undirected graph that has no cycles) consisting of n nodes numbered from 0 to n - 1 and exactly n - 1 edges. The root  阅读全文
posted @ 2020-07-20 06:50 Schwifty 阅读(229) 评论(0) 推荐(0)
摘要: Given numBottles full water bottles, you can exchange numExchange empty water bottles for one full water bottle. The operation of drinking a full wate 阅读全文
posted @ 2020-07-20 01:02 Schwifty 阅读(268) 评论(0) 推荐(0)