(roots)
| 140 | result = [] |
| 141 | |
| 142 | def _serialize(roots): |
| 143 | _next = [] |
| 144 | for i in roots: |
| 145 | if i: |
| 146 | result.append(i.val) |
| 147 | _next.append(i.left) |
| 148 | _next.append(i.right) |
| 149 | |
| 150 | else: |
| 151 | result.append(None) |
| 152 | |
| 153 | return _next |
| 154 | |
| 155 | base = _serialize([root]) |
| 156 |
nothing calls this directly
no outgoing calls
no test coverage detected