Check if node contains a given value
(self, a)
| 195 | return self |
| 196 | |
| 197 | def contains(self, a): |
| 198 | """ Check if node contains a given value """ |
| 199 | if self.valcnt is not 0: |
| 200 | if (self.values[0] > a or self.values[self.valcnt - 1] < a) or a not in self.values: |
| 201 | return None |
| 202 | return self.values[self.values.index(a)] |
| 203 | |
| 204 | def chooseChild(self, a): |
| 205 | """ Choose where to go according to the value a """ |
no test coverage detected