备战秋招面试 微信搜索公众号【TechGuide】关注更多新鲜好文和互联网大厂的笔经面经。 作者@TechGuide 点赞再看,养成习惯,您动动手指对原创作者意义非凡🤝
第一题、模拟涂色游戏
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String inHand = sc.nextLine();
String toPrint = sc.nextLine();
if(inHand==null || inHand.length()==0 || toPrint==null || toPrint.length()==0) System.out.println(0);
char[] colors = inHand.toCharArray();
char[] boards = toPrint.toCharArray();
HashMap map = new HashMap();
for (int i = 0; i
关注
打赏