BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / iwhisper / #6769811同步于 2024/1/23
该镜像源已超过 30 天没有更新,可能在源站已被删除。
IWhisper机器人发帖

作为面试官,出这个题对于字节人难吗

IWhisper#734
2024/1/23镜像同步27 回复
他写了50多分钟还没写出来,给他挂了[em21]
订阅后,新回复会通过你的通知中心匿名送达。
27 条回复
IWhisper#734机器人#0 · 2024/1/23
第一次面试od,自己出的题。正则中?代表0个或1个,现可以保证用户输入某参数仅会出现0次或1次,例如对于两个参数时,可以用正则a?b?a?可以表示a, b, ab, ba,和空5种传参情况。 a?b?c?a?b?c?a?可以表示三个参数时候的全部传参情况。 请问n个参数1,2.....n。用最少?且满足所有传参情况的正则表达,结果用list<>表示。
IWhisper#734机器人#1 · 2024/1/23
他写了50多分钟还没写出来,给他挂了[em21]
IWhisper#319机器人#2 · 2024/1/23
脉脉上说面字节出来的人一定要出hard
IWhisper#734机器人#3 · 2024/1/23
结果,下一个面试的是个末流211女生30分钟写出来了
IWhisper#312机器人#4 · 2024/1/23
这是力扣题吗
IWhisper#734机器人#5 · 2024/1/23
no,内部题
IWhisper#112机器人#6 · 2024/1/23
好难,我不配
IWhisper#312机器人#7 · 2024/1/23
这是字节跳动的od岗?
IWhisper#90机器人#8 · 2024/1/23
汗流浃背了
IWhisper#734机器人#9 · 2024/1/23
字节出来面华为的
IWhisper#312机器人#10 · 2024/1/23
字节跳动出来为啥还要去od呀,现在od这么火呀
IWhisper#955机器人#11 · 2024/1/23
n*(n-1)+1?
IWhisper#312机器人#12 · 2024/1/23
华为od一般是捞的部门的人技术面还是随机分配人技术面
IWhisper#695机器人#13 · 2024/1/23
od是什么意思。。
IWhisper#247机器人#14 · 2024/1/23
2的n次方-1,递归?
IWhisper#882机器人#15 · 2024/1/23
求问正解
IWhisper#968机器人#16 · 2024/1/23
好像见过类似的题
IWhisper#937机器人#17 · 2024/1/23
import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) { int n = 3; // 设置参数个数 List<String> regexList = generateRegex(n); System.out.println(regexList); } private static List<String> generateRegex(int n) { List<String> regexList = new ArrayList<>(); // 生成初始的正则表达式 StringBuilder regex = new StringBuilder(); for (int i = 1; i <= n; i++) { regex.append("a?"); } // 递归生成所有传参情况 generateAllCombinations(regexList, regex.toString(), 0, n); return regexList; } private static void generateAllCombinations(List<String> regexList, String regex, int index, int n) { if (index == n) { regexList.add(regex); return; } // 复制当前的正则表达式 StringBuilder newRegex = new StringBuilder(regex); // 在当前位置增加一个参数 newRegex.insert(index * 2 + 1, "b?"); generateAllCombinations(regexList, newRegex.toString(), index + 1, n); // 在当前位置不增加参数 generateAllCombinations(regexList, regex, index + 1, n); } }
IWhisper#895机器人#18 · 2024/1/23
因为华为所有社招都是以od身份进去的,包括志辉君
IWhisper#882机器人#19 · 2024/1/23
有答案吗?老哥