Skip to content

EladioDeveloper/SplitCircularLinkedList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Split a Circular Linked List

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.

Dividir una Lista Enlazada Circular Simple

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.

About

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…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages