Skip to content

Commit 0550711

Browse files
authoredApr 9, 2021
Update CountSinglyLinkedListRecursion.java (TheAlgorithms#2170)
Only method comment for public recursive method.
1 parent 5f59cd8 commit 0550711

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎DataStructures/Lists/CountSinglyLinkedListRecursion.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ public static void main(String[] args) {
1818
private int countRecursion(Node head) {
1919
return head == null ? 0 : 1 + countRecursion(head.next);
2020
}
21-
21+
/**
22+
*Returns the count of the list.
23+
*/
2224
@Override
2325
public int count() {
2426
return countRecursion(getHead());

0 commit comments

Comments
 (0)
Please sign in to comment.