|
-
October 25th, 2008, 03:53 PM
#2
Re: Silhouette of some buildings in a city - Need help coding this algorithm, please!
For small integers, just draw them on a bitmap and walk along the boundary.
Other than that, a tree or skip list where inserting a rectangle can split a node in two so that given an initial SkyLine(height, min_x, max_x) of (0, min, max) then adding (8, 10, 20) you get [(0,min,10),(8,10,20),(0,20,max)] as leaf elements.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|