Source: Day 3: Mull It Over
Full solution for today (spoilers!).
Part 1
Given a string containing (among other gibberish) commands of the form
mul({A}, {B})
where{A}
and{B}
are integers, calculate the sum ofA*B
s.
Full solution for today (spoilers!).
Given a string containing (among other gibberish) commands of the form
mul({A}, {B})
where{A}
and{B}
are integers, calculate the sum ofA*B
s.
Another Redis in Rust series. It’s really starting to come together now!
In this post, updating the state to store expiration times + a thread to handle said eviction + the implementation of a small pile more of the general Redis functions.
And I’m back. It’s been a busy month with the [Genuary]([Genuary 2023]) series and life in general, but I’m still thinking about Redis in general 😄.
Up this time, let’s see what the official redis-cli
app does when talking to our client and actually start handling some commands. Specifically, the very basic commands: SET
and GET
. With that, we would actually have a (very very basic) keystore up and running!
Okay, we’ve got a server and we can ping it. Let’s actually make a simple client, so I don’t have to do funny things with echo any more. Specifically, let’s make a REPL!
Recently, I read through Build Your Own Redis with C/C++. C/C++ are ugly, so let’s run through it in Rust!
My goal: implement some large subset of Redis (both server and client) in Rust. For any features I implement, it should be compatible with Redis off the shelf. I should be able to use their client with my server and their server with my client and it should just work.
No idea if this is going to work out, but it sounds like an interesting problem!
First task: the REdis Serialization Protocol (RESP).
Given pairs of
Signal
s (where aSignal
is a nested list ;example:[[1],[2,3,4]]
), count how many pairs are ‘in order’.
One Signal
is less than the other if:
Given a height map, find the shortest path between two points such that the path can descend any distance but can only climb by a maximum of 1.
Simulate a collection of ‘monkeys’. Each monkey will have a number of items which it will then apply a mathematical operation to, then always divide by 3, then test divisibility to pass to one of two other monkeys. Return as answer the product of the two highest number of times a monkey applies it’s main function to individual items after 20 steps.
Note: Monkeys will always be evaluated in order (so monkey 1 will evaluate any items passed by monkey 0 again in the same round).
w
, x
, y
, and z
) and instructions defined below. Find the largest 14 digit number with no 0 digits which result in z=0
.version
.