Skip to content

Instantly share code, notes, and snippets.

@linkkingjay
linkkingjay / random_sort.c
Last active December 24, 2015 06:49 — forked from wintercn/adhocSort.js
随机排序,哈哈哈哈。
#include<stdio.h>
#include<stdlib.h>
int is_sorted(int *s, int n) {
int i;
for (i = 0;i < n - 1;i++) {
if (s[i] > s[i + 1])
return 0;
}
return 1;