在pptv的实习结束了, 忙着找工作的事,顺便把数据结构的那本书重新复习了一遍.为了加深印象,特意把里面的常用的排序.查找算法用js写了一遍 具体的实例在我的github上,大家可以访问的: https://github.com/chenkehxx/practice js_sort.html文件 //js插入排序 function insertSort(arr){ var result =[]; result.push(arr[0]); for(var i = 1, len = arr.…
1. ASCII(American Standard Code for Information Interchange) (1)数字0-9对应ASCII编码十进制为48-57, 字母a-z对应ASCII编码十进制为97-122,字母A-Z对应ASCII编码十进制为65-90 (2)char转成int类型的时候,类型自动提升,char数据类型,会查询编码表,得到整数 int转成char类型的时候,强制转换,会查询编码表 (3) char存储汉字,查询Unicode编码表 (4) char可以…
链接:http://poj.org/problem?id=3122 Pie Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10448 Accepted: 3694 Special Judge Description My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N…
Space Ant Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 4970 Accepted: 3100 Description The most exciting space discovery occurred at the end of the 20th century. In 1999, scientists traced down an ant-like creature in the planet Y19…
Space Ant Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 3924 Accepted: 2457 Description The most exciting space discovery occurred at the end of the 20th century. In 1999, scientists traced down an ant-like creature in the planet Y19…
B. XK Segments time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output While Vasya finished eating his piece of pizza, the lesson has already started. For being late for the lesson, the teacher sug…
POJ 2007 将所有的点按逆时针输出 import java.io.*; import java.util.*; public class Main { static class Point implements Comparable<Point>{ double x, y; @Override public int compareTo(Point a) { return (int)cross(a); } public double cross(Point a){ return a.x*y…
Sorting It All Out 时间限制:3000 ms | 内存限制:65535 KB 难度:3 描述 An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, the sorted sequence A,…