上一页 1 2 3 4 5 6 7 8 ··· 18 下一页

2020年4月13日

摘要: We have a collection of stones, each stone has a positive integer weight. Each turn, we choose the two heaviest stones and smash them together. Suppos 阅读全文
posted @ 2020-04-13 05:14 codingEskimo 阅读(152) 评论(0) 推荐(0) 编辑

2020年4月12日

摘要: 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-04-12 10:56 codingEskimo 阅读(108) 评论(0) 推荐(0) 编辑

2020年4月11日

摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) Push element x onto stack. pop() Removes the 阅读全文
posted @ 2020-04-11 01:53 codingEskimo 阅读(101) 评论(0) 推荐(0) 编辑

2020年4月10日

摘要: Given two strings S and T, return if they are equal when both are typed into empty text editors. means a backspace character. Example 1: Example 2: Ex 阅读全文
posted @ 2020-04-10 05:19 codingEskimo 阅读(124) 评论(0) 推荐(0) 编辑

2020年4月8日

摘要: Given a non empty, singly linked list with head node head, return a middle node of linked list. If there are two middle nodes, return the second middl 阅读全文
posted @ 2020-04-08 22:08 codingEskimo 阅读(95) 评论(0) 推荐(0) 编辑

2020年4月7日

摘要: Given an integer array arr, count element x such that x + 1 is also in arr. If there're duplicates in arr, count them seperately. Example 1: Example 2 阅读全文
posted @ 2020-04-07 23:08 codingEskimo 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Given an array of strings, group anagrams together. Example: Note: All inputs will be in lowercase. The order of your output does not matter. 这道题就是用每个 阅读全文
posted @ 2020-04-07 08:29 codingEskimo 阅读(102) 评论(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 @ 2020-04-07 07:54 codingEskimo 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction 阅读全文
posted @ 2020-04-07 07:50 codingEskimo 阅读(106) 评论(0) 推荐(0) 编辑

2020年4月6日

摘要: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non zero elements. Example: Input: 阅读全文
posted @ 2020-04-06 10:47 codingEskimo 阅读(95) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 18 下一页

导航