Suhail Sherif
Sports, thinking and programming
Sports, thinking and programming
Communities and Collections
View all
Posts
Can you find the computational complexity of this problem?

Input: An array A of numbers
Output: An array B of numbers such that B[i] is the smallest number larger than A[i] in the subarray starting from A[i+1]. (X if no such number exists)

Example:
Input:    [11, 69, 16, 81, 78, 94, 21, 20, 82, 91]
Output: [16, 78, 20, 82, 82, X,   82, 82, 91, X  ]

Good upper bounds and lower bounds would do.
Here's a question some friends and I had fun solving:

There's an infinite chess board (infinite in both dimensions), you have an army and the opponent has only a king left. You have to place your army on the board, then the opponent will place the king on the board. Your task is to capture the king (checkmate, no stalemate) in a finite number of moves.
Part a: only queens
Part b: only rooks
Part c: only bishops
Part d: only knights
Post has attachment
Nexus 7 (2012, WiFi) battery problems!

tl;dr not even awake and charging, but battery still drains. Also, battery did not charge while tablet was off despite the tablet showing itself as charging.

I'm having serious trouble with my Nexus 7. First, the battery drained, the tablet went off and I couldn't charge it or turn it on. After doing some magic connecting to computer stuff Google recommended, it started working. I charged it fully and turned it on. As you can see in the pic, the battery continued draining while it was not awake and kept for charging (albeit with a MotoG charger). Somehow it charged a bit after waking it up. (Or maybe anomaly in data).

Confused, I turned it off and put it for charge so that I can get proper data. To my shock, when I turned it on hours later after leaving it on charge, it had not charged at all despite the screen showing charging symbols.

Has anybody had these problems? Any idea what I should do?
Post has attachment
"The best reporting on social science statistics, like the best reporting in most areas, comes from The Onion"
- SlateStarCodex
Post has attachment
For what values of r can a circle of radius r intersect the graph of ln(x) 4 times?
Post has attachment
http://qr.ae/GKXLi
A very well written article on mapping patterns to integers.
Post has attachment
http://qr.ae/GKXLi
A very very well written explanation of how you can map bitmaps to integers.