摘要: Problem : 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 se 阅读全文
posted @ 2020-04-20 23:56 littledy 阅读(83) 评论(0) 推荐(0) 编辑
摘要: Problem : Given a matrix A, return the transpose of A. The transpose of a matrix is the matrix flipped over it's main diagonal, switching the row and 阅读全文
posted @ 2020-04-20 23:35 littledy 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Problem : Let's call an array A a mountain if the following properties hold: A.length = 3 There exists some 0 A[i+1] ... A[A.length 1] Given an array 阅读全文
posted @ 2020-04-20 23:21 littledy 阅读(86) 评论(0) 推荐(0) 编辑
摘要: Problem : There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, ..., N 1, and each room may have some keys to access 阅读全文
posted @ 2020-04-20 22:33 littledy 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Problem : Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image. To flip an image horizontal 阅读全文
posted @ 2020-04-20 18:46 littledy 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Problem : Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string. Examp 阅读全文
posted @ 2020-04-20 18:31 littledy 阅读(84) 评论(0) 推荐(0) 编辑
摘要: Problem : A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to c 阅读全文
posted @ 2020-04-20 17:42 littledy 阅读(88) 评论(0) 推荐(0) 编辑
摘要: Problem : We are given head, the head node of a linked list containing unique integer values. We are also given the list G, a subset of the values in 阅读全文
posted @ 2020-04-20 17:21 littledy 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Problem : A website domain like "discuss.leetcode.com" consists of various subdomains. At the top level, we have "com", at the next level, we have "le 阅读全文
posted @ 2020-04-20 17:10 littledy 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Problem : In a 2 dimensional array grid, each value grid[i][j] represents the height of a building located there. We are allowed to increase the heigh 阅读全文
posted @ 2020-04-20 16:42 littledy 阅读(98) 评论(0) 推荐(0) 编辑
摘要: Problem : We are to write the letters of a given string S, from left to right into lines. Each line has maximum width 100 units, and if writing a lett 阅读全文
posted @ 2020-04-20 16:17 littledy 阅读(84) 评论(0) 推荐(0) 编辑
摘要: Problem : International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: "a" maps to ". 阅读全文
posted @ 2020-04-20 15:54 littledy 阅读(83) 评论(0) 推荐(0) 编辑
摘要: Problem : Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all pos 阅读全文
posted @ 2020-04-20 11:42 littledy 阅读(74) 评论(0) 推荐(0) 编辑
摘要: Problem : Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary repr 阅读全文
posted @ 2020-04-20 11:20 littledy 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Problem : A matrix is Toeplitz if every diagonal from top left to bottom right has the same element. Now given an M x N matrix, return True if and onl 阅读全文
posted @ 2020-04-20 11:16 littledy 阅读(96) 评论(0) 推荐(0) 编辑