2020
SplitCircularLinkedList
Given a Circular Linked List (you must implement this class) you must divide the list into two (2) halves. If the list has an odd amount of elements,…
Overview
Given a Circular Linked List (you must implement this class) you must divide the list into two (2) halves. If the list has an odd amount of elements, then the first half must contain one (1) more than the second half. The result must be two (2) circular linked lists. For example, given the simple circular list 5-> 2-> 1-> 3-> 7-> 4-> 0, then the result will be: 5-> 2-> 1-> 3 (first list) and 7- > 4-> 0 (second list) where both lists will also be simple circular. Dada una Lista Enlazada Circular (deben implementar esta clase) debe dividir la lista en dos (2) mitades. Si la lista posee una cantidad de elementos impar, entonces la primera mitad debe contener un (1) elemento mas que la segunda mitad. El resultado deben ser dos (2) listas enlazadas circulares. Por ejemplo, dada la lista circular simple 5->2->1->3->7->4->0, entonces el resultado será: 5->2->1->3 (primera lista) y 7->4->0 (segunda lista) donde ambas listas también serán circulares simples Open-source project by Eladio Junior Rodriguez Rodriguez, published on GitHub.
Highlights
- Primary language: C#
- Open source — view the code and contribute on GitHub
Built with
- C#
Discussion (0)
Log in to comment.
No comments yet. Be the first to start the conversation.