Latest Tweets:

computersciencetumbld:

The Quicksort Algorithm

Quicksort is the fastest known comparison-based sorting algorithm (on average, and for a large number of elements), requiring O(n log(n)) steps. By convention, n is the number of elements to be compared and big O is a function of those elements. Quicksort is a recursive algorithm which first partitions an array according to several rules:

  1. Pick an element, called a pivot, from the array.
  2. Reorder the array so that all elements with values less than the pivot come before the pivot, while all elements with values greater than the pivot come after it (equal values can go either way). After this partitioning, the pivot is in its final position. This is called the partition operation.
  3. Recursively apply the above steps to the sub-array of elements with smaller values and separately to the sub-array of elements with greater values.

Quicksort was invented by Tony Hoare and has undergone extensive analysis and scrutiny, and is known to be about twice as fast as the next fastest sorting algorithm. In the worst case, however, quicksort is a slow algorithm (and for quicksort, “worst case” corresponds to already sorted). (Click this link for an example of the Quicksort Algorithm written in C)

Credit: Wolfram Alpha/Wikipedia

(via lifeandcode)

(via gwendalyne)

theeconomist:

This week’s cover: What does China want? As our essay explains, it craves the respect it enjoyed in centuries past, but it does not know how to achieve or deserve it. Our cover leader asks how the United States should respond to a rising power which is unhappy with Pax Americana in its own region. Even in security, we argue, America needs to make more room for China.

theeconomist:

This week’s cover: What does China want? As our essay explains, it craves the respect it enjoyed in centuries past, but it does not know how to achieve or deserve it. Our cover leader asks how the United States should respond to a rising power which is unhappy with Pax Americana in its own region. Even in security, we argue, America needs to make more room for China.

art-of-swords:

Silver mounted Sabre

  • Dated: first quarter of the 20th century
  • Place of Origin: Daghestan
  • Measurements: overall length 85.5 cm

The sword a curved, single-edged blade grooved at the centre, engraved with woven bands at the edges. The silver hilt is decorated with nielloed floral motifs, while the “S”-shaped quillons is ending in the shape of lion head. The pommel is also shaped as a lion head, while the grip has a bone medallion richly pierced with floral motifs. The silver-plated wooden scabbard is decorated en suite.

Source: Copyright © 2014 Czerny’s International Auction House S.R.L.

magictransistor:

Edvard Munch. Anxiety. 1854.

magictransistor:

Edvard Munch. Anxiety. 1854.

(Source: Spotify)

(Source: Spotify)

enochliew:

Algarrobos House by José María Sáez & Daniel Moreno Flores

Eight identical steel members, 18 meters long, placed along the x y z axis, confine the space for the house and at the same time open it as they project in different directions.

(Source: arqsaez.com)