Skip to content

Instantly share code, notes, and snippets.

View olihey's full-sized avatar
🏠
Working from home

Oliver Heyme olihey

🏠
Working from home
  • Halle (Saale), Germany
View GitHub Profile
@pelya
pelya / find_rects.cpp
Last active May 22, 2025 05:40
Find all rectangles in a 2D array, trying to cover as much area with as little amount of rectangles as possible. http://stackoverflow.com/questions/5810649/finding-rectangles-in-a-2d-block-grid
#include <stdlib.h>
#include <vector>
#include <utility>
#include <algorithm>
#include "find_rects.hpp"
namespace FindRects {
/* Algorithm was taken from here: http://stackoverflow.com/a/20039017/624766