上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 54 下一页
摘要: Given an array A of integers, return the length of the longest arithmetic subsequence in A. Recall that a subsequence of A is a list A[i_1], A[i_2], . 阅读全文
posted @ 2020-02-03 11:42 北叶青藤 阅读(192) 评论(0) 推荐(0)
摘要: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2020-02-03 02:10 北叶青藤 阅读(168) 评论(0) 推荐(0)
摘要: We are given a binary tree (with root node root), a target node, and an integer value K. Return a list of the values of all nodes that have a distance 阅读全文
posted @ 2020-02-02 23:55 北叶青藤 阅读(194) 评论(0) 推荐(0)
摘要: Given a 2D grid of 0s and 1s, return the number of elements in the largest square subgrid that has all 1s on its border, or 0 if such a subgrid doesn' 阅读全文
posted @ 2020-02-02 12:44 北叶青藤 阅读(232) 评论(0) 推荐(0)
摘要: Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except n 阅读全文
posted @ 2020-01-31 09:51 北叶青藤 阅读(160) 评论(0) 推荐(0)
摘要: Given an array A of 0s and 1s, we may change up to K values from 0 to 1. Return the length of the longest (contiguous) subarray that contains only 1s. 阅读全文
posted @ 2020-01-31 00:05 北叶青藤 阅读(158) 评论(0) 推荐(0)
摘要: In an alien language, surprisingly they also use english lowercase letters, but possibly in a different order. The order of the alphabet is some permu 阅读全文
posted @ 2020-01-30 14:39 北叶青藤 阅读(287) 评论(0) 推荐(0)
摘要: Given a 01 matrix, find the longest line of consecutive 1 in the matrix. The line could be horizontal, vertical, diagonal or anti-diagonal. Example 1: 阅读全文
posted @ 2019-11-19 04:35 北叶青藤 阅读(211) 评论(0) 推荐(0)
摘要: 问题一: pi表示取第i个单,di表示送第i个单。di不能在pi的前面。给一个取单送单的顺序,问是否是valid顺序。 1 public boolean isValidOrderList(List<String> list) { 2 Set<String> set = new HashSet<>() 阅读全文
posted @ 2019-11-18 01:56 北叶青藤 阅读(467) 评论(0) 推荐(0)
摘要: Google Calendar, Outlook, iCal has been banned from your company! So an intrepid engineer has decided to roll their own implementation. Unfortunately 阅读全文
posted @ 2019-11-17 08:05 北叶青藤 阅读(600) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 54 下一页