摘要: Given n pairs of parentheses, write a function to generate all combinations of well formed parentheses. For example, given n = 3, a solution set is: [ 阅读全文
posted @ 2018-10-08 13:00 bernieloveslife 阅读(165) 评论(0) 推荐(0) 编辑
摘要: A robot on an infinite grid starts at point (0, 0) and faces north. The robot can receive one of three possible types of commands: 2: turn left 90 deg 阅读全文
posted @ 2018-10-08 13:00 bernieloveslife 阅读(307) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums = [ 2, 0, 3, 5, 2, 1] sumRan 阅读全文
posted @ 2018-10-08 13:00 bernieloveslife 阅读(137) 评论(0) 推荐(0) 编辑
摘要: A message containing letters from A Z is being encoded to numbers using the following mapping: 'A' 1 'B' 2 ... 'Z' 26 Given a non empty string contain 阅读全文
posted @ 2018-10-08 13:00 bernieloveslife 阅读(262) 评论(0) 推荐(0) 编辑
摘要: Given an array of strings, group anagrams together. Example: Input: ["eat", "tea", "tan", "ate", "nat", "bat"], Output: [ ["ate","eat","tea"], ["nat", 阅读全文
posted @ 2018-10-08 13:00 bernieloveslife 阅读(105) 评论(0) 推荐(0) 编辑