educative.io

Confusing code snipets in the Coding exercise section

Hi, the code challenge proposes to solve the problem of reversing first k elements of the queue, and it provides a function signature:
public static Queue reverseK(Queue queue, int k)

As we can see here, it acceps a type Queue, that is a built-in .NET type that implements queue behaviour. But there is an implementation of a queue that has been evolving throughout the course:
class myQueue { … }
This type is located in a Queue.cs file, so it’s a little bit confusing - do I need to use the built-in queue type, or does the function public static Queue reverseK(Queue queue, int k) have to accept our own queue type myQueue?


Course: Data Structures for Coding Interviews in C# - AI-Powered Learning for Developers
Lesson: Challenge 3: Reversing First "k" Elements of Queue - Data Structures for Coding Interviews in C#


Btw, the explanation contains references to the myQueue type, while the code of the proposed solution is written using the built-in implementation of the queue.


Course: Data Structures for Coding Interviews in C# - AI-Powered Learning for Developers
Lesson: https://www.educative.io/courses/data-structures-interviews-cs/solution-review-reversing-first-k-elements-of-queue