About two weeks ago, I came across a post via /r/programming: Quadtree Art(src). In a sentence, the goal is to recursively divide an image into a quadtree, at each step expanding the current node with the largest internal variance.
About two weeks ago, I came across a post via /r/programming: Quadtree Art(src). In a sentence, the goal is to recursively divide an image into a quadtree, at each step expanding the current node with the largest internal variance.
Mathematicians are an odd bunch. Names for just about everyhing. There are amicable numbers and perfect number, sociable number and betrothed numbers. There are sublime number, frugal number, and quasiperfect number. Heck, there are powerful number, smooth number, and even sphenic numbers. Rather a lot to deal with all told… So let’s just focus on two of them: perfect numbers and amicable numbers.
Another day, another challenge from /r/dailyprogrammer. It’s almost two weeks old now, but I’ve just now had a chance to get around it.
Your company has built its own telephone network. This allows all your remote locations to talk to each other. It is your job to implement the program to establish calls between locations.
Last week on /r/dailyprogrammer, there was a neat trio of posts all about a new compression algorithm:
More specifically, we’re going to represent compressed text with the following rules:
Got it? Let’s go!
(If you’d like to follow along: full source)
Yesterday’s post at /r/dailyprogrammer managed to pique my interest1:
A triangle on a flat plane is described by its angles and side lengths, and you don’t need all of the angles and side lengths to work out everything about the triangle. (This is the same as last time.) However, this time, the triangle will not necessarily have a right angle. This is where more trigonometry comes in. Break out your trig again, people.
It’s been a while, so I figured I should get in a quick coding post. From /r/dailyprogrammer, we have this challenge:
The Gorellians, at the far end of our galaxy, have discovered various samples of English text from our electronic transmissions, but they did not find the order of our alphabet. Being a very organized and orderly species, they want to have a way of ordering words, even in the strange symbols of English. Hence they must determine their own order.
For instance, if they agree on the alphabetical order: UVWXYZNOPQRSTHIJKLMABCDEFG
Then the following words would be in sorted order based on the above alphabet order: WHATEVER ZONE HOW HOWEVER HILL ANY ANTLER COW
Here’s a 5 minute1 coding challenge from Programming Praxis:
A caeser cipher, named after Julius Caesar, who either invented the cipher or was an early user of it, is a simple substitution cipher in which letters are substituted at a fixed distance along the alphabet, which cycles; children’s magic decoder rings implement a caesar cipher. Non-alphabetic characters are passed unchanged. For instance, the plaintext PROGRAMMINGPRAXIS is rendered as the ciphertext SURJUDPPLQJSUDALV with a shift of 3 positions.
– Source: Wikipedia, public domain
Pretty pretty picture time1:
So far this week we’ve had a pair of related posts at the DailyProgrammer subreddit1:
Basically, if you’re given a string with vowels, take them out. If you’re given one without vowels, put them back in. One of the two is certainly easier than the other2. :)
Thirty second programming problem from Programming Praxis:
Your task is to write a progam that determines how many times the hands cross in one twelve-hour period, and compute a list of those times.
Ready?