Greg (gregstoll) wrote,
Greg
gregstoll

  • Mood:

random WTF

I don't usually post stuff like this, but this is possibly the best programming WTF ever. Add() reallocates memory each time (although I guess maybe the C# Array class does the doubling thing for you?), and Remove()...ow, my eyes! O(n^2) FTW.

The explanation at the end, of course, seals the deal.
Tags: links, programming
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 3 comments