#Challenge 24

1 messages · Page 1 of 1 (latest)

south solar
kind jetty
#

||js function checkIsSameTree( treeA, treeB ) { return !treeA && !treeB ? true : treeA?.value === treeB?.value && checkIsSameTree( treeA.left, treeB.left ) && checkIsSameTree( treeA.right, treeB.right ) }||

tender hatch
#

Mi solución al día #24

tender hatch
kind jetty
tender hatch
fringe folio
south solar
#

Si me pasáis un ejemplo de test que no debería pasar, lo añado 🙂

tender hatch
# south solar Si me pasáis un ejemplo de test que no debería pasar, lo añado 🙂

Entiendo jaja, supongo que algo como const tree = {value: 1, left: { value: 2, left: null, right: null },right: { value: 3, left: null, right: null }}; const treeFalse = { value: 1, left: { value: 1, left: {value: 1, left: null, right: null}, right: null}, right: { value: 3, left: null, right: null }} pasaría mi "solución" pero no es verdad

fringe fog
#

Mi solución al reto #24

shy escarp
#

Mi solucón usando BFS

last relic
#

Mi solución corregida ya que antes solo comparaba valores

main frost
#

Mi solución, bastante parecida a la del reto 22