based on this hash, i want to build like levels of directory :key=>value 1=>1 2=>1 3=>1 4=>2 5=>3 6=>4 7=>4 8=>8 9=>8
explanation: 1=>1 therefore 1 is root. Same is with 8. 2 & 3 are sub levels of 1 as shown in diagram. Do i need recursion for this? because number of elements is not fixed. Any hints how to do this? Thanks! Gaurav Talwar1 - 2 - 4 - 6 - 7 - 3 - 5 8 -9
In reply to how to build directory by megaurav2002
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |