摘要: 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: Input: S = 阅读全文
posted @ 2018-11-25 16:13 fatttcat 阅读(140) 评论(0) 推荐(0)
摘要: Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original array. Every ele 阅读全文
posted @ 2018-11-25 09:42 fatttcat 阅读(137) 评论(0) 推荐(0)
摘要: Sometimes people repeat letters to represent extra feeling, such as "hello" -> "heeellooo", "hi" -> "hiiii". Here, we have groups, of adjacent letters 阅读全文
posted @ 2018-11-25 05:34 fatttcat 阅读(132) 评论(0) 推荐(0)
摘要: There are N network nodes, labelled 1 to N. Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v  阅读全文
posted @ 2018-11-24 16:15 fatttcat 阅读(137) 评论(0) 推荐(0)
摘要: You are given an integer array sorted in ascending order (may contain duplicates), you need to split them into several subsequences, where each subseq 阅读全文
posted @ 2018-11-22 12:48 fatttcat 阅读(194) 评论(0) 推荐(0)
摘要: Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Note that it is th 阅读全文
posted @ 2018-11-22 11:35 fatttcat 阅读(163) 评论(0) 推荐(0)
摘要: Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two 阅读全文
posted @ 2018-11-22 04:12 fatttcat 阅读(137) 评论(0) 推荐(0)
摘要: There are N workers. The i-th worker has a quality[i] and a minimum wage expectation wage[i]. Now we want to hire exactly K workers to form a paid gro 阅读全文
posted @ 2018-11-21 18:35 fatttcat 阅读(141) 评论(0) 推荐(0)
摘要: You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th 阅读全文
posted @ 2018-11-21 03:34 fatttcat 阅读(132) 评论(0) 推荐(0)
摘要: Given a string S, check if the letters can be rearranged so that two characters that are adjacent to each other are not the same. If possible, output 阅读全文
posted @ 2018-11-20 16:02 fatttcat 阅读(140) 评论(0) 推荐(0)