Which is better approach to implement Viterbi algorithm in c?

423 Views Asked by At

I want to implement the Viterbi algorithm for decoding convolutional codes. the algorithm is available here

Would it be better to implement it using 2D arrays or using linked lists in C programming language.

I am a newbie in C and would appreciate any help regarding which method would be better with the specific reasons.

1

There are 1 best solutions below

6
Eklavya On

It's be better to implement it using 2D array since you have to access random index with a constant time complexity of O(1). You can't access random index in linked lists with a constant time complexity of O(1).