flip the values in the range [firstOfRange,endx)
(firstOfRange, endx int)
| 164 | |
| 165 | // flip the values in the range [firstOfRange,endx) |
| 166 | func (ac *arrayContainer) not(firstOfRange, endx int) container { |
| 167 | if firstOfRange >= endx { |
| 168 | return ac.clone() |
| 169 | } |
| 170 | return ac.notClose(firstOfRange, endx-1) // remove everything in [firstOfRange,endx-1] |
| 171 | } |
| 172 | |
| 173 | // flip the values in the range [firstOfRange,lastOfRange] |
| 174 | func (ac *arrayContainer) notClose(firstOfRange, lastOfRange int) container { |