Skip to content

Instantly share code, notes, and snippets.

package com.example;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.PriorityQueue;
/**
* Created by Administrator on 2015/9/6.
*/
@tyrantgit
tyrantgit / Bm.java
Last active September 18, 2015 03:26
sort
/**
* function findPattern
**/
public static int search(String t, String p) {
char[] text = t.toCharArray();
char[] pattern = p.toCharArray();
int pos = indexOf(text, pattern);
return pos;
}