Rust is a statically and strongly typed systems programming language. Rust is for people who crave speed and stability in a language.

I consider myself as a Rust beginner. I started learning Rust after writing this article and I am still learning new things every day. I am at the stage where I can convert simple Python code to Rust and able to explain what I am coding.

In this article, we are going to use a Python solution of one of Leetcode problems and convert it to Rust code. You will find not only similarities between two languages but also learn Rust programming.

Leetcode Unique Paths

LeetCode is a very popular website where you can level up your coding skills. One of the problems is called “Unique Paths” where you can only move either down or right. You need to find how many unique paths there are between two points.

Image for post

For example from point A to B in the image below, there are 3 unique paths and from A to C there are 5 unique paths. The following diagram helps you to find the number of unique paths from A to each area. Since you only move down or right, you add the number above and left to find the number of the unique paths to that point.

Image for post

#rust #rustlang #python #programming

Learning Rust by Converting Python to Rust
2 Likes15.90 GEEK