Linked Lists - Length & Count
Last updated
Was this helpful?
Last updated
Was this helpful?
Linked Lists - Length & Count
Implement Length() to count the number of nodes in a linked list.
Implement Count() to count the occurrences of an integer in a linked list.
I've decided to bundle these two functions within the same Kata since they are both very similar.
The push()
/Push()
and buildOneTwoThree()
/BuildOneTwoThree()
functions do not need to be redefined.
Related Kata in order of expected completion (increasing difficulty):
Inspired by Stanford Professor Nick Parlante's excellent