*博客头图：

RGB颜色，例如：#AFAFAF

Hover：

RGB颜色，例如：#AFAFAF

RGB颜色，例如：#AFAFAF

# 代码菌的blog

Just for fun

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

#### 原创 Lua与面向对象

2016-11-24 16:19:19 664

#### 原创 5分钟学会Lua编程（简明教程）

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

#### 原创 Visual Studio Code 使用指南大全

2016-11-17 16:19:15 22362

#### 原创 四大美女之一王昭君

2017-09-04 00:43:11 2433 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' : Absent.'L' : Late.'P' : Present.A student could be

2017-07-02 21:58:24 794

#### 原创 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: 6Example 2:Input: [1,2,3,4]Output: 24

2017-07-02 21:48:47 923 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,-1,2,1,-5,4],the contiguous subarray [4,-1,2,1] ha

2017-06-30 17:25:05 709

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

2017-05-22 20:52:39 1079

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

using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;namespace FundData{ static class FileUtil { publi

2017-04-27 23:01:10 1096

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

using System;using System.Threading;public class Fibonacci{ private int _n; private int _fibOfN; private ManualResetEvent _doneEvent; public int N { get { return _n; } } pub

2017-04-27 22:57:05 1196

#### 原创 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: You may assume k is always valid, 1 ≤ k ≤ number

2017-04-03 21:07:27 632

#### 原创 优先队列priority_queue的使用

#include #include #include using my_pair_t = std::pair;using my_container_t = std::vector;void test_priority_queue(){auto my_comp = [](const my_pair_t e1, const my_pair_t& e2){

2017-04-03 19:51:56 650

#### 原创 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: 1 \ 3 / 2Output:1Explanation:

2017-03-31 22:17:10 651

#### 原创 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 are less than k characters left, reverse all of th

2017-03-30 22:05:40 723

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

Given an integer, return its base 7 string representation.Example 1:Input: 100Output: "202"Example 2:Input: -7Output: "-10"Note: The input will be in range of [-1e7, 1e

2017-03-30 21:28:01 678

#### 原创 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 one of the following cases holds:All letters in t

2017-03-28 21:44:12 486

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 is Both num1 and num2 contains only digits 0-9.

2017-02-12 22:47:16 495

#### 原创 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 Medal", "Silver Medal" and "Bronze Medal".class Solution

2017-02-11 22:16:29 874

#### 原创 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 nums1's elements in the corresponding places of nums

2017-02-08 23:59:43 704

#### 原创 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.Example 1:Input: ["Hello", "Alaska",

2017-02-07 22:41:18 1161

#### 原创 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 defined as follows:The left subtree of a node contains onl

2017-02-06 15:53:52 1540

#### 原创 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 equals the distance between i and k (the order of the tup

2017-02-05 17:20:30 459

#### 原创 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:Each element in the result should appear as ma

2017-02-04 17:14:29 318

#### 原创 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 now is to design a rectangular web page, whose length L

2017-02-04 11:43:38 633

#### 原创 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: 3Explanation: The first two digits or the last three digits are consecutiv

2017-01-19 20:40:37 437

#### 原创 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 given integer is guaranteed to fit within the range

2017-01-14 23:42:26 405

#### 原创 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 - 1 elements by 1.Example:Input:[1,2,3]Ou

2017-01-08 23:32:52 280

#### 原创 C#编程命名规范

2017-01-08 23:06:31 298

#### 原创 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, n] inclusive that do not appear in this array.

2017-01-01 11:00:55 301

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 greed factor gi, which is the minimum size of a c

2016-12-31 11:28:29 397 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, calculate the Hamming distance.Note:0 ≤ x,

2016-12-23 10:40:18 2395

#### 原创 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/vertically (not diagonally). The grid is completel

2016-12-20 10:32:24 357

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

2016-12-15 10:19:38 578

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

2016-12-14 10:18:16 327

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

Some rules kids won't learn in school                        Text By Charles J. Sykes                   Printed in San Diego Union Tribune                            September 19, 1996

2016-12-13 14:37:15 1524

#### 原创 大数相乘

local bignum = {}function bignum.len(num)    return string.len(num)endfunction bignum.splitAt(num, pos)    local low = string.sub(num, -pos)    local high = string.sub(num, 1, -pos

2016-11-25 18:42:00 391

#### 原创 大数big number的加减运算

2016-11-25 14:37:34 5613

#### 原创 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 represents a zero or one, with the least significant bit o

2016-10-29 16:53:58 392

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

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

#### 原创 Leetcode412. Fizz Buzz爱美之心人皆有之

Write a program that outputs the string representation of numbers from 1 to n.But for multiples of three it should output “Fizz” instead of the number and for the multiples of five output “Buzz”.

2016-10-15 22:08:40 738

csv大文件打开器

2013-11-06

2012-07-26

#### OpenGL(全)

OpenGL库文件大全

2012-05-04

###### 空空如也

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

TA关注的人