boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 看到一个问题,大家讨论一下
相关主题
[系统设计]关于流量限制访问
对于自学 clrs的来说
求推荐Data Structure的比较好的书
问一道F家的考古题
请教一道面试题
谁能说说同步/异步IO和阻塞/非阻塞IO的区别?
Google on-site 面试题
networking , security 的面試題 去哪看?
能有人稍微给我解释下read4 java的leetcode给出的解法吗?半懂
被印军关了41年:回到祖国钢铁战士第一句话竟是? (转载)
相关话题的讨论汇总
话题: time话题: t3u4t1i1话题: tututuuti话题: spaces话题: 讨论一下
进入JobHunting版参与讨论
1 (共1页)
h*********d
发帖数: 1054
1
given a string - tuTutuuti, print it as output: t3u4T1i1 in O(n) time
without using any extra spaces and maps/etc other data structures
O(n) time and O(1) time? use counting sort?
q****m
发帖数: 177
2
constant space 是O(1)space

【在 h*********d 的大作中提到】
: given a string - tuTutuuti, print it as output: t3u4T1i1 in O(n) time
: without using any extra spaces and maps/etc other data structures
: O(n) time and O(1) time? use counting sort?

d******k
发帖数: 32
3
怀疑究竟有没有这样的答案。

【在 h*********d 的大作中提到】
: given a string - tuTutuuti, print it as output: t3u4T1i1 in O(n) time
: without using any extra spaces and maps/etc other data structures
: O(n) time and O(1) time? use counting sort?

p*****p
发帖数: 379
4
without using any extra spaces应该是不可能的,不然abc -> a1b1c1怎么办
O(1)可行,假设共n个不同字符,把缓冲区扩到2n然后从后往前走

【在 h*********d 的大作中提到】
: given a string - tuTutuuti, print it as output: t3u4T1i1 in O(n) time
: without using any extra spaces and maps/etc other data structures
: O(n) time and O(1) time? use counting sort?

1 (共1页)
进入JobHunting版参与讨论
相关主题
被印军关了41年:回到祖国钢铁战士第一句话竟是? (转载)
请教系统设计问题
找工作心得-5: Phone interview
google面试题跟大家分享一下
[合集] Re: google面试题跟大家分享一下
工作申请经历 (2) - Industry 篇
[合集] 选offer, 犹豫中
学生物、化学的同学想去药厂可以多和SAPA的专业人士交流
Google面试题
关于面试ABC
相关话题的讨论汇总
话题: time话题: t3u4t1i1话题: tututuuti话题: spaces话题: 讨论一下