摘要: 题目描述: 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 letter w 阅读全文
posted @ 2018-08-08 19:28 gszzsg 阅读(96) 评论(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 m 阅读全文
posted @ 2018-08-07 21:47 gszzsg 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 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 second 阅读全文
posted @ 2018-08-07 21:17 gszzsg 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Consider all the leaves of a binary tree. From left to right order, the values of those leaves form a leaf value sequence. For example, in the g 阅读全文
posted @ 2018-08-06 21:43 gszzsg 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given two strings representing two complex numbers. You need to return a string representing their multiplication. Note i2 = -1 according to the 阅读全文
posted @ 2018-08-05 10:56 gszzsg 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 题目描述: A string S of lowercase letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most 阅读全文
posted @ 2018-08-02 21:00 gszzsg 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 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 colu 阅读全文
posted @ 2018-08-01 18:57 gszzsg 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes s 阅读全文
posted @ 2018-07-31 20:07 gszzsg 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 题目描述: A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0 阅读全文
posted @ 2018-07-31 18:58 gszzsg 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a directed, acyclic graph of N nodes. Find all possible paths from node 0 to node N-1, and return them in any order. The graph is given as 阅读全文
posted @ 2018-07-30 22:23 gszzsg 阅读(113) 评论(0) 推荐(0) 编辑