Simple algorithm I made for stacking randomly generated rectangles into a larger one. Done using win32 apie for the visuals. Algorithm works using a grid class which can be split into different sections based on coordinates. This grid is then used by a recursive method to find possible gaps and try to fill rectangles in the in all possible ways until they all fit.
To run it, launch the application, enter 3 inputs in the fields - Main rectangle height, width and number of rectangles to fit. Then hit the generate button to the right and split button afterwards.