Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Fibs interview question

Name: Anonymous 2020-04-22 15:51

Amazingly, I had a technical interview yesterday via webex, which featured a question for calculating the nth term of fibs in a curly-bracket language. Being both an ENTERPRISE CUDDER and a long-time prog-rider and who has implemented fibs is a number of both popular and esoteric languages (including some of my own creation), this was an easy task , and I rattled off a solution as follows:

int Fibonacci(int n)
{
switch(n)
{
case 0:
throw new InvalidFibonacciTermException();
case 1:
case 2:
return 1;
default:
return Fibonacci(n-1) + Fibonacci(n-2);
}
}


Afterwards we discussed that the flaws of this approach, and alternate solutions (where I described a standard iterative solution). I was then probed for a further 90 minutes on various topics.

Today I found out that my application won't be progressing further, and one piece of feedback was that my fibs looked like it had been googled. It seems like my fibs-fu was too strong for these plebs!

Name: Anonymous 2020-04-22 17:51

my condolences

Name: Anonymous 2020-04-22 17:59

>>1
Another guy who doesn't want or need a job and doesn't even try to do what he is asked for in a simple job interview. You all just fail on purpose to post shitty threads about it here.

Name: Anonymous 2020-04-22 18:52

What about n < 0? Either catch all invalid input or don't.

Name: Anonymous 2020-04-22 19:46

Your solution is suspicious. You either memorized or googled it. Or your mental model differs a lot from the ``normal" imperative one.

I thought about it and I still don't understand how it works.

Name: The Sinkshitter 2020-04-22 19:51

It is time to shit in their sink, OP.

Name: Anonymous 2020-04-22 20:28

>>5
Mental midget.

Name: Anonymous 2020-04-22 22:29

>>7
Not anymore. Your comment made me butthurt enough to learn it.

It's the mathematical definition. It all boils down to that we know the first two result: 1 and 1. The algorithm then breaks down further results into the two we know and adds them up.

In the end you build a fatass tree which is dog slow and memory expensive but very cool.

Name: Anonymous 2020-04-22 22:44

>>8
I was absolutely sure you were trolling. Are you 12?

Name: Anonymous 2020-04-23 7:52

>>9
No. I'm just uneducated.

Name: Anonymous 2020-04-23 9:16

Dubonacci sequence

Name: Dubonacci sequence 2020-04-23 9:21

11,11,22,33,55,88,1313,2121,3434,5555,...

Name: Anonymous 2020-04-23 9:26

>>12
Hmm, I calculate it as follows:
01:11
02:11
03:22
04:33
05:55
06:88
07:143
08:231
09:374
10:605
11:979
12:1584
13:2563
14:4147
15:6710
16:10857
17:17567
18:28424
19:45991
20:74415

Name: Dubonacci sequence 2020-04-23 10:25

>>13
im using dubonacci=dup . fibonacci

where dup x=x*10^floor(log_10(x))+x

Name: Anonymous 2020-04-23 10:32

>>14
I wonder which approach Dubonacci himself would consider correct.

Name: Anonymous 2020-04-23 11:18

1313
143
Neither. The Dubonacci sequence produces dubs.
1 11
2 11
3 22
4 33
5 55
6 88
7 1133
8 2211
9 3344
10 5555
11 8899
12 114444
13 223333
14 337777
15 661100
16 998877
17 11559977
18 22558844
19 44118811
20 66776655
21 1100994466
22 1177771111
23 2288665577
24 4466336688
25 7755002255
26 112211339933
27 119966441188
28 331177881111
29 551144222299
30 883322004400
31 11334466226699
32 22117788330099
33 33552244557788
34 55770022888877
35 99222277446655
36 1144993300335522
37 2244115577881177
38 3399008888116699
39 6633224455998866
40 110022333344115555
41 116655558800114411
42 226677991144229966
43 443333449944443377
44 770011440088773333
45 11113344990033117700
46 11883366331111990033
47 22997711221155007733
48 44880077552266997766
49 77777788774422004499
50 1122558866226699002255
51 2200336655001111007744
52 3322995511228800009999
53 5533331166229911117733
54 8866226677557711227722
55 113399558833886622444455
56 222255885511443333771177
57 336655443355229966116622
58 559911228866772299887799
59 995566772222002266004411
60 11554488000088775555992200
61 22550044773300778811996611
62 44005522773399553377888811
63 66555577447700331199884422
64 1100661100220099885577772233
65 1177116677668800117777556655
66 2277777777889900003355228888
67 4444994455557700221122885533
68 7722772233446600224488114411
69 111177666699003300446600999944
70 119900339922449900770099113355
71 330088006611552211117700112299
72 449988445544001111887799226644
73 880066551155553333004499339933
74 11330044996699554444992288665577
75 22111111448855007777997788005500
76 33441166445544662222990066770077
77 55552277993399770000888844775577
78 88994444339944332233779911446644
79 1144447722333344002244667766222211
80 2233441166772288334488446677668855
81 3377888899006622337733114433990066
82 6611330055779900772211661111559911
83 9999119944885533009944775555449977
84 116600550000664433881166336677008888
85 225599669955449966991111112222558855
86 442200119966114400772277448899667733
87 667799889911663377663388661122225588
88 11110000008877777788336666110011993311
89 11777799997799441166000044771144118899
90 22888800006677119944337700881166112200
91 44666600004466661100337755553300330099
92 77554400111133880044774466334466442299
93 1122220000116600441155112211887766773388
94 1199774400227744221199886688222233116677
95 3311994400443344663344999900009999990055
96 5511668800770088885544885588332233007722
97 8833662211114433448899884488442222997777
98 113355330011885522334444770066774466004499
99 221188992222999955883344555555116699002266
100 335544222244884488117799226611991155007755

Name: Interview Question 2020-04-24 4:23

What's the difference between God and a doctor?

God doesn’t think He’s a doctor...

Name: Interview Question 2020-04-24 8:17

>>17
What's the difference between a pedophile and a primary school teacher?

A pedophile love children...

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List