leetcode笔记--1 two-sum
my answer:
出现的问题:倒数第二行and i !=s这种情况没有考虑进去,以后要思考全面些
leetcode笔记--1 two-sum的更多相关文章
- Leetcode 笔记 113 - Path Sum II
题目链接:Path Sum II | LeetCode OJ Given a binary tree and a sum, find all root-to-leaf paths where each ...
- Leetcode 笔记 112 - Path Sum
题目链接:Path Sum | LeetCode OJ Given a binary tree and a sum, determine if the tree has a root-to-leaf ...
- LeetCode 笔记27 Two Sum III - Data structure design
Design and implement a TwoSum class. It should support the following operations: add and find. add - ...
- leetcode笔记:Range Sum Query - Mutable
一. 题目描写叙述 Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), ...
- Leetcode 笔记 110 - Balanced Binary Tree
题目链接:Balanced Binary Tree | LeetCode OJ Given a binary tree, determine if it is height-balanced. For ...
- Leetcode 笔记 100 - Same Tree
题目链接:Same Tree | LeetCode OJ Given two binary trees, write a function to check if they are equal or ...
- Leetcode 笔记 99 - Recover Binary Search Tree
题目链接:Recover Binary Search Tree | LeetCode OJ Two elements of a binary search tree (BST) are swapped ...
- Leetcode 笔记 98 - Validate Binary Search Tree
题目链接:Validate Binary Search Tree | LeetCode OJ Given a binary tree, determine if it is a valid binar ...
- Leetcode 笔记 101 - Symmetric Tree
题目链接:Symmetric Tree | LeetCode OJ Given a binary tree, check whether it is a mirror of itself (ie, s ...
- Leetcode 笔记 36 - Sudoku Solver
题目链接:Sudoku Solver | LeetCode OJ Write a program to solve a Sudoku puzzle by filling the empty cells ...
随机推荐
- 编程思想的理解(POP,OOP,SOA,AOP)
http://blog.csdn.net/hawksoft/article/details/7021435 1)POP--面向过程编程(Process-oriented programming ):面 ...
- gluon实现softmax分类FashionMNIST
from mxnet import gluon,init from mxnet.gluon import loss as gloss,nn from mxnet.gluon import data a ...
- HashMap对HashCode碰撞的处理
先说Java之外的,什么是拉链法?怎么解决冲突的: 拉链法解决冲突的做法是:将所有关键字为同义词的结点链接在同一个单链表中. 若选定的散列表长度为m,则可将散列表定义为一个由m个头指针组成的指针数组t ...
- caffe 学习(1) —— Classification: Instant Recognition with Caffe
学习地址http://nbviewer.jupyter.org/github/BVLC/caffe/blob/master/examples/00-classification.ipynb 1.安装m ...
- CSS3 小会
-webkit-perspective:800px; 其子元素获得3D元素支持,这里是设置子元素距离试图的位置:若设为0 则不支持子元素获得3d效果,不支持透视. 常与transform:rota ...
- Javascript文件中的控制器I
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content=&q ...
- 小白袍 -- Chapter 1 Java中的Encode与Decode
前几天做一个邮件发送功能,一些常用信息配置在properties文件中,通过prop.getProperty(key)来获取配置的信息,结果配置文件中是用中文写的,邮件发送成功后,邮箱中的激活链接是乱 ...
- Autofac4.0以上的版本通过json配置文件方式实现IOC的MVC5设置
我们知道java用到了spring来实现IOC,而我们学习的.net也有.net spring.但是.net spring现在没人维护了,进公司后发现公司使用到了autofac.但是用的是3.X的版本 ...
- 使用js获取表单元素的值
function getParams(formName) { var frmMain = document.getElementById(formName)?document.getElementBy ...
- OGG抽取进程异常问题排查一例
1.问题现象抽取进程常常running,但是没有新产生trail文件,lag比较大 GGSCI (xxxdb) > info all Program Status Group Lag at Ch ...