mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-08 10:15:51 +08:00
Formatted with Google Java Formatter
This commit is contained in:
@ -18,9 +18,7 @@ public class CountSinglyLinkedListRecursion extends SinglyLinkedList {
|
||||
private int countRecursion(Node head) {
|
||||
return head == null ? 0 : 1 + countRecursion(head.next);
|
||||
}
|
||||
/**
|
||||
*Returns the count of the list.
|
||||
*/
|
||||
/** Returns the count of the list. */
|
||||
@Override
|
||||
public int count() {
|
||||
return countRecursion(getHead());
|
||||
|
Reference in New Issue
Block a user