Editing 1685: Patch

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 43: Line 43:
 
  <font color="red">return </font>quicksort(l)<font color="red">+</font>mid<font color="red">+</font>quicksort(r)
 
  <font color="red">return </font>quicksort(l)<font color="red">+</font>mid<font color="red">+</font>quicksort(r)
  
isPrime and quicksort are standard python implementations of simple algorithms (although you would not generally write a sorting algorithm in python as there are built-in algorithms available).  isPrimeRegex uses the [https://docs.python.org/library/re.html re module] to detect if a number is prime by seeing if a string containing that many 1s can be matched to 2 or more copies of some string containing at least 2 1s.
+
isPrime and quicksort are standard python implementations of simple algorithms (although you would not generally write a sorting algorithm in python as there are built-in algorithms available).  isPrimeRegex uses the [https://docs.python.org/2/library/re.html re module] to detect if a number is prime by seeing if a string containing that many 1s can be matched to 2 or more copies of some string containing at least 2 1s.
  
 
The comic two comics back [[1683: Digital Data]], also related to turning digital data into bad copies. Less than a month before quicksort was mentioned in [[1667: Algorithms]], and a month before that another "easy" solution to a programming problem was released in [[1654: Universal Install Script]].
 
The comic two comics back [[1683: Digital Data]], also related to turning digital data into bad copies. Less than a month before quicksort was mentioned in [[1667: Algorithms]], and a month before that another "easy" solution to a programming problem was released in [[1654: Universal Install Script]].

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)