堆排序过程: 主函数中: public void main(String[] args)1. 定义初始化数组:int[] a = new int[]{.............}2. 循环建堆 调用建堆函数: for (int i = 0; i < a.length - 1; i++) { buil ...
分类:
编程语言 时间:
2017-10-18 21:44:41
阅读次数:
288
#Author:zyl age_of_oldboy = 56 count = 0 while count age_of_oldboy : print("think smaller") else: print("think bigger!") count +=1 if count ==3: count... ...
分类:
编程语言 时间:
2017-09-18 13:22:56
阅读次数:
267
初学python,记录下自己的历程~ 了解了一下python的基本概念,现在使用的比较多的就是python2.7 学习了if语句和两个经典的循环语句 ...
分类:
编程语言 时间:
2017-09-07 20:25:10
阅读次数:
226
Consider a game where a player can score 3 or 5 or 10 points in a move. Given a total score n, find the number of ways to reach the given score. Examp ...
分类:
其他好文 时间:
2017-09-06 13:09:01
阅读次数:
197
向mysql数据库中导入sql文件时,如果文件过大(几百M),会提示“Error Code: 1153 - Got a packet bigger than 'max_allowed_packet' bytes” 1.查看目前数据库配置 show VARIABLES like '%max_allow ...
分类:
数据库 时间:
2017-08-21 14:51:42
阅读次数:
311
Given a 2D matrix where every element is either ‘O’ or ‘X’, find the largest subsquare surrounded by ‘X’. Examples: Solution 1. O(N^4) runtime. Consid ...
分类:
其他好文 时间:
2017-08-19 10:53:45
阅读次数:
174
1 FZU 2267 The Bigger the Better 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cstdlib> 5 #include <algorithm> 6 #include ...
分类:
编程语言 时间:
2017-08-11 22:03:26
阅读次数:
284
There is a table World A country is big if it has an area of bigger than 3 million square km or a population of more than 25 million. Write a SQL solu ...
分类:
其他好文 时间:
2017-08-09 23:50:35
阅读次数:
248
age_of_oldboy = 56count = 0while count <3: guess_age = int(input("guess age:")) if guess_age == age_of_oldboy: print ("yes,you got it.") break elif gu ...
分类:
其他好文 时间:
2017-08-03 23:40:39
阅读次数:
254