给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的 两个 整数。 你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。 示例: ...
分类:
其他好文 时间:
2018-12-03 22:08:35
阅读次数:
222
1. Two Sum 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 wo ...
分类:
其他好文 时间:
2018-11-12 11:14:27
阅读次数:
100
leetcode1 twosum approach2: https://leetcode.com/problems/two-sum/solution/# Map-doc->hashmap: https://docs.oracle.com/javase/8/docs/api/java/util/Has ...
分类:
移动开发 时间:
2018-10-15 23:14:45
阅读次数:
253
1、两数之和:给定一个整数数组和一个目标值,找出数组中和为目标值的两个数。 2、两数相加:给定两个非空链表来表示两个非负整数。位数按照逆序方式存储,它们的每个节点只存储单个数字。将两数相加返回一个新的链表。 3、无重复字符的最长子串:给定一个字符串,找出不含有重复字符的最长子串的长度。 4、两个排序 ...
分类:
其他好文 时间:
2018-09-29 20:26:37
阅读次数:
130
1 class Solution { 2 public boolean isMatch(String s, String p) { 3 if (s == null || p == null) { 4 return false; 5 } 6 boolean[][] memo = new boolean ...
分类:
其他好文 时间:
2018-08-02 20:37:28
阅读次数:
169
1、Path Sum 题目: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals t ...
分类:
其他好文 时间:
2018-06-24 23:51:00
阅读次数:
252
leetcode1 给定一个整数数组和一个目标值,找出数组中和为目标值的两个数。 你可以假设每个输入只对应一种答案,且同样的元素不能被重复利用。 示例: ...
分类:
编程语言 时间:
2018-06-01 21:10:27
阅读次数:
176
1. 问题描述 LeetCode第226题,题目名称为二叉树翻转 triv·i·a : details, considerations, or pieces of information of little importance or value. 翻译为细节,无用的细节 2. 思考 2.1 这类传 ...
分类:
编程语言 时间:
2018-01-14 13:48:08
阅读次数:
108