Greetings to you all !
let's say I have a fixed array size [3] and given that the number of data to save in the array is maximum 3 elements type of integer, meaning the number of data might be 1 or 2 or 3 elements .. if I want to lower my time complexity is it preferable to not declare fixed array like
Code:
 int array[3]
, but just doing allocation by malloc at everytime I get an element?! thanks in advance.
what I'm thinking about , may the time of allocation on heap by malloc is greater than fixed allocation ?!

thanks !