fyc92的博客
fyc92 · 共 3 篇文章
排序算法-快速排序
public static void quick_sort(int[] a, int begin, int end){ int start = 0; if (begin < end) { start = a[begin]; int low = begin; int high = end; while(low < high){ while(low < high && a[high] > start){ high --; } a[low] = a[high]; while(low < high && a[low] <= start){ low ++; } a[high] = a[low]; } …
2013-10-28 15:41 · 排序算法 · 评论(0)
排序算法-冒泡排序
public static void main(String[] args) { // TODO Auto-generated method stub int a[] = {2,5,8,12,21,30,44,55,63,63,65}; int length = a.length; int times = 0; boolean isChange = false; for (int i = length - 1; i > 0; i--) { for (int j = 0; j < i; j++) { if (a[j] > a[j+1]) { int tmp = a[j]; a[j] = a[j…
2013-10-28 14:14 · 排序算法 · 评论(0)
Jasoerreport-JFreeChart-调整柱状图宽度
import org.jfree.chart.JFreeChart; import org.jfree.chart.renderer.category.BarRenderer; import net.sf.jasperreports.engine.JRChart; import net.sf.jasperreports.engine.JRChartCustomizer; public class BarChartCustomizer implements JRChartCustomizer { public void customize(JFreeChart chart, JRChart j…
2013-10-09 10:30 · 评论(0)