I'm not sure if this has been asked already, but I ran into a time complexity question and couldn't find an answer to it.
I understand the time to loop through a linked list of size n is O(n), but if that linked list was divided into groups of k, and the heads of each group was stored in a list, what would the time complexity be to use a nested for loop to go through each groups of k in the list. Would it still be O(n)?