摘要: 1056. Mice and RiceMice and Rice is the name of a programming contest in which each programmer must write a piece of code to control t... 阅读全文
posted @ 2017-09-05 12:38 zhayujie 阅读(148) 评论(0) 推荐(0)
摘要: 1080. Graduate AdmissionIt is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zh... 阅读全文
posted @ 2017-09-02 15:38 zhayujie 阅读(152) 评论(0) 推荐(0)
摘要: 1079. Total Sales of SupplyA supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in... 阅读全文
posted @ 2017-09-01 16:21 zhayujie 阅读(151) 评论(0) 推荐(0)
摘要: 1078. HashingThe task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the pos... 阅读全文
posted @ 2017-08-30 23:03 zhayujie 阅读(515) 评论(0) 推荐(0)
摘要: 1018. Public Bike Management There is a public bike service in Hangzhou City which provides great convenience to the tourists from all... 阅读全文
posted @ 2017-08-25 21:34 zhayujie 阅读(176) 评论(0) 推荐(0)
摘要: #include <stdio.h> void qsort(void * base, int num, int width, int (*comp)(const void *, const void *)); void sort(char * lo, char * hi, int (*comp)(c 阅读全文
posted @ 2017-07-05 22:43 zhayujie 阅读(1067) 评论(0) 推荐(0)
摘要: #include #define MAX 27void dfs(int i, int j);int dx[8] = {-1, 1, -2, 2, -2, 2, -1, 1};int dy[8] = {-2, -2, -1, -1, 1, 1, 2, 2};int ma... 阅读全文
posted @ 2017-07-03 22:17 zhayujie 阅读(277) 评论(0) 推荐(0)
摘要: #include #include #define PI 3.1415926int get_year(double x, double y);int main(void) { int n; int i = 0; double x, y; ... 阅读全文
posted @ 2017-06-30 23:39 zhayujie 阅读(115) 评论(0) 推荐(0)
摘要: 迭代:public class Solution { public ListNode reverseList(ListNode head) { ListNode pre = null; while (head != null) { ... 阅读全文
posted @ 2017-04-26 13:09 zhayujie 阅读(138) 评论(0) 推荐(0)
摘要: 前言简单归纳一下最近学习的排序算法,如果有什么错误的地方还请大家指教。本文介绍了七种经典排序算法,包括冒泡排序,选择排序,插入排序,希尔排序,归并排序,快速排序以及堆排序,并且讨论了各种算法的进一步改进,在文章最后还对所有算法的时间和空间复杂度作了一个总结。用Java... 阅读全文
posted @ 2017-04-01 20:25 zhayujie 阅读(164) 评论(0) 推荐(0)