# All Questions

Tagged with
10 questions
3k views

Upside-Down Pyramid Addition is the process of taking a list of numbers and consecutively adding them together until you reach one number. When given the numbers ...
479 views

### Consistent Overhead Byte Stuffing (COBS)

I'm surprised this hasn't been posted before! The Consistent Overhead Byte Stuffing (COBS) algorithm is used to delimit byte streams. We choose a frame marker (we'll use 0x00) and wherever 0x00 ...
221 views

### Matrix trace for any matrix through… Bresenham’s line rasterisation

Inspired by this. Agatha Stephendale, a sophomore who is really into raster graphics, has taken a course in linear algebra. Now she imagines matrices as rectangles, but in her artistic mind, she ...
2k views

### 128 years? Hypothetical leap year reform

The solar year is 365 days, 5 hours, 48 minutes, 45 seconds, and 138 milliseconds, according to this video. With the current Gregorian calendar, the rules for leap years are as follows: ...
364 views

### Golfing Newton's Method

I have the following code which I've written to emulate Newton's method for deriving the square root of a number: ...
2k views

### Ethiopian Multiplication

This question is inspired by this answer. Coincidentally, I used to use Ethiopian Multiplication when I was a kid, but had never known the name of the method until recently. Ethiopian multiplication ...
3k views

### The Original Number

Guidelines Scenario John has an important number, and he doesn't want others to see it. He decided to encrypt the number, using the following steps: His number is always a non-decreasing sequence (...
474 views

### Golf Me A Bubble Sort [duplicate]

Your task is to create a program that performs a bubble sort on a given array until it is sorted. Algorithm In order to qualify as a bubble sort, the program must operate as follows: Each pass goes ...