Photo by Allan Mas from Pexels The Problem Recently, I was posed the “Longest Increasing Subsequence” problem in the CodeConnector community on Slack. It’s one of those coding questions that shows up in some form or another on a lot of coding puzzle/interview prep sites. If you haven’t seen it before (like I hadn’t), the problem statement is as follows (this description comes from LeetCode): Given an integer array nums, return the length of the longest strictly increasing subsequence.
I’ve mentioned in other posts that I’ve been learning the Rust programming language, with the explicit intention of implementing some R functionality in Rust for performance gains. I discuss this rationale in more detail in THIS blog post. In that post, I discuss the rustbind project, where I explore strategies for calling Rust code in an R package. The goal of that project is to provide a straightforward set of patterns that I (and other developers) can leverage for integrating Rust into future R projects.
I’ve recently (since the beginning of 2021) been trying my hand learning and using Rust, and so far it has been a really good experience. Rust has a lot to recommend it, including top-notch tooling, inherent memory safety, and blazing speed. That last part comes from the fact that Rust is a compiled, systems programming language and was the inspiration for picking up Rust in the first place. You see, I absolutely love R.