腾讯笔试

腾讯笔试 2 3 都顺 ,卡在1将近一个小时,最后找到问题时间不够了 ..T T..  我好菜
#腾讯##笔试题目##春招##实习##内推#
全部评论
请问笔试是用js写的还是java
点赞 回复 分享
发布于 2019-08-18 21:43
虽然并没参加笔试,但看第一题挺有意思就做了做。 思路是递归,有兴趣可以看看。 public class TX_Q1 { public static void main(String[] args) { String str = "HG[3|B[1|CA]]F[3|B[1|CA]]BB"; System.out.println(decrypt(str)); } public static String decrypt(String str) { if(str.indexOf('[') < 0) return str; String res = ""; for(int i = 0; i < str.length(); i ++) { char ch = str.charAt(i); if(ch == '[') { int count = 1; int nStart = i + 1; while(str.charAt(i) != '|') i ++; int num = Integer.valueOf(str.substring(nStart, i)); int dStart = i + 1; while(count > 0) { i ++; if(str.charAt(i) == '[') count ++; if(str.charAt(i) == ']') count --; } String ds = decrypt(str.substring(dStart, i)); while(num -- > 0) res += ds; } else { res += ch; } } return res; } }
点赞 回复 分享
发布于 2019-08-17 23:06
同前端 1没做 2只有60 3做了 4刚做完 最后三秒复制代码上去的时候 复制到第五题上 了...心都碎了 求问楼主 1 2 题思路
点赞 回复 分享
发布于 2019-08-17 23:00
前面的输入输出例子复制进 rider 用的c#  都调试不了 有人遇到了吗
点赞 回复 分享
发布于 2019-08-17 22:11
你做的是前端的面试题嘛?
点赞 回复 分享
发布于 2019-08-17 22:07
第一题啥啊?来看看我们做的一样不
点赞 回复 分享
发布于 2019-08-17 22:07
我也是卡一卡了很久慌了,23搞得题都没心思读,直接上4
点赞 回复 分享
发布于 2019-08-17 22:06

相关推荐

缒梦&独舞:这家公司是这样的,去年给我实习offer了,不过也是面着玩儿的,他周六还要去做公益志愿活动
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
昨天 15:27
点赞 评论 收藏
分享
评论
点赞
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务