自定义博客皮肤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,更多精彩内容等你来

  http://liuchuanliang.com/ 欢迎大家光临 欢迎大家光临 欢迎大家光临

2018-07-30 21:14:32 382 1

原创 Lua与面向对象

影响一个人最好的方式不是语言本身,而是语言背后所表露的情感。 待续

2016-11-24 16:19:19 588 0

原创 5分钟学会Lua编程(简明教程)

关键字: and break do else elseif end false goto for function if in local nil not or repeat return then true until while 标识符有字母,数字,下划线组成,非数字开头,_这个标识符...

2016-11-23 17:15:18 4544 3

原创 Visual Studio Code 使用指南大全

常用快捷键: 移动当前行代码:Alt + down / alt + up

2016-11-17 16:19:15 19087 0

原创 四大美女之一王昭君

王昭君 王昭君,名嫱,字昭君,乳名皓月, 西汉南郡秭归人, 今湖北省宜昌市兴山县人。 汉元帝建昭元年,下诏征集天下美女补充后宫,王昭君年当二八,仿如空谷幽兰,自然被选入宫。从全国各地挑选入宫的美女数以千计,皇帝无法一一见面,首先由画工毛延寿各画肖像一幅呈奉御览。出生富贵的人家,...

2017-09-04 00:43:11 1488 1

原创 Leetcode551. Student Attendance Record I一趟遍历

You are given a string representing an attendance record for a student. The record only contains the following three characters: 'A'...

2017-07-02 21:58:24 653 0

原创 Leetcode628. Maximum Product of Three Numbers不要太简单

Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Input: [1,2,3] Output: 6 ...

2017-07-02 21:48:47 775 1

原创 LeetCode53. Maximum Subarray一种很好的做法

Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-...

2017-06-30 17:25:05 620 0

原创 SVN报错“Previous operation has not finished; run 'cleanup' if it was interrupted”的解决方法

百试不爽的解决方法 1. 网上可以下到sqlite-shell-win32-x86: sqlite3.exe 2.将sqlite3.exe放到svn 项目的主目录下,和.svn目录同级下。 3.执行  sqlite3 .svn/wc.db "select * from work...

2017-05-22 20:52:39 938 0

原创 C#文件读写追加创建目录,判断目录是否存在等操作

using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FundD...

2017-04-27 23:01:10 893 0

原创 C#多线程实例清晰易懂

using System; using System.Threading; public class Fibonacci { private int _n; private int _fibOfN; private ManualResetEvent _doneEvent...

2017-04-27 22:57:05 1040 0

原创 LeetCode347. Top K Frequent Elements【map+priority_queue解法】

Given a non-empty array of integers, return the k most frequent elements. For example, Given [1,1,1,2,2,3] and k = 2, return [1,2]. Note:  ...

2017-04-03 21:07:27 559 0

原创 优先队列priority_queue的使用

#include #include #include using my_pair_t = std::pair; using my_container_t = std::vector; void test_priority_queue() { auto my_co...

2017-04-03 19:51:56 537 0

原创 LeetCode530. Minimum Absolute Difference in BST中序遍历真神奇

Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: Input: ...

2017-03-31 22:17:10 570 0

原创 LeetCode541. Reverse String II小学生都会

Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there a...

2017-03-30 22:05:40 635 0

原创 LeetCode504. Base 7 我是如何解答的

Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "202" Example 2: Input: -7 Output...

2017-03-30 21:28:01 580 0

原创 LeetCode520. Detect Capital有那么难解吗

Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when on...

2017-03-28 21:44:12 410 0

原创 LeetCode415. Add Strings小学生都会

Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 ...

2017-02-12 22:47:16 414 0

原创 Leetcode506. Relative Ranks简单粗暴

Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Meda...

2017-02-11 22:16:29 791 0

原创 LeetCode496. Next Greater Element I使用map解答

You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for num...

2017-02-08 23:59:43 615 0

原创 LeetCode500. Keyboard Row我的C++解法

Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below....

2017-02-07 22:41:18 1070 0

原创 Leetcode501. Find Mode in Binary Search Tree大道至简

Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given BST.Assume a BST is define...

2017-02-06 15:53:52 1379 0

原创 LeetCode447. Number of Boomerangs时间复杂度O(N2)

Given n points in the plane that are all pairwise distinct, a “boomerang” is a tuple of points (i, j, k) such that the distance between i and j equal...

2017-02-05 17:20:30 377 0

原创 Leetcode350. Intersection of Two Arrays II很简单的做法

Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Note: ...

2017-02-04 17:14:29 262 0

原创 Leetcode492. Construct the Rectangle最简洁解法

For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by...

2017-02-04 11:43:38 562 0

原创 LeetCode485. Max Consecutive Ones有你真好

Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first...

2017-01-19 20:40:37 378 0

原创 LeetCode476. Number Complement位操作面试题

Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The g...

2017-01-14 23:42:26 332 0

原创 LeetCode453. Minimum Moves to Equal Array Elements我是这么解答的

Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n...

2017-01-08 23:32:52 232 0

原创 C#编程命名规范

这盛世,如你所愿。每当看到一些混蛋的官员言论,内心挺愤怒的,即痛恨这种混蛋,也痛恨自己无能为力。 命名约定: 在.NET Framework名称空间中有两种命名约定,称为PascalCase和camelCase 在camelCase中,有一个规则,如果多个单词命名变量名,从第二个...

2017-01-08 23:06:31 243 0

原创 LeetCode448. Find All Numbers Disappeared in an Array新年第一篇

Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1,...

2017-01-01 11:00:55 251 0

原创 LeetCode455. Assign Cookies简单的做法

Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a ...

2016-12-31 11:28:29 306 2

原创 Leetcode461. Hamming Distance不要太简单哦

The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, ...

2016-12-23 10:40:18 2304 0

原创 463. Island Perimeter我的解法

You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/v...

2016-12-20 10:32:24 260 0

原创 用Irony实现一个计算器附上源码

满足的功能如下: 加减乘除四则运算括号优先级 比如: 3+2*4 - 8/4 的结果是9 2* (2 + 3) - 2的结果是8 Irony是.net平台下实现语言的开发工具箱。作者把C#这种强大的现代语言引入编译器解析领域,语法规则直接通过C#语言来描述。下面看看这...

2016-12-15 10:19:38 461 0

原创 关于C#的virtual,Override和new的坑

先看这么一段代码:     public class Base     {         public virtual void DoWork( int a) { Console.WriteLine( "base dowork"); }     } ...

2016-12-14 10:18:16 228 0

原创 比尔盖茨给年轻人的14条建议

Some rules kids won't learn in school                         Text By Charles J. Sykes                    Printed in San Diego Union Tribu...

2016-12-13 14:37:15 1333 0

原创 大数相乘

local bignum = {} function bignum.len(num)     return string.len(num) end function bignum.splitAt(num, pos)     local low = string.sub(n...

2016-11-25 18:42:00 331 0

原创 大数big number的加减运算

以下是Lua的实现: function plus(str1, str2)     local increase = 0     local t = {}     local max = math.max(string.len(str1), string.len(str2))     for i =...

2016-11-25 14:37:34 3448 0

原创 LeetCode 401. Binary Watch

A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represe...

2016-10-29 16:53:58 342 0

原创 是爱情,让我们直立行走

你来自北京周口, 我来自云南元谋。 牵着你毛茸茸的小手, 轻轻地亲上一口。 是爱情, 让我们直立行走。

2016-10-16 23:12:33 891 1

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