#programming-blogs

Read more stories on Hashnode

Articles with this tag

A simple example of using C++ switch · Problem statement Given a positive integer n, generate an n x n matrix filled with elements from 1 to n^2 in...

Two dynamic programming techniques to solve Leetcode 120. Triangle. One has space complexity O(n^2). The other is O(n). · Problem statement You're...

An example of using a sliding window approach and an unordered map to track character positions · Problem statement Given a string s, find the length of...

A simple C++ solution to Leetcode 1695. Maximum Erasure Value using a sliding window approach and prefix sums. · Problem statement You are given an array...

The math behind Leetcode 342. Power of Four. · Problem statement Given an integer n, return true if it is a power of four. Otherwise, return false. An...

A C++ solution to Leetcode 804. Unique Morse Code Words using mapping and std::unordered_set to keep track of unique representations. · Problem...