# Jane Street's 'Figurine Figuring' puzzle, solution and a tricky limit

Jane Street posted a Christmas-themed puzzle in January 2021:

Jane received 78 figurines as gifts this holiday season: 12...

Haphazard investigations

Jane Street posted a Christmas-themed puzzle in January 2021:

Jane received 78 figurines as gifts this holiday season: 12...

In Part 1 and Part 2 we looked at key array attributes such as shape, strides and offset and how NumPy implements array operations by changing these attributes to traverse a contiguous region of memory in different ways.

...Part 2 follows on from the key concepts of strided arrays introduced in the previous post and examines how NumPy implements other fundamental array concepts using strides:

- Transposing Arrays and Permuting Axes
- C order vs. Fortran order
- Ravelling...

Welcome to the first part of a three-part illustrated guide examining shapes, strides and multidimensionality in NumPy.

The idea of strided arrays is simple, and is a basis for implementing arrays, matrices and tensors in many higher-level languages...

You might see the approximation:

\[\pi \approx 768{\sqrt {2-{\sqrt {2+{\sqrt {2+{\sqrt {2+{\sqrt {2+{\sqrt {2+{\sqrt {2+{\sqrt {2+{\sqrt {2+1}}}}}}}}}}}}}}}}}}\]and think:

**Hmmm! How accurate...
**

There are 12 unique permutations of the word ‘food’. Of these, there are only six that satisfy the constraint that no adjacent...

Expectation Maximisation is a fantastically useful algorithm used to estimate model parameters (e.g. the bias of a coin, or the mean of...

The inverse square root of a number x is x^{-1/2}. For example, put in 25, you’ll get back 0.2: the square root of 25 is 5, the inverse of 5 is 1/5, or 0.2 in decimal notation. It’s a very...

I’ve started compiling a list of short pandas puzzles of varying difficulty. You can find it over on GitHub here.

There are already some great guides to pandas out there (not least in the official documents themselves) but nothing...

If you’ve played about with NumPy before, you’ll probably know that given two arrays of numbers, `ar1`

and `ar2`

, the function `in1d`

returns a boolean array indicating whether or not each number in...

Stack Overflow, the hugely-popular programming Q&A website, has often been called an online game. To play, you post correct answers or ask interesting questions. Correct and interesting content is upvoted by other users, netting you precious green reputation points.

The...

If you have a list of numbers, say `[3, 2, 2, 2]`

, what’s the best way to turn it into a power tower?

In other words, the aim is to take the list and calculate the answer to...

The `einsum`

function is one of NumPy’s jewels. It can often outperform familiar array functions in terms of speed and memory efficiency, thanks to its expressive power and smart loops. On the downside, it can take a little...

What colour is the Internet? Probably green or blue, judging by the colours that appear most often in domain names.

The graph below shows 12 colours and the number of times each one appears in .com and .net domain names....

There are over 130 million .com and .net domain names. Is every single English word being used?

Curious, I hatched a plan and found the answer: **not at all**.

By my reckoning, only around 64% of all recognisable English...

Welcome!

Whenever I stumble across something interesting and I can condense it into a short blog post, it will go on this site.

Alex