The "n not in deduped" is a linear search of deduped.
this is the second n
and getting it down that far takes a fairly large amount of knowledge about the data. How did you think you were getting a presence test in linear time? That isn't possible
Please check out the Hash Map chapter of Introduction to Algorithms by CLRS.
Yeah, that just moves the cost from test to insert
Look, if you're going to talk down to people this way, don't ask for explanations from them
Present the container
O(n)
😂 no, returning a pointer isn't o(n)
What details are you hiding in function?
You're trying to make commentary about container conversion costs by pretending that there's a conversion function?
You're ignoring clearly spelled out mistakes already given to you.
What should be worth your time is researching hash maps.
Nobody asked for your advice.
I realize you're trying to win, but there's no fight here. You asked me to explain myself, I did, you tried to argue, and I walked away.
Imagine telling someone returning a container was o(n), not admitting the mistake when it's pointed out, and continuing to try to give someone else a reading list 😂
"No but when you said converting containers, did you mean printing them on screen?"
1
u/[deleted] May 15 '21 edited Aug 31 '25
[removed] — view removed comment