摘要: 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 阅读(497) 评论(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 阅读(161) 评论(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 阅读(1047) 评论(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 阅读(262) 评论(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 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 迭代:public class Solution { public ListNode reverseList(ListNode head) { ListNode pre = null; while (head != null) { ... 阅读全文
posted @ 2017-04-26 13:09 zhayujie 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 前言简单归纳一下最近学习的排序算法,如果有什么错误的地方还请大家指教。本文介绍了七种经典排序算法,包括冒泡排序,选择排序,插入排序,希尔排序,归并排序,快速排序以及堆排序,并且讨论了各种算法的进一步改进,在文章最后还对所有算法的时间和空间复杂度作了一个总结。用Java... 阅读全文
posted @ 2017-04-01 20:25 zhayujie 阅读(149) 评论(0) 推荐(0) 编辑