我花了一天时间解决这个问题,找不到传递大数据集的解决方案.
问题
n括号序列由n"("s和n")"s组成.
现在,我们拥有所有有效的n个括号序列.按字典顺序查找第k个最小序列.
例如,以下是按字典顺序排列的所有有效3个括号序列:
((()))
(()())
(())()
()(())
()()()
Run Code Online (Sandbox Code Playgroud)
给定n和k,编写一个算法,以字典顺序给出第k个最小序列.
对于大型数据集:1 ? n ? 100和1 ? k ? 10^18
我有一个功能齐全的流浪者现在已经三个月了,但是在过去的三天里,每当我尝试流浪汉或流浪汉重新加载时,我都会收到错误.
这是我跑步时遇到的错误 vagrant reload
Run Code Online (Sandbox Code Playgroud)default: Attempting graceful shutdown of VM... default: Guest communication could not be established! This is usually because default: SSH is not running, the authentication information was changed, default: or some other networking issue. Vagrant will force halt, if default: capable. default: Forcing shutdown of VM... default: Clearing any previously set forwarded ports... default: Clearing any previously set network interfaces... default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly default: Forwarding …