exercism / exercism/problem-specifications

[Binary Search Tree][c language] new test case

Abierto
#1,826 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Ruby
Estrellas
358
Forks
563
Merge medio
18 h 41 min
PR fusionados (30 d)
2

Descripción

Inspired by @siebenschlaefer comment https://exercism.io/my/solutions/b6f9db46186547ba9a7bbebf3f193078?iteration_idx=1

It looks like there is a missing test case:
```C
int tree_data[] = { 3, 1, 2 };
node_t *tree = build_tree(
tree_data, ARRAY_SIZE(tree_data));

int expected[] = { 1, 2, 3 };
int *actual = sorted_data(tree);
TEST_ASSERT_EQUAL_INT_ARRAY(
expected, actual,
ARRAY_SIZE(expected));

free_tree(tree);
free(actual);
```
I had created initially a wrong algorithm for the left and right branches. Where the left branch passe because there was a missing test case, while the right branch I fixed. Adding this test case will help to write a proper implementation.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.