Bloomberg电面

首先,他开始自我介绍,讲了自己的工作,大约10分钟。然后问我为什么要加入bloomberg。然后告诉我打开hackerrank链接
45 分钟面试,考了一道题
Given a string, reduce the string by removing 3 or more consecutive identical characters.

Example 1:

Input: “aaabbbc”
Output: “c”
Example 2:

Input: “aabbbacd”
Output: “cd”
I solved it with recursion and also discussed the stack based approach

这个去年我也遇到过,leetcode candy crush的一维版本,消消乐

用stack应该挺简单的,可以讲一下recursion大概怎么做的吗