-1

Looking for pseudo-code for creating a visual representation of a binary tree using 2D volume as data source.

Task: Convert an associative array containing name and volume data to a visual 2D chart that automatically makes the decision to split volumes according to how much space is left for each subsequent area contained within the list.

Assumptions: Aware of root/parent structure. (Can have one root, but multiple large blocks, containing smaller blocks within. Can represent, HD folder structure, for example.)

Example of the resulting chart and associated data: The visual chart is the proverbial output of the pseudo code that would be required in order to solve this problem.

Ps: I couldn't find this elsewhere on StackOverflow. Has anyone done this before?

Output

The most elegant solution that I have found so far in a real-world application was WinDirStat:

enter image description here

Can anyone come up with pseudo code for something like this?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
InfiniteStack
  • 430
  • 2
  • 9

1 Answers1

1

Which language? Regardless, you would be hitting the WinAPI https://msdn.microsoft.com/en-us/library/windows/desktop/aa373088.aspx

If you are not a natural programmer, WinAPI support for low level programming can be less than ideal.

Other than that, it's not to bad.

Here are some other possibilities. Windows API to get netstat -s statistics

Community
  • 1
  • 1
doh
  • 67
  • 4