阵列交织的问题 [英] array interleaving problem

查看:107
本文介绍了阵列交织的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找的东西在网上,当我遇到了这个问题。不知道如何解决它。帮我请。

I was looking for something over the web when I came across this question. Have no idea of how to solve it. Help me out please.

假设我们有一个数组 A1,A2,...,AN,B1,B2,......,BN

Suppose we have an array a1,a2,... ,an, b1,b2,..., bn

如何改变这种阵列 A1,B1,A2,B2,...,一,万亿O(n)时间及O(1)空间。

How to change this array to a1,b1,a2,b2, ..., an,bn in O(n) time and in O(1) space.

推荐答案

这个问题并不简单,例如人做出来的人。功课? LOL。

This problem is not as trivial as people make out to be. Homework? LOL.

下面的链接有一个解决方案: http://arxiv.org/abs/0805.1598

The following link has a solution: http://arxiv.org/abs/0805.1598

这篇关于阵列交织的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆