You might find this free coursea course of interest Algorithms, Part I[^] It's from Princeton University and co-taught by Robert Sedgewick (who was one of Knuth's grad students). It covers all sorts of algos including heapsort.
grgran
Posts
-
Does the typical regular programmer understand HeapSort? -
How are you in maths?I refuse to take part is such a travesty. Imagine being tested by a country that pluralizes Math and sells weight in stones in monetary units of pounds ... it's just crazy. :laugh:
-
I'm still angry with Microsoft.You don't need no stinking setup template ... everybody going to install stuff from the "store", after all the desktop is dead and everyone is using a tablet ... right. The MS motto, "if it ain't broke, keep f***ing with it till it is" :mad:
-
I Propose We Rename \ and /"The name of a thing does not matter as much as the quality of the thing." -WS The options given are all left to right (English reading order) biased. Put another way one person’s slide is another person’s hill. The Unicode tables refer to these as: / Solidus (with alternatives slash and virgule) \ Reverse Solidus (with alternative backslash) If you need to be explicit always refer to solidus as “a line moving from the bottom left to the top right of imaginary box enclosing the character” … or slash. Do that a couple of times and people will become “not confused”.
-
A pop quiz for Computer Science Education Week (Dec 5-10)I believe "Hello Kitty" is still available as a programming language name. I think it's been attached to everything but a programming language. :-) PS: I still think the answer to A is the retail chain from which Babbage got his name.
-
Does the Internet make software developers lazy?I googled your question and it told me no it doesn't.
-
Really frustrated when moving from C# to C++It's easy, whenever you get a compiler error just add a "const" keyword near by and keep adding them till the error goes aways. ;-)
-
python just for funThat's ok, cause the Milky Way isn't a solar system :-) Maybe I should start pushing (m) as the smart-ass emote ;-)
-
Default or optional Parameters in C#As already pointed out, optional, default and named parameters are available in .NET 4.0 Interestingly, if you do use them the code analysis tool slaps your hand about it, requesting that you create overloads with the defaults set in method. G
-
Why is .NET so popular? (Serious Question)DIP switch !!! DIP switch!!!! that's for you little ones just out of diapers Paddle switches are what you need I don't want to get out my bifocals magnifying glass just to move a switch with a toothpick. Real men use big beefy paddle switches for input (directly into memory) in octal, cause hex is for sissies.
-
Today, I used goto to double-break out of nested loopsOMG!!! I can see the coming of the apocalypse !!
-
Is flash a good choice for building a site?I first response was; "sure what kind of game or ad are you writing". Then I saw that you are actually trying to do something useful with it. In that case "OH GOD IT'S HORIBLE". As soon as you try to do anything “non-trival” you are going to hit problems. The client side memory foot print is absurd in that memory requirements grow no matter what you do (including deleting objects). Adobe support is “talking to a wall” (well not really that good, cause at least you can hear an echo from a wall). Flash/Flex is at best a “gun meet foot” option. HTML5 might be very good, who knows it isn’t really finished, and no one supports it fully. I believe it will become a powerful “player” but not this year or next. If it were me I’d look at other sites that serve up video and figure out what they use. I’m a big Netflix fan, they use Silverlight. All that said I see that the project has already started and flash has already been choosen. I truly wish you luck with that and hope that time to market isn't an issue.
-
Find an algorithmOk, wow ... ummmm, your welcome?
-
Find an algorithmSimple because with all the unknowns, 30 secs after the method is finished some "new" result will be expected. Boolean expression are fine when what you are trying to communicate is clear. In this case things don't appear to be 'clear'. Converting isn't necessary, it's just helpful. Cheers
-
Find an algorithmIf it were me I'd ask a lot more questions of whoever gave you this. The first two inputs to Logic appear to have no effect on the result and (if that's true) should be removed. This leaves a four bit table mapping: false, false, false, false, false false, false, true, true, true false, false, true, false, false true, false, true, true, false true, true, true, true, true Which can also be looked at as a bit table d dl r rl Exp Dec 0 0 0 0 0 00 * 0 0 0 1 ? 01 0 0 1 0 0 02 * 0 0 1 1 1 03 * 0 1 0 0 ? 04 0 1 0 1 ? 05 0 1 1 0 ? 06 0 1 1 1 ? 07 1 0 0 0 ? 08 1 0 0 1 ? 09 1 0 1 0 ? 10 1 0 1 1 0 11 * 1 1 0 0 ? 12 1 1 0 1 ? 13 1 1 1 0 ? 14 1 1 1 1 1 15 * There doesn't appear to be an obvious pattern, but there are lots of unknowns. I'd be tempted to change Logic to remove the first two parameters and return a bool? (nullable). I'd then convert d, dl, r and rl into a single byte value and use a switch statement to return the known results, returning null for undefined results. If a pattern later emerges you can do something 'pretty' then.
-
WPF is dead? A sane voice in the madnessI didn't even know it was dead, now you point me to something that tells me it's not ... this is almost half as confusing as working with WPF is. At least WPF is still around and still programmer hostile, undiscoverable, non-intuitive and just plan weird in places ... thank buddha for Expression Blend 4.0, that's an app that makes hand coding in notepad down right desirable. BTW I think the Message Type should be built with checkboxes rather than radio buttons cause this is part rant, part joke (ok, mostly rant, ok radio buttons are ok ;P ).
-
goto loopsOk, say you are in one part of your code and you want to be in another part ... well there you "goto" :laugh: :-D
-
Is this cool?One day everyone will have a flying car ... and live in an underground bunker
-
Programming ability over age [modified]Smart and flexible get better. Stupid and fixed stay the same, but look worst because the world occasionally progresses I could be able to select both Joke and Rant for this :-D
-
need sorting and searching algorithm - help plz, urgent!If you have been married for 32 years everyone in the house should be old enough to go to the line and get/match their own socks!