Greedy Algorithm to Group the Numbers/Items Given the Group Size They Belong To December 12, 2019 algorithms, c / c++, greedy algorithm No Comments There are n people whose IDs go from 0 to n – 1 and each person belongs exactly to one group. Given the array groupSizes of length n telling … [Continue Reading...]
How to Get the Maximum Level Sum of a Binary Tree using Breadth First Search Algorithm? August 26, 2019 algorithms, c / c++, programming languages No Comments Given the root of a binary tree, the level of its root is 1, the level of its children is 2, and so on. Return the smallest level X … [Continue Reading...]