Given many horizontal and vertical lines, how to find all the rectangles that do have any sub-rectangle inside them??

I have many horizontal and vertical lines which make up rectangle such as in this example. Is there an algorithm ...

Algorithm to fill large rectangle with smaller rectangles starting from center?

I have various sizes of rectangles, and I am trying to fit them into a larger rectangle starting from the center. Be...

Generic Graph Lib in Delphi, Speed of ObjectList?

we are developing an generic graph library using DELPHI XE7. The target graph size is ~ 1 MIO vertex nodes and ~ 1...

How to divide a rectangle into equally sized parts each connected to the perimeter??

I'm doing the Viewshed algorithm in a map reduce setting and have a pretty solid algorithm in mind (http://www.geoin...

How to picture “for” loop in block representation of algorithm?

I have probem / strange question, i got algorithm with few "for" loops and now i need to do block scheme of this alg...

Flip edge of two triangles?

I have an array with indices. Three of these indices make up a triangle. Now I take one triangle and search for anot...

Packing different sized circles into rectangle - d3.js?

I was trying to pack circles of different sizes into a rectangular container, not packing in circular container that...

Connect 4 algorithm in javascript?

What is the best way to check 4 in a row in connect 4? I won't copy the code for the array but it is basically an a...

How to make a AI system that chooses fastest way and navigates through walls to a certain grid spot?

Basically I'm trying to improve on the Ghosts in a Pacman game I'm making. In the orginal pacman when a Ghost is eat...

What is the best way to generate a random float value included into a specified value interval??

I want to generate a random float value in Java. The value has to be within a specific range of possible values. Fo...

Invoice / OCR: Detect two important points in invoice image?

I am currently working on OCR software and my idea is to use templates to try to recognize data inside invoices. Ho...

How to create a grid based on random shapes??

How to create a "grid" using actionscript like the image below? Basically you have an area of 1100x615 which shoul...

Procedurally Generate Low Poly Trees?

I am looking for an algorithm or product that will generate low poly trees. Doesn't matter the language. I have sear...

n log n is O(n)??

I am trying to solve this recurrence T(n) = 3 T(n/2) + n lg n .. I have come to the solution that it belongs to ma...