第二题递归更容易 public static boolean check(String s){ if(s.length()==0)return true; if(s.contains("01") || s.contains("23")){ s = s.replaceAll("01",""); s = s.replaceAll("23",""); }else { return false; } return check(s); }
2 9

相关推荐

今天 15:52
已编辑
门头沟学院 C++
新凯来 软件开发工程师 (16+5)k*15 硕士211
点赞 评论 收藏
分享
小牛炒肉:好大的官威居然不是什么官
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务