| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- package modules
-
- /*
- Sub정보들을 관리할 list
- */
-
- type NameList struct {
- head *NameNode
- tail *NameNode
- size int
- }
-
- type NameNode struct {
- name []int64 // Encrypt된 name
- next *NameNode
-
- list List
- }
-
- type List struct {
- head *Node
- tail *Node
- size int
- }
-
- type Node struct {
- val []int64 // Encrypt된 value
- next *Node
-
- // single //
- single2sub_s []int // (val < x) sub#
- single2sub_es []int // (val <= x) sub#
- single2sub_b []int // (val > x) sub#
- single2sub_eb []int // (val >= x) sub#
- single2sub_e []int // (val == x) sub#
-
- // range //
- range2sub_s []int // (val < x and ...) sub#
- range2sub_es []int // (val <= x and ...) sub#
- range2sub_b []int // (val > x and ...) sub#
- range2sub_eb []int // (val >= x and ...) sub#
- }
-
- // ### To delete slice Array
- func remove(s []int, i int) []int {
- s[i] = s[len(s)-1]
- return s[:len(s)-1]
- }
|