Skip to content

Instantly share code, notes, and snippets.

@SFzxc
Created July 19, 2016 03:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SFzxc/a97d5793abbb4f425e02a9b6e64ac5b3 to your computer and use it in GitHub Desktop.
Save SFzxc/a97d5793abbb4f425e02a9b6e64ac5b3 to your computer and use it in GitHub Desktop.
Input
Table Section
Section id Name
01 Bangiamdoc
02 NhanSu
03 Ketoan
04 Hr
05 Ruby
06 Android
Table Structure Section
Structure Section id | Section id | Upper_Section
1 01 nil
2 02 01
3 04 02
4 05 02
5 03 01
Output
Ban-giam-doc
|
|-----Nhansu
| |
| |----HR
| |____Ruby
| |____Android
|
|_____Ketoan
Ytuong, select Section id group upper co id = 01. Dua vo hash. Roi lai tiep tuc chay for nhung thang do, roi lai group tiep dua vo hash...
khi nao het thang upper thi dừng.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment