#learn-coding

Read more stories on Hashnode

Articles with this tag

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...

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...

By iterating digit by digit, and calculating the sum and carry, it handles scenarios for the lengths of the input lists and any remaining carry values ·...

Finding the first non-repeating character in a string · Problem statement You have a string called s. Your objective is to locate the index of the first...

How to decode Roman numbers · Problem statement Roman numerals are represented by seven symbols: I, V, X, L, C, D, and M. Symbol Value I ...