08 2021 档案

摘要:You are given a string s and an integer k, a k duplicate removal consists of choosing k adjacent and equal letters from s and removing them, causing t 阅读全文
posted @ 2021-08-31 23:51 Grandyang 阅读(921) 评论(0) 推荐(0) 编辑
摘要:There is Client-Side Library under the Add when I right click the project on Visual Studio for Mac. So I searched on Google, and find this post LibMan 阅读全文
posted @ 2021-08-31 13:02 Grandyang 阅读(213) 评论(0) 推荐(0) 编辑
摘要:You are given two strings s and t of the same length. You want to change s to t. Changing the i-th character of s to i-th character of t costs |s[i] - 阅读全文
posted @ 2021-08-29 02:55 Grandyang 阅读(441) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers arr, write a function that returns true if and only if the number of occurrences of each value in the array is unique. Exam 阅读全文
posted @ 2021-08-29 02:05 Grandyang 阅读(637) 评论(0) 推荐(0) 编辑
摘要:Design a Skiplist without using any built-in libraries. A skiplist is a data structure that takes O(log(n)) time to add, erase and search. Comparing w 阅读全文
posted @ 2021-08-28 09:09 Grandyang 阅读(685) 评论(0) 推荐(0) 编辑
摘要:There are n items each belonging to zero or one of m groups where group[i] is the group that the i-th item belongs to and it's equal to -1 if the i-th 阅读全文
posted @ 2021-08-25 23:14 Grandyang 阅读(589) 评论(0) 推荐(0) 编辑
摘要:You are given a string s, and an array of pairs of indices in the string pairs where pairs[i] = [a, b] indicates 2 indices(0-indexed) of the string. Y 阅读全文
posted @ 2021-08-23 07:24 Grandyang 阅读(1068) 评论(0) 推荐(0) 编辑
摘要:An ugly number is a positive integer that is divisible by a, b, or c. Given four integers n, a, b, and c, return the nth ugly number. Example 1: Input 阅读全文
posted @ 2021-08-22 07:18 Grandyang 阅读(617) 评论(0) 推荐(0) 编辑
摘要:Given an array of distinct integers arr, find all pairs of elements with the minimum absolute difference of any two elements. Return a list of pairs i 阅读全文
posted @ 2021-08-19 21:43 Grandyang 阅读(1558) 评论(0) 推荐(0) 编辑
摘要:There are n servers numbered from 0 to n - 1 connected by undirected server-to-server connections forming a network where connections[i] = [ai, bi] re 阅读全文
posted @ 2021-08-19 21:10 Grandyang 阅读(1597) 评论(0) 推荐(0) 编辑
摘要:Given an integer array arr and an integer k, modify the array by repeating it k times. For example, if arr = [1, 2] and k = 3 then the modified array 阅读全文
posted @ 2021-08-16 06:13 Grandyang 阅读(452) 评论(0) 推荐(0) 编辑
摘要:You are given a string s that consists of lower case English letters and brackets. Reverse the strings in each pair of matching parentheses, starting  阅读全文
posted @ 2021-08-15 04:48 Grandyang 阅读(612) 评论(0) 推荐(0) 编辑
摘要:Given a string text, you want to use the characters of text to form as many instances of the word "balloon" as possible. You can use each character in 阅读全文
posted @ 2021-08-12 23:10 Grandyang 阅读(492) 评论(0) 推荐(0) 编辑
摘要:Given two integer arrays arr1 and arr2, return the minimum number of operations (possibly zero) needed to make arr1 strictly increasing. In one operat 阅读全文
posted @ 2021-08-11 12:13 Grandyang 阅读(785) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers, return the maximum sum for a non-empty subarray (contiguous elements) with at most one element deletion. In other words, y 阅读全文
posted @ 2021-08-09 01:37 Grandyang 阅读(663) 评论(0) 推荐(0) 编辑
摘要:Given a date, return the corresponding day of the week for that date. The input is given as three integers representing the day, month and year respec 阅读全文
posted @ 2021-08-08 02:25 Grandyang 阅读(603) 评论(0) 推荐(0) 编辑
摘要:A bus has n stops numbered from 0 to n - 1 that form a circle. We know the distance between all pairs of neighboring stops where distance[i] is the di 阅读全文
posted @ 2021-08-05 21:51 Grandyang 阅读(435) 评论(0) 推荐(0) 编辑
摘要:With respect to a given puzzle string, a word is valid if both the following conditions are satisfied: word contains the first letter of puzzle. For e 阅读全文
posted @ 2021-08-03 21:41 Grandyang 阅读(667) 评论(0) 推荐(0) 编辑
摘要:Given a string s, we make queries on substrings of s. For each query queries[i] = [left, right, k], we may rearrange the substring s[left], ..., s[rig 阅读全文
posted @ 2021-08-02 10:23 Grandyang 阅读(455) 评论(0) 推荐(0) 编辑

Fork me on GitHub