自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(27)
  • 资源 (5)
  • 收藏
  • 关注

原创 LeetCode 148: Sort List (链表排序)

Sort a linked list in O(n log n) time using constant space complexity. 分析:题目要求对链表进行排序,如果采用插入、冒泡等排序方式,则时间复杂度将是O(n*n),达不到题目要求的O(n log n)的要求。O(n log n)复杂度的有快排和归并排序,对于链表来说,归并排序更适合一点。这样题目转换为将一个链表拆分成两...

2015-05-07 22:34:53 617

原创 LeetCode 219:Contains Duplicate II

Given an array of integers and an integer k, find out whether there there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and j is at most k.

2015-05-31 18:41:22 4176 1

原创 LeetCode 217:Contains Duplicate

Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is

2015-05-31 18:37:10 7572

原创 LeetCode 23: Merge K Sorted Lists

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.本题在上一题(LeetCode 21: Merge Two Sorted Lists)基础上再加深了一步,链表个数从两个改为K个。此题有如下几种解法:1、最简单的方法莫过于每次

2015-05-31 02:04:42 4171

原创 LeetCode 103:Binary Tree Zigzag Level Order Traversal

Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).For example:Given binary

2015-05-31 00:34:47 2621

原创 LeetCode 107:Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree {3,9,20,#,#,15,7},

2015-05-31 00:11:23 4296

原创 LeetCode 101:Binary Tree Level Order Traversal

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 tree {3,9,20,#,#,15,7}, 3 / \ 9 20

2015-05-31 00:02:15 632

原创 LeetCode 21:Merge Two Sorted Lists

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.题目分析:对两个

2015-05-27 23:08:48 4582

原创 LeetCode 215:Kth Largest Element in an Array

Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,Given [3,2,1,5,6,4] and k = 2, return 5.

2015-05-27 00:11:33 3748

原创 LeetCode 145:Binary Tree Postorder Traversal(后序遍历)

Given a binary tree, return the postorder traversal of its nodes' values.

2015-05-23 01:38:46 1437

原创 LeetCode 105:Construct Binary Tree from Preorder and Inorder Traversal

LeetCode 105:Given preorder and inorder traversal of a tree, construct the binary tree.给定一个二叉树的前序和中序遍历,重建这棵二叉树。

2015-05-20 23:09:41 1566

原创 LeetCode 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 assume that the version strings are non-empty and cont

2015-05-19 12:28:18 2371

原创 LeetCode 160 :Intersection of Two Linked Lists

Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists: A: a1 → a2 ↘

2015-05-14 22:06:04 2275

原创 LeetCode 100: Same Tree

Given 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 same value.分析:题目要求判

2015-05-14 12:46:24 775

原创 LeetCode 104: Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.分析;此题是求二叉树的深度,(无所谓最大深度),用递归的方法很容

2015-05-14 12:43:53 868

原创 LeetCode 136:Single Number I

Single NumberGiven an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you imple

2015-05-12 19:51:37 4272

原创 LeetCode 5:Longest Palindromic Substring

Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.分析:采用中心扩展法,每

2015-05-12 00:38:14 3223

原创 LeetCode 190 :Reverse Bits

Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 001110010

2015-05-11 23:18:48 1766

原创 LeetCode 191: Number of 1 Bits

Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 0000000000...

2015-05-09 13:35:38 503

原创 LeetCode 203:Remove Linked List Elements

Remove all elements from a linked list of integers that have value val.ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6,  val = 6Return: 1 --> 2 --> 3 --> 4 --> 5Credits:Special thank

2015-05-08 23:43:43 448

原创 LeetCode 205:Isomorphic Strings

Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with anot

2015-05-08 23:06:25 3782

原创 LeetCode 206:Reverse Linked List

Reverse a singly linked list.单向链表的翻转,代码如下: ListNode* reverseList(ListNode* head) { if(head == NULL || head->next == NULL) return head; ListNode Result(0);

2015-05-08 22:36:06 2467

原创 LeetCode 202:Happy Number

Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares

2015-05-08 22:12:21 2245

原创 LeetCode 204:Count Primes

Description:Count the number of prime numbers less than a non-negative number, n分析:题目要求计算小于N的所有素数的个数。所有主程序很简单:判断是否是素数字,如是,count++ (暂且忽略prim_vec, 后面判断素数时会用到): int countPrimes(int n) {

2015-05-08 18:40:26 4035

原创 LeetCode147: Insertion Sort List

Sort a linked list using insertion sort.本题很简单,用插入排序方法对链表进行排序。可以构建一个临时的链表,然后将待排序的链表的每一个节点插入到临时链表中。代码如下:/** * Definition for singly-linked list. * struct ListNode { * int val; *

2015-05-04 19:24:19 1349

原创 Leetcode 151:Reverse Words in a String

Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C programmers: Try to solve it in-place in

2015-05-03 01:01:01 694

原创 Leetcode 150:Evaluate Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples: ["2", "1"

2015-05-02 15:57:11 560

Monaco字体

Mac系统字体,等宽字体,最佳的编程字体

2016-01-06

效能桌面便签V1.66

即 时贴扔掉了传统的纸张和开始使用完全免费的高效粘滞便笺! “棒”笔记在桌面上,你可以阅读屏幕上的任何重要信息的时间。 可以节省你的钱,可以节省你的时间! 该软件允许不同的背景颜色,可选的渐变效果,必须为便条集。 您还可以自定义每个注意字体,将其设置为半透明因此它不能完全覆盖你的桌面背景或图标。 为了充分保护您的隐私,软件加密与不可逆转SHA算法登录密码,同时也加密数据文件。 此外,它提供了诸如如何管理组便签各种特殊功能,设置注意的重要性,跟踪创建时间和最后修改时间说明,增加附件说明,回收站,所以...不伤害等,使现在 试试。 你会爱她!

2010-10-18

Astyle 1.2.4 Windows

著名的代码自动缩进软件ASTYLE的源码,为1.24版本,支持C/C++/JAVA的各种格式的排版,支持自定的样式,功能强大.

2010-10-18

FsCapture 6.7 for Windows

 FSCapture是一款抓屏工具,附带的其他两个小功能:取色器和屏幕放大镜。对抓取的图像提供缩放、旋转、减切、颜色调整等功能。只要点点鼠标就能随心抓取屏幕上的任何东西,拖放支持可以直接从系统、浏览器或其他程序中导入图片。   取色器   现在网上各式各样的取色器应该不少了,包括之前一直用的蓝色经典推荐的ColorSPY, Firefox下还有一个专门的取色器扩展ColorZilla,这些都是很好的软件。但自从使用了FS Capture之后,这些我都很少用到了。原因很简单,各种取色软件的功能都大同小异,FS Capture非常小巧,既然有这样一个小软件能够包含取色器、屏幕放大镜和截屏的功能,为什么还要为这些功能而分开多个软件呢。FastStone Capture的取色支持RGB、Dec和Hex三种格式的色值,而且还有一个混色器,取到颜色之后可以再编辑。   屏幕放大镜   这确实是一个不错的功能,特别是现在我们已经习惯用DIV来对页面定位,DIV之间的对齐不像表 格那样容易控制,有时为了调整几个象素的偏差,不得不对着屏幕盯很久。有这样一个放大镜就方便多了。使用时只需点击一下FS Capture窗口上的放大镜图标,鼠标变成一个放大镜的样子,然后在需要放大的地方按下左键就可以了,就像手里真的拿着一个放大镜一样。可以设置放大倍 律,放大镜的尺寸,外观(圆形,矩形以及圆角矩形)以及是否平滑显示,按ESC键或单击右键可退出放大镜。   截屏   包括了全屏截取,当前活动窗口截取,截取选定区域,多边形截取和截取滚动页面等,基本上常用的都有了。特别是滚动截取,许多朋友为了这个功能不惜安装各种重量级的截屏软件,甚至四处下载各种软件的破解器——忘了说了,FS Capturte是一款免费软件!   图像浏览/编辑   FS Capture还包括快速浏览/编辑图像的功能,可以点击主窗口的“打开”图标快速打开一幅图片,进行简单的缩放、裁切、旋转、加文字等轻量级的操作。把网页中图片拖到FS Capture的窗口上,会快速打开图像浏览窗口。

2010-10-18

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除