How To Count Unique Paths In A Grid With Obstacles
A C++ solution to Leetcode 63. Unique Paths II, counting the number of unique paths in a grid with obstacles using dynamic programming.
How to Perform a Counting Using Array and Hash Table
A simple C++ solution to Leetcode 387. First Unique Character in a String.
How to Convert a Given Roman Numeral to its Equivalent Integer Value
A C++ solution to Leetcode 13. Roman to Integer using Hash table.
How To Find a Nearest Common Ancestor In a Binary Search Tree
A C++ recursive approach to solve Leetcode 235. Lowest Common Ancestor of a Binary Search Tree.
Efficient Code: Reducing Maintenance, Bugs, and Enhancing Readability
Efficient code isn't just about speed; it's a recipe for reduced maintenance, fewer bugs, and improved readability. Discover how optimizing your code can streamline your development process, enhance software reliability, and create a user-friendly experience.
How to Define a Custom Comparison For a std::set
An example of defining a custom comparison for a std::set. A C++ solution for Leetcode 729. My Calendar I.
How To Shift Elements of a Matrix
How to convert a 2D grid to a 1D vector to make the shifting operations simpler. The modulo operator helps loop back to the start of the vector after k shifts.
Beyond Code Efficiency: The Profound Benefits of Finding Optimal Solutions
Discover how finding optimal solutions enhances your problem-solving skills, strengthens your debugging abilities, and builds a repository of knowledge. Engage with the coding community, self-assess your progress, and boost your confidence as a coder.
How To Find The Largest Divisible Subset of a Given Integer Set
Two C++ approaches to solve Leetcode 368. Largest Divisible Subset. One uses recursion with dynamic programming. The other saves the memory by only storing the representative of the chains.
How To Put As Many Things As You Can On a Truck
A Greedy approach for Leetcode challenge 1710. Maximum Units on a Truck. It is also an example of a comparison between STL's vectors in C++.