上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 76 下一页
摘要: Given an array of integers arr and an integer k. A value arr[i] is said to be stronger than a value arr[j] if |arr[i] - m| > |arr[j] - m| where m is t 阅读全文
posted @ 2020-06-09 04:34 Schwifty 阅读(242) 评论(0) 推荐(0)
摘要: Given the array nums consisting of 2n elements in the form [x1,x2,...,xn,y1,y2,...,yn]. Return the array in the form [x1,y1,x2,y2,...,xn,yn]. Example 阅读全文
posted @ 2020-06-09 04:14 Schwifty 阅读(317) 评论(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 @ 2020-06-06 11:00 Schwifty 阅读(168) 评论(0) 推荐(0)
摘要: Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is < 5100 阅读全文
posted @ 2020-06-06 10:29 Schwifty 阅读(204) 评论(0) 推荐(0)
摘要: Given an array w of positive integers, where w[i] describes the weight of index i, write a function pickIndex which randomly picks an index in proport 阅读全文
posted @ 2020-06-06 05:00 Schwifty 阅读(81) 评论(0) 推荐(0)
摘要: Given an 2D board, count how many battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. You may ass 阅读全文
posted @ 2020-06-05 11:16 Schwifty 阅读(138) 评论(0) 推荐(0)
摘要: Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both 阅读全文
posted @ 2020-06-05 10:59 Schwifty 阅读(192) 评论(0) 推荐(0)
摘要: Given two strings text1 and text2, return the length of their longest common subsequence. A subsequence of a string is a new string generated from the 阅读全文
posted @ 2020-06-05 03:25 Schwifty 阅读(82) 评论(0) 推荐(0)
摘要: Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of th 阅读全文
posted @ 2020-06-04 11:46 Schwifty 阅读(137) 评论(0) 推荐(0)
摘要: Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between i and j equals 阅读全文
posted @ 2020-06-03 23:16 Schwifty 阅读(140) 评论(0) 推荐(0)
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 76 下一页