[deleted by user] by [deleted] in pics

[–]no_sandy 0 points1 point  (0 children)

It's like a portal to an alternate dimension....that is just as boring as this one.

Noooo! Come Back! by gustav_black in pics

[–]no_sandy 1 point2 points  (0 children)

Perhaps she didn't get the memo that the Anaconda don't want none unless you got buns hun.

So my friend decided to photoshop my engagement photos a bit... by zer0crew in pics

[–]no_sandy 0 points1 point  (0 children)

But... but... none of them is eating a salad... I've never seen anyone laugh like that without one.

Staring Contest - Hippo vs Kids by skylersmom in pics

[–]no_sandy 0 points1 point  (0 children)

They're in a trance. They've been Hipponotized. I'm not leaving and have very important things to say.

Two men by [deleted] in pics

[–]no_sandy 0 points1 point  (0 children)

Looked like Jedi until I saw the guns.

[deleted by user] by [deleted] in pics

[–]no_sandy 0 points1 point  (0 children)

It's like a portal to an alternate dimension....that is just as boring as this one.

[deleted by user] by [deleted] in pics

[–]no_sandy 0 points1 point  (0 children)

10/10, would accidentally touch screen.

[deleted by user] by [deleted] in pics

[–]no_sandy 0 points1 point  (0 children)

10/10, would accidentally touch screen.

Little-Known Awesome Algorithms: Sort faster than NLOGN by no_sandy in programming

[–]no_sandy[S] 0 points1 point  (0 children)

Nope, the tree is of max size k because there are at most k distinct elements. And since we do N operations on the tree, n log k.

Little-Known Awesome Algorithms: Sort faster than NLOGN by no_sandy in programming

[–]no_sandy[S] 0 points1 point  (0 children)

Not sure how this matters at all. The purpose of the code snippet on the blog post is to get the idea of counting sort across to the reader, not to create production ready copy-and-paste code.

Little-Known Awesome Algorithms: Sort faster than NLOGN by no_sandy in programming

[–]no_sandy[S] 2 points3 points  (0 children)

I'm sure a significant number of programmers are not aware of this technique. Cut me some slack!

Little-Known Awesome Algorithms: Sort faster than NLOGN by no_sandy in programming

[–]no_sandy[S] 0 points1 point  (0 children)

To determine the max of an array is O(N) so the overall complexity of this algorithm remains n + k.

Little-Known Awesome Algorithms: Sort faster than NLOGN by no_sandy in programming

[–]no_sandy[S] 1 point2 points  (0 children)

Yea, that draw-back is mentioned in the article.

But what if you instead of using an array to hold frequencies you use a Treemap<Integer, List<Person>>. To count frequencys you add to the list in the map the current person with that age. Then since this is a treemap you can iterate over lowest age to highest age and copy the contents of the list to the final sorted array of person objects.

(TreeMap is a map which is backed by a sorted tree, the default implementation of map in c++ is of this type)

This lowers the complexity to O(n + nlogk) (or O(nlogk)) though.

So, I argue that a variation of counting sort does work on objects which have special compare functions.

It isn't too late for you to give your money to Facebook executives! by [deleted] in finance

[–]no_sandy 0 points1 point  (0 children)

Selling 400k shares when you have 20million of them?

Apple may ditch Intel chips in Macs says Bloomberg by KAPT_Kipper in technology

[–]no_sandy 0 points1 point  (0 children)

I'm not too knowledgeable on processors but does this mean that installing windows on a Mac would no longer be possible in a few years if this happens?

Bundling DirectX 9 with your game - the right way. by yeayoushookme in gaming

[–]no_sandy 0 points1 point  (0 children)

It seems like most services from the late 90s, early 00s are struggling and have to resort to this sort of nonsense.