摘要: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
posted @ 2018-10-17 19:12 一丝清风一抹红尘 阅读(98) 评论(0) 推荐(0) 编辑
摘要: You are given a license key represented as a string S which consists only alphanumeric character and dashes. The string is separated into N+1 groups b 阅读全文
posted @ 2018-10-17 18:59 一丝清风一抹红尘 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums, write a method that returns the "pivot" index of this array. We define the pivot index as the index where the sum of 阅读全文
posted @ 2018-10-17 17:59 一丝清风一抹红尘 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the dep 阅读全文
posted @ 2018-10-17 14:48 一丝清风一抹红尘 阅读(119) 评论(0) 推荐(0) 编辑
摘要: mplement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front 阅读全文
posted @ 2018-10-17 14:38 一丝清风一抹红尘 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2018-10-17 14:22 一丝清风一抹红尘 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most significant d 阅读全文
posted @ 2018-10-17 14:06 一丝清风一抹红尘 阅读(128) 评论(0) 推荐(0) 编辑
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2018-10-17 13:07 一丝清风一抹红尘 阅读(98) 评论(0) 推荐(0) 编辑
摘要: Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a 阅读全文
posted @ 2018-10-17 12:22 一丝清风一抹红尘 阅读(139) 评论(0) 推荐(0) 编辑