Click here to Skip to main content
15,112,662 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: 25 years of programming reduced to a question. Pin
jsc4223-Sep-20 23:31
professionaljsc4223-Sep-20 23:31 
GeneralRe: 25 years of programming reduced to a question. Pin
Gerry Schmitz24-Sep-20 12:45
mveGerry Schmitz24-Sep-20 12:45 
GeneralRe: 25 years of programming reduced to a question. Pin
jsc4225-Sep-20 0:13
professionaljsc4225-Sep-20 0:13 
GeneralRe: 25 years of programming reduced to a question. Pin
OriginalGriff23-Sep-20 3:57
mveOriginalGriff23-Sep-20 3:57 
GeneralRe: 25 years of programming reduced to a question. Pin
Jeremy Falcon23-Sep-20 4:04
professionalJeremy Falcon23-Sep-20 4:04 
GeneralRe: 25 years of programming reduced to a question. Pin
raddevus23-Sep-20 6:25
mvaraddevus23-Sep-20 6:25 
GeneralRe: 25 years of programming reduced to a question. Pin
Jeremy Falcon23-Sep-20 7:07
professionalJeremy Falcon23-Sep-20 7:07 
GeneralRe: 25 years of programming reduced to a question. Pin
Daniel Pfeffer23-Sep-20 7:21
professionalDaniel Pfeffer23-Sep-20 7:21 
But internally, the splice() operation is performing an O(N) operation - moving all elements down by one position. Your solution is therefore O(N^2).

If I were the interviewer, I would ask if you can see a problem with this solution, and then ask you for a more efficient (O(N)) solution.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.

GeneralRe: 25 years of programming reduced to a question. Pin
raddevus23-Sep-20 8:21
mvaraddevus23-Sep-20 8:21 
QuestionRe: 25 years of programming reduced to a question. Pin
Jeremy Falcon23-Sep-20 12:03
professionalJeremy Falcon23-Sep-20 12:03 
JokeRe: 25 years of programming reduced to a question. Pin
Daniel Pfeffer23-Sep-20 21:39
professionalDaniel Pfeffer23-Sep-20 21:39 
GeneralRe: 25 years of programming reduced to a question. Pin
Jeremy Falcon24-Sep-20 2:40
professionalJeremy Falcon24-Sep-20 2:40 
GeneralRe: 25 years of programming reduced to a question. Pin
Martin ISDN24-Sep-20 3:45
MemberMartin ISDN24-Sep-20 3:45 
GeneralRe: 25 years of programming reduced to a question. Pin
Jeremy Falcon24-Sep-20 7:42
professionalJeremy Falcon24-Sep-20 7:42 
GeneralRe: 25 years of programming reduced to a question. Pin
raddevus23-Sep-20 6:55
mvaraddevus23-Sep-20 6:55 
GeneralRe: 25 years of programming reduced to a question. Pin
OriginalGriff23-Sep-20 7:25
mveOriginalGriff23-Sep-20 7:25 
GeneralRe: 25 years of programming reduced to a question. Pin
raddevus23-Sep-20 8:19
mvaraddevus23-Sep-20 8:19 
GeneralRe: 25 years of programming reduced to a question. Pin
rnbergren23-Sep-20 3:58
Memberrnbergren23-Sep-20 3:58 
GeneralRe: 25 years of programming reduced to a question. Pin
Jeremy Falcon23-Sep-20 4:07
professionalJeremy Falcon23-Sep-20 4:07 
GeneralRe: 25 years of programming reduced to a question. Pin
Fueled By Decaff23-Sep-20 5:52
MemberFueled By Decaff23-Sep-20 5:52 
GeneralRe: 25 years of programming reduced to a question. Pin
jsc4223-Sep-20 11:47
professionaljsc4223-Sep-20 11:47 
GeneralRe: 25 years of programming reduced to a question. Pin
Jeremy Falcon23-Sep-20 12:09
professionalJeremy Falcon23-Sep-20 12:09 
GeneralRe: 25 years of programming reduced to a question. Pin
Gary R. Wheeler23-Sep-20 13:21
MemberGary R. Wheeler23-Sep-20 13:21 
GeneralRe: 25 years of programming reduced to a question. Pin
David Crow23-Sep-20 4:07
MemberDavid Crow23-Sep-20 4:07 
GeneralRe: 25 years of programming reduced to a question. Pin
Kornfeld Eliyahu Peter23-Sep-20 4:39
professionalKornfeld Eliyahu Peter23-Sep-20 4:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.