自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

代码菌的blog

Just for fun

  • 博客(21)
  • 资源 (3)
  • 收藏
  • 关注

原创 LeetCode268——Missing Number相濡以沫不如相忘于江湖

Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For example,Given nums = [0, 1, 3] return 2.Note:Your algorithm shoul

2015-08-24 21:46:34 3520

原创 LeetCode263——Ugly Number

Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly si

2015-08-24 21:35:15 1243

原创 LeetCode187——Repeated DNA Sequences

All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated sequences within the DNA.Wri

2015-08-18 23:47:02 1228

原创 LeetCode257——Binary Tree Paths

Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:["1->2->5", "1->3"]实现:

2015-08-17 21:51:08 4390

原创 LeetCode258——Add Digits

Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has on

2015-08-17 00:11:05 5092

原创 LeetCode241——Different Ways to Add Parentheses

Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are+, - and *.Example 1I

2015-08-13 23:55:55 2583

原创 LeetCode120——Triangle

Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [3,4], [

2015-08-13 20:32:26 1624

原创 LeetCode222——Count Complete Tree Nodes

Given a complete binary tree, count the number of nodes.Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, except possibly the last, is completely fille

2015-08-12 23:56:30 1813

原创 生如夏花之绚烂,Lisp风格的Lialang诞生了!

赫赫温风,炎炎夏日,lianglang悄然来的这个星球。它用Lua写的个简单的语言,仿照Racket语法,实现了以下功能:基本数据类型基本的操作符运算: +-*/%基本的关系运算: > 基本的逻辑运算: and or notif流程控制语句。定义常量,定义函数。lambda表达式闭包,柯里化,可以传函数,返回函数,函数是一等公民额,没了,感觉功能太少了。木有办法,还有很多其

2015-08-11 09:47:33 1120

原创 LeetCode240——Search a 2D Matrix II

Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted in ascending from left to right.Integers in

2015-08-09 22:09:09 870

原创 LeetCode224——Basic Calculator

Implement a basic calculator to evaluate a simple expression string.The expression string may contain open ( and closing parentheses ), the plus + or minus sign -, non-negative integers and em

2015-08-08 14:44:03 904

原创 LeetCode221——Maximal Square

Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following matrix:1 0 1 0 01 0 1 1 11 1 1 1 11 0 0 1 0

2015-08-05 23:23:30 728

原创 LeetCode237——Delete Node in a Linked List

Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with val

2015-08-05 10:44:35 1163

原创 Lua打印table升级版

原Lua打印table有个很致命的问题,递归深度过大会导致栈溢出(stack overflow)。首先,需要明白,lua里出现栈溢出有以下情况:“too many arguments”,“assume array is smaller than 2^40 “,“string slice too long”,“too many captures”,

2015-08-04 19:45:31 1224

原创 The Zen of Python

在python的交互环境中,隐藏着一个彩蛋。输入import this, 你将看到Tim Peters写的“Zen of Python”: Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Compl

2015-08-04 10:42:58 1635

原创 LeetCode162——Find Peak Element

A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multiple peaks, i

2015-08-03 14:36:24 658

原创 LeetCode230——Kth Smallest Element in a BST

Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note: You may assume k is always valid, 1 ≤ k ≤ BST's total elements.Follow up:What if t

2015-08-03 14:25:26 1020

原创 LeetCode213——House Robber II

Note: This is an extension of House Robber.After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time

2015-08-03 11:28:43 1301

原创 LeetCode202——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-08-03 10:33:19 1828

原创 LeetCode206——Reverse Linked List 反转链表

Reverse a singly linked list.实现:class Solution {public:    ListNode* reverseList(ListNode* head) {        if (head == NULL) return NULL;        ListNode* pfirst = head;       

2015-08-03 09:51:35 1062

原创 LeetCode242——Valid Anagram

Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return false.Note:You may a

2015-08-02 21:27:14 2606

csv大文件打开器

csv大文件打开器

2013-11-06

OpenGL(全)

OpenGL库文件大全

2012-05-04

空空如也

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

TA关注的人

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