LEARNING NOTES
饭团儿在笑
Just a XianYu...
展开
-
Greedy Snake In Java ----My First Project
Github Address: https://github.com/nagger28443/Projects_did_while_learning/tree/master/GreedySnake Exciting! Just got my first project done. This little project, named as the title said ----"Greedy原创 2017-07-16 11:21:09 · 315 阅读 · 0 评论 -
1060. Are They Equal (25)
1060. Are They Equal (25)If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123*105 with simple chopping. No原创 2017-07-18 20:05:54 · 126 阅读 · 0 评论 -
Longest Common Subsequence.
int lcs(string s1,string s2,int m,int n, vector>&dp){ if(m==0 || n==0) return 0; if(dp[m][n]>0) return dp[m][n]; if(s1[m-1]==s2[n-1]) dp[m]原创 2017-11-14 18:02:07 · 136 阅读 · 0 评论 -
Relearning in JAVA: 5)Initialization & cleanup
Chapter 3.原创 2017-11-01 23:31:54 · 212 阅读 · 0 评论 -
MEMO of Linux and git command lines
new folder::: mkdir ** move::: mv from todelete::: rm **git:git add **git commit -m "***"git statusgit loggit reset --hard HEAD^git checkout -- ** //recover file to stage(if原创 2017-09-30 16:47:57 · 153 阅读 · 0 评论 -
Producer & Consumer ---- a practice in concurrent simulation
import java.util.Arrays;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;import java.util.concurrent.TimeUnit;class Write implements Runnable { private WriteA原创 2017-08-10 09:50:56 · 185 阅读 · 0 评论 -
Crafts Store ---- a concurrent simulation in Java
This is actually a practice in class. But I am using a different way to solve this problem. It doesn't look bad.import java.util.Arrays;import java.util.Random;import java.util.concurrent.*;原创 2017-08-10 09:47:53 · 185 阅读 · 0 评论 -
1010. Radix (25)
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is a binary number.Now for any pair of positive原创 2017-07-24 13:21:03 · 129 阅读 · 0 评论 -
FOR 100 PEOPLE, EVERYONE OWNS 100 YUAN. EVERYONE GIVES ANOTHER RANDOM PERSON 1 YUAN EVERY MINUTE.
FOR 100 PEOPLE, EVERYONE OWNS 100 YUAN. EVERYONE GIVES ANOTHER RANDOM PERSON 1 YUAN EVERY MINUTE. THEN WHAT HAPPENS.Try to simulate this with matplotlib in Python.----2017.7.16原创 2017-07-16 20:29:01 · 264 阅读 · 0 评论 -
SUMMARY OF BASIC ALGORITHMS
TO REVIEW BASIC ALGORITHMS, I DECIDE TO SUMMARIZE THEM BY MYSELF. void insertion_sort(vector<int>&v){ for (int i = 0; i < v.size(); ++i) { int tmp = v[i], j = i; while (j >...原创 2017-07-19 11:34:56 · 251 阅读 · 0 评论