#cpp

Read more stories on Hashnode

Articles with this tag

An example of the greedy algorithm · Problem statement You are assigned to put some amount of boxes onto one truck. You are given a 2D array boxTypes,...

An example of the prefix sum technique · Problem statement Given an integer array nums, return an array answer such that answer[i] is equal to the...

Median - The math behind the problem · Problem statement Given an integer array nums of size n, return the minimum number of moves required to make all...

Problem statement A string s is called good if there are no two different characters in s that have the same frequency. Given a string s, return the...

Problem statement There are several cards arranged in a row, and each card has an associated number of points. The points are given in the integer...

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