摘要: You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a 阅读全文
posted @ 2019-09-04 17:19 xuyy_isee 阅读(166) 评论(0) 推荐(0) 编辑
摘要: A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy 阅读全文
posted @ 2019-09-04 16:12 xuyy_isee 阅读(124) 评论(0) 推荐(0) 编辑
摘要: You are given two non empty linked lists representing two non negative integers. The most significant digit comes first and each of their nodes contai 阅读全文
posted @ 2019-09-04 15:18 xuyy_isee 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 时间限制:2秒;空间限制:65536K 题目描述 为了找到自己满意的工作,牛牛收集了每种工作的难度和报酬。牛牛选工作的标准是在难度不超过自身能力值的情况下,牛牛选择报酬最高的工作。在牛牛选定了自己的工作后,牛牛的小伙伴们来找牛牛帮忙选工作,牛牛依然使用自己的标准来帮助小伙伴们。牛牛的小伙伴太多了,于 阅读全文
posted @ 2019-08-09 21:12 xuyy_isee 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 输入描述: 输入为两个非负数,每个数满足下面要求: (1)仅包含0 9的数字,0或1个小数点“.”; (2)长度不大于200; (3)不需判错。 输出描述: 输出为两数之和 1.思考 一开始把问题想得太简单,可以直接将string转换为int/double,然后进行简单的数字相加。思考过程中出现两个 阅读全文
posted @ 2019-08-09 10:51 xuyy_isee 阅读(373) 评论(0) 推荐(0) 编辑
摘要: Given an array A of positive lengths, return the largest perimeter of a triangle with non zero area, formed from 3 of these lengths. If it is impossib 阅读全文
posted @ 2019-08-05 15:46 xuyy_isee 阅读(154) 评论(0) 推荐(0) 编辑
摘要: You have a list of points in the plane. Return the area of the largest triangle that can be formed by any 3 of the points. Example: Input: points = [[ 阅读全文
posted @ 2019-08-05 14:40 xuyy_isee 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2019-08-01 16:42 xuyy_isee 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Given two arrays of integers with equal lengths, return the maximum value of: |arr1[i] arr1[j]| + |arr2[i] arr2[j]| + |i j| where the maximum is taken 阅读全文
posted @ 2019-07-24 16:16 xuyy_isee 阅读(377) 评论(0) 推荐(0) 编辑
摘要: We distribute some number of candies, to a row of n = num_people people in the following way: We then give 1 candy to the first person, 2 candies to t 阅读全文
posted @ 2019-07-24 11:29 xuyy_isee 阅读(163) 评论(0) 推荐(0) 编辑