由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 今天电面又被老印黑了。。。。 (转载)
相关主题
underlying sort algorithm for SET in STL?Partitioning (转载)
A STL sorting algorithm problem阅读Robert Sedgewick的"algorithms in C"的感受
sort algorithm求习题答案
问一个基本问题Efficient algorithms for finding number, help please
如何 randomize 一个sorted的文件 ?an interview question
两年前面过一次LinkedIn,经历过的最傻逼的一次面试 (转载)三道 Amazon Onsite Coding 题
Re: amazon onsite interview question (转载)什么时候该用什么sort算法
如何编程实现以下简单的组合问题求问一道数组shuffle的问题 (转载)
相关话题的讨论汇总
话题: 电面话题: infinite话题: time话题: 老印
进入Programming版参与讨论
1 (共1页)
x****u
发帖数: 44466
1
【 以下文字转载自 Joke 讨论区 】
发信人: huchihaisai (hu), 信区: Joke
标 题: 今天电面又被老印黑了。。。。 (转载)
发信站: BBS 未名空间站 (Thu Jun 6 01:54:30 2013, 美东)
发信人: gqiceeyes (iceeyes), 信区: JobHunting
标 题: 今天电面又被老印黑了。。。。
发信站: BBS 未名空间站 (Tue Jun 4 19:46:47 2013, 美东)
问我what is the worst sorting algorithm
我说n^2还不够那我想个n^3的,
他说even worse,
我想了一会他说if you randomly swap two positions every time, you may end up
infinite time ......
我无语了。。。想要infinite time我直接给你个while(1)好不好?
第二天果然悲剧
x****u
发帖数: 44466
2
排序算法:
要求
1. 没有有意拖延时间的步骤,每步都不可省略;
2. 时间复杂度越大越好。

up

【在 x****u 的大作中提到】
: 【 以下文字转载自 Joke 讨论区 】
: 发信人: huchihaisai (hu), 信区: Joke
: 标 题: 今天电面又被老印黑了。。。。 (转载)
: 发信站: BBS 未名空间站 (Thu Jun 6 01:54:30 2013, 美东)
: 发信人: gqiceeyes (iceeyes), 信区: JobHunting
: 标 题: 今天电面又被老印黑了。。。。
: 发信站: BBS 未名空间站 (Tue Jun 4 19:46:47 2013, 美东)
: 问我what is the worst sorting algorithm
: 我说n^2还不够那我想个n^3的,
: 他说even worse,

l*********s
发帖数: 5409
3
easy, do a exhaustive permutation and then check if the result is ordered
properly, O(n*n!).
a***n
发帖数: 538
4
最近一次onsite也被问到,我没有答出来,不过后来过了。这一问的前一题是
permutation的search space,现在想想应该是有联系的。
f******s
发帖数: 17
5
其实就是permutation加验证, OP概念不清楚,算法的定义是要求terminate,while loop
算什么.

【在 a***n 的大作中提到】
: 最近一次onsite也被问到,我没有答出来,不过后来过了。这一问的前一题是
: permutation的search space,现在想想应该是有联系的。

1 (共1页)
进入Programming版参与讨论
相关主题
求问一道数组shuffle的问题 (转载)如何 randomize 一个sorted的文件 ?
Re: 有娃有老公,但是却感觉自己什么都没有。 (转载)两年前面过一次LinkedIn,经历过的最傻逼的一次面试 (转载)
AI Programmer: Autonomously Creating Software Programs Using Genetic AlgorithmsRe: amazon onsite interview question (转载)
Google 电面 algorithm 问题 (转载) 如何编程实现以下简单的组合问题
underlying sort algorithm for SET in STL?Partitioning (转载)
A STL sorting algorithm problem阅读Robert Sedgewick的"algorithms in C"的感受
sort algorithm求习题答案
问一个基本问题Efficient algorithms for finding number, help please
相关话题的讨论汇总
话题: 电面话题: infinite话题: time话题: 老印