摘要: Example 1: Input: nestedList = [[1,1],2,[1,1]] Output: 10 Explanation: Four 1's at depth 2, one 2 at depth 1. 1*2 + 1*2 + 2*1 + 1*2 + 1*2 = 10. 解法一 DF 阅读全文
posted @ 2022-03-11 22:45 aegeanchan 阅读(40) 评论(0) 推荐(0)
摘要: Construct a deep copy of the list. The linked list is represented in the input/output as a list of n nodes. Each node is represented as a pair of [val 阅读全文
posted @ 2022-03-10 02:58 aegeanchan 阅读(29) 评论(0) 推荐(0)
摘要: Implement pow(x, n), which calculates x raised to the power n (i.e., xn). Example 1: Input: x = 2.00000, n = 10 Output: 1024.00000 Example 2: Input: x 阅读全文
posted @ 2022-03-09 11:47 aegeanchan 阅读(46) 评论(0) 推荐(0)