4 ms·
Interviewer said it would converge either to one or infinitely: 'The next sentence of English is where the problem started. I _thought_ he said: “The sequence
by 6d0debc071 11y ago
Interviewer said it would converge either to one or infinitely:
'The next sentence of English is where the problem started. I _thought_ he said:
“The sequence will either go to one or to infinity.”
but he actually said:
“The sequence will either go to one or infinite_ly_.”'
[My emphasis]
(Firing's also a bit harsh for getting an interview question wrong)
- fsk 11y agoThat also is incorrect - the sequence either converges to one or a stable cycle - not infinitely. That's also a horrible question for illustrating functional programming style. It would be much more efficient to have a simple loop caching the array n->f(n) and then finding the ones that converge to 1.
- deleted 11y ago[deleted]