Function rc_vector_fibonnaci#

Function Documentation#

int rc_vector_fibonnaci(rc_vector_t *v, int length)#

Resizes vector v and fills with Fibonnaci sequence.

Any existing memory allocated for v is freed if necessary to avoid memory leaks. It is not necessary to call rc_alloc_vector before this.

Parameters:
  • v – Pointer to user’s rc_vector_t struct

  • length[in] Length of vector to allocate memory for

Returns:

Returns 0 if successful, otherwise returns -1.