上一页 1 ··· 3 4 5 6 7 8 下一页

2014年6月18日

leetcode - Balanced Binary Tree

摘要: 题目:Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary ... 阅读全文

posted @ 2014-06-18 21:36 laihaiteng 阅读(172) 评论(0) 推荐(0)

2014年6月16日

leetcode - Binary Tree Preorder Traversal && Binary Tree Inorder Traversal && Binary Tree Postorder Traversal

摘要: 简单来说,就是二叉树的前序、中序、后序遍历,包括了递归和非递归的方法前序遍历(注释中的为递归版本): 1 #include 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 struct TreeNode 9 {1... 阅读全文

posted @ 2014-06-16 22:05 laihaiteng 阅读(158) 评论(0) 推荐(0)

2014年6月15日

leetcode - Unique Binary Search Trees

摘要: 题目:Unique Binary Search TreesGivenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a... 阅读全文

posted @ 2014-06-15 11:53 laihaiteng 阅读(265) 评论(0) 推荐(0)

2014年6月13日

leetcode - Same Tree

摘要: 题目: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 ... 阅读全文

posted @ 2014-06-13 16:18 laihaiteng 阅读(173) 评论(0) 推荐(0)

2014年6月9日

leetcode - Maximum Depth of Binary Tree

摘要: 题目:Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the ro... 阅读全文

posted @ 2014-06-09 17:04 laihaiteng 阅读(181) 评论(0) 推荐(0)

2014年6月8日

leetcode - Single Number

摘要: 今天开始刷leetcode上的题,争取校招前刷过一遍,从AC率最高的题目开始刷,不废话了,看题题目:Single NumberGiven an array of integers, every element appearstwiceexcept for one. Find that single ... 阅读全文

posted @ 2014-06-08 22:25 laihaiteng 阅读(168) 评论(0) 推荐(0)

2014年3月3日

快速排序算法实现

摘要: 快速排序算法是比较常用的一种排序算法,在所有同数量级(O(nlogn))的排序算法中,其平均性能最好。但是,若初始记录序列按关键字有序或基本有序时,快速排序将蜕化为气泡排序,其时间复杂度为O(n^2),可以通过改良该算法来完善这一问题。快速排序算法的一般实现: 1 #include 2 3 #d... 阅读全文

posted @ 2014-03-03 15:18 laihaiteng 阅读(231) 评论(0) 推荐(0)

k-th Order Statistic算法实现(寻找第k小的数)

摘要: 在一组随机排列的数中找出第k小的,这个元素称为k-th Order Statistic。能想到的最直观的算法肯定是先把这些数排序然后取第k个,时间复杂度和排序算法相同,可以是Θ(nlgn)。但它也有平均情况下时间复杂度是Θ(n)的算法,将快速排序算法稍加修改就可以解决这个问题。基本思路: 1 /* ... 阅读全文

posted @ 2014-03-03 15:11 laihaiteng 阅读(999) 评论(0) 推荐(0)

2014年1月28日

2014年:互联网IT待遇【转载】

摘要: 注:本文所列薪酬待遇,如无特殊说明,均为京内(北京)研发类岗位硕士研究生待遇。一、民企1.百度 13k*14.6,special 14~17k*14.6 开发类 13K*14.6 (2014) 测试类、前端类 12K*14.6 (2014)2.腾讯 11.5k*16,special 12~14k... 阅读全文

posted @ 2014-01-28 18:04 laihaiteng 阅读(257) 评论(0) 推荐(0)

2013年:各大IT公司待遇【转载】

摘要: 1:本人西电通院2013届毕业硕士,根据今年找工作的情况以及身边同学的汇总,总结各大公司的待遇如下,吐血奉献给各位学弟学妹,公司比较全,你想去的公司不在这里面,基本上是无名小公司了;但无名小公司有时也很给力。以下绝对是各大公司2013届校招的数据,少数几个是2012 2011的数据,都已经特别注明,... 阅读全文

posted @ 2014-01-28 17:59 laihaiteng 阅读(197) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 下一页

导航