Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save at-longhoang/139c38bfdfe97d9b8ccb23ac8fd815b1 to your computer and use it in GitHub Desktop.
Save at-longhoang/139c38bfdfe97d9b8ccb23ac8fd815b1 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