8 ssdut_yrp

尚未进行身份认证

我要认证

暂无相关简介

等级
TA的排名 4w+

K个最近的点

给定一些 points 和一个 origin,从 points 中找到 k 个离 origin 最近的点。按照距离由小到大返回。如果两个点有相同距离,则按照x值来排序;若x值也相同,就再按照y值排序。样例给出 points = [[4,6],[4,7],[4,4],[2,5],[1,1]], origin = [0, 0], k = 3返回 [[1,1],[2,5],[4,4]

2017-07-07 14:06:57

jsp页面内容显隐总结

选中grid某条记录按钮显隐< open:grid property ="record" caption ="查询结果" width ="100%" keylist ="zhuanjia_id" nowrap ="true" navbar ="top" fixrow ="true" sortColumn ="*" onselect ="func_grid_select()">function fu

2016-03-17 09:07:22

快速排序二

public class ArrayIns { private long[] theArray; private int nElems; public ArrayIns(int max){ theArray=new long[max]; nElems=0; } public void insert(long value){

2016-03-15 17:05:01

快速排序一

public class ArrayIns { private long[] theArray; private int nElems; public ArrayIns(int max){ theArray=new long[max]; nElems=0; } public void insert(long value){

2016-03-15 16:44:26

划分算法

public class ArrayPar { private long[] theArray; private int nElems; public ArrayPar(int max){ theArray=new long[max]; nElems=0; } public void insert(long value){

2016-03-15 16:01:32

希尔排序

public class ArraySh { private long[] theArray; private int nElems; public ArraySh(int max){ theArray=new long[max]; nElems=0; } public void insert(long value){

2016-03-15 14:05:23

非递归实现归并排序

归并算法的中心是归并两个已经有序的数组public class MergeApp { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int[] arrayA={23,47,81,95};

2016-03-14 11:33:33

汉诺塔问题

对于上面把问题抽象出来的那段描述,对于n > 1的时候,又可以抽象(换成“总结”这个词会没那么大压力吗?)出这3步: (1)、将底盘n以上的环(n-1个)移动到B (2)、将底盘n从A移动到C (3)、将B上的环(n-1个)移动到C 其中第1步和第3步的步数是一样的,因为环的数量一样(n-1个),只是目标的柱子不同而已。public class TowerApp { /**

2016-03-14 11:05:19

递归求三角数字

package cn.gwssi;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class TriangleApp { /** * @param args */ static int theNumber;

2016-03-14 09:58:29

Josephus问题

public class Link { public long lData; public Link next; public Link(long lData){ this.lData=lData; } public void displayLink(){ System.out.print(lData+" "); }}p

2016-03-11 15:19:07

循环链表实现队列

public class Link { public long lData; public Link next; public Link(long lData){ this.lData=lData; } public void displayLink(){ System.out.print(lData+" "); }}pu

2016-03-11 14:47:28

循环链表

public class Link { public long lData; public Link next; public Link(long lData){ this.lData=lData; } public void displayLink(){ System.out.print(lData+" "); }}pu

2016-03-11 14:26:57

基于双向链表的双端队列

public class Link { public long dData; public Link next; public Link previous; public Link(long dData){ this.dData=dData; } public void displayLink(){ System.out.p

2016-03-10 16:32:07

基于有序链表的优先级队例

public class Link { public long lData; public Link next;//reference to next Link public Link(long lData){ this.lData=lData; } public void displayLink(){ System.out.pr

2016-03-10 16:12:54

双向链表

public class Link { public long dData; public Link next; public Link previous; public Link(long dData){ this.dData=dData; } public void displayLink(){ System.out.p

2016-03-10 15:43:10

数组利用有序链表排序

public class Link { public long lData; public Link next;//reference to next Link public Link(long lData){ this.lData=lData; }}public class SortedList { private Link first;

2016-03-10 11:44:21

数字转换成中文汉字

public class NumberUtils { public NumberUtils(){ } public static final String[] UNITS={"","十","百","千","万","十","百","千","亿","十","百","千"}; public static final String[] NUMS = {"零","一","二",

2016-03-10 11:34:26

win7配置免安装mysql

通过cmd进入mysql解压目录bin目录中,执行如下命令:mysqld install mysqltest --defaults-file="E:\Develop\mysql-5.6.19-winx64\test.ini"【mysqltest为添加的服务名】删除已注册的服务指令:sc delete mysqltest

2016-03-10 10:36:04

有序链表

public class Link { public long lData; public Link next;//reference to next Link public Link(long lData){ this.lData=lData; } public void displayLink(){ System.out.pr

2016-03-03 17:31:51

链表实现队列

public class Link { public long lData; public Link next;//reference to next Link public Link(long lData){ this.lData=lData; } public void displayLink(){ System.out.pr

2016-03-03 16:07:18

查看更多

勋章 我的勋章
  • 专栏达人
    专栏达人
    授予成功创建个人博客专栏的用户。专栏中添加五篇以上博文即可点亮!撰写博客专栏浓缩技术精华,专栏达人就是你!