- Executors
-
Learn
Learn Python Runnable examples, NumPy, pandas, and more Learn AINeural networks, ML and LLMs from scratch Learn C & C++ Pointers, memory, STL, and modern C++ Learn C#C# basics, OOP, LINQ, async, and .NET exercises Learn MatplotlibLine, bar, scatter and pie charts with live visualizers Learn RustOwnership, traits, error handling, and threads Learn GoSlices, interfaces, goroutines, and channels Python Algorithms Search, sorting, recursion, and visualizers O(n) C & C++ Algorithms Compare algorithms implemented in C and C++ Coding for Kids Learn to code by playing!
- ChallengesNew
- For TeachersNew
- Updates
- Buy me a coffee
Ownership and borrowing
Moves, references, slices, lifetimes and smart pointers: the ideas that keep Rust memory-safe without a garbage collector.
- Lesson 1 challenge Ownership and Moves Learn the rule behind Rust's memory safety: every value has one owner.
- Lesson 2 challenges References and Borrowing Let a function use a value without taking ownership of it.
- Lesson 2 challenges Slices Borrow part of a string or array without copying it.
- Lesson 1 challenge Lifetimes Tell the compiler how long references stay valid with lifetime annotations.
- Lesson 1 challenge Smart Pointers: Box and Rc Put data on the heap with Box and share ownership with Rc.