- 博客(17)
- 问答 (1)
- 收藏
- 关注
转载 leetcode之合并已经排序好的数组
88. Merge Sorted Array Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:You may assume that nums1 has enough space (size that is gre
2016-10-18 20:36:21 1382
转载 leetcode之比较两个version的大小
165. Compare Version Numbers Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0.You may assum
2016-10-19 22:55:21 684
转载 leetcode之返回交叉的节点
160. Intersection of Two Linked ListWrite a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A:
2016-10-19 22:19:50 421
转载 leetcode求栈中最小的元素
55. Min Stack QuestionEditorial Solution My SubmissionsDesign a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stac
2016-10-19 21:17:09 771
转载 leetcode路径的和是否等于某一个数
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 the given sum.For example:Given the below binary tree and sum
2016-10-18 22:33:19 360
转载 leetcode的判断一个二叉树是否是平衡树
110. Balanced Binary Tree 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 depth of th
2016-10-18 22:10:01 1781
转载 leetcode之判断是否是同一棵树
100. Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the s
2016-10-18 21:13:07 1329
转载 leetcode 子串位置的寻找
28. Implement strStr()Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Subscribe to see which companies a
2016-10-13 21:18:12 494
转载 leetcode 移除排好序的重复的数字
26. Remove Duplicates from Sorted Array QuestionEditorial Solution My SubmissionsTotal Accepted: 166298Total Submissions: 476995Difficulty: EasyContributors: AdminGiven a sorted array, re
2016-10-13 20:48:03 520
转载 leetcode交换相邻的两个节点的值
Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. Y
2016-10-13 20:35:04 1059
转载 leetcode合并两个已经排序的链表
21. Merge Two Sorted Lists Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Subscribe
2016-10-13 19:36:22 784
转载 合法的括号匹配
20. Valid ParentheseGiven a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct ord
2016-10-12 22:02:17 974
转载 leetcode刪除倒數第几个节点
19. Remove Nth Node From End of List Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2.
2016-10-12 20:08:18 305
转载 leetcode回文
9. Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (ie, -1)
2016-10-11 21:43:21 412
转载 leetcode中字符串转化为数字
8. String to Integer (atoiImplement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask you
2016-10-11 21:23:38 1137
转载 leetcode中zigzag实现;
6. ZigZag Conversion The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibili
2016-10-10 21:24:41 560
转载 leetcode相加和的問題
之前一直在思考是就在当前目录下写,还是直接开个目录写,想了想,还是直接就在hdu下面写吧,反正都是算法。1. Two SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that
2016-10-10 21:02:43 198
空空如也
android4.43为摄像头添加闪光灯从应用到驱动的调用过程。
2016-10-26
TA创建的收藏夹 TA关注的收藏夹
TA关注的人