(java)删除字符串中出现次数最少的字符

题意为题目:

import java.util.*;
public class Main {

	public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
     		System.out.println(Puzzle(sc.next()));
        }
	}
	   public static String Puzzle(String s) {
	       int[] num=new int[26];
	       for(int i=0;i=0;){
	    	   if(num[s.charAt(i)-'a']==min){
	    		   if(i>0){
	    			   if(i



你可能感兴趣的:((java)删除字符串中出现次数最少的字符)