On mut semantic for ownership

I’ve just solved a problem at Leetcode with following signature:

pub fn num_islands(grid: Vec<Vec<char>>) -> i32

When I solved it I changed it to:

pub fn num_islands(mut grid: Vec<Vec<char>>) -> i32 {

type alias versus newtype in Rust

No, not that newtype.

I’ve started next chapter of my Rust study, which is, ‘write your own list’. If you don’t know, writing list in Rust is really challenging, because Rust do not permit corner-cutting. Lists are at least 50% pointers, and the…