
LeetCode
bolixin36
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode-144.Binary TreePreorder Transversal
144. 二叉树的前序遍历 Given a binary tree, return the preorder traversal of its nodes’ values. 给定一棵二叉树,返回其节点值的前序遍历。 For example: Given binary tree [1,null,2,3], 1 \ 2 / 3 return [1,...原创 2018-04-09 17:18:56 · 299 阅读 · 0 评论 -
LeetCode-001.Tow Sum
1. 两数之和 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 exactly one solu...原创 2018-04-09 19:18:42 · 180 阅读 · 0 评论 -
LeetCode-094.Binary Tree Inorder Traversal
94. 中序遍历二叉树Given a binary tree, return the inorder traversal of its nodes’ values. 给定一个二叉树,返回其中序遍历。 For example: Given binary tree [1,null,2,3], 1 \ 2 / 3return [1,3,2].Note: Recur原创 2018-04-09 17:53:27 · 203 阅读 · 0 评论 -
LeetCode-145.Binary Tree Postorder Traversal
Given a binary tree, return the postorder traversal of its nodes’ values. 给定一棵二叉树,返回其节点值的后序遍历。 For example: Given binary tree [1,null,2,3], 1 \ 2 / 3 return [3,2,1]. Note: R...原创 2018-04-09 18:31:25 · 237 阅读 · 0 评论 -
LeetCode-102.Binary Tree Level Order Traversal
102. 二叉树的层次遍历 Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level). 给定一个二叉树,返回其按层次遍历的节点值。 (即逐层地,从左到右访问)。 For example: Given binary t...原创 2018-04-09 18:59:31 · 207 阅读 · 0 评论 -
LeetCode-414.Third Maximum Number
414. 第三大的数 Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n). 给定一个非空数组,返回此数组中第三...原创 2018-04-09 19:42:45 · 194 阅读 · 0 评论 -
手撕代码-基础排序算法
0.交换元素方法 private void Swap(ref int a, ref int b) { var temp = a; a = b; b = temp; } 1.冒泡排序 public int[] BubbleSort(int[] originInts) ...原创 2018-04-09 20:39:12 · 533 阅读 · 0 评论 -
LeetCode-148.Sort List
Sort a linked list in O(n log n) time using constant space complexity. /** * Definition for singly-linked list. * public class ListNode { * public int val; * public ListNode next; * ...原创 2018-04-09 22:48:26 · 117 阅读 · 0 评论 -
LeetCode-053.Maximum Subarray
53. 最大子序和 Find the contiguous subarray within an array (containing at least one number) which has the largest sum. 给定一个序列(至少含有 1 个数),从该序列中寻找一个连续的子序列,使得子序列的和最大。 For example, given the array [-2,1,-3...原创 2018-04-09 22:54:17 · 137 阅读 · 0 评论