6 kyu

Linked Lists - Recursive Reverse

402 of 1,032JDeBolt

Description:

Linked Lists - Recursive Reverse

Write a Recursive Reverse() function that recursively reverses a linked list. You may want to use a nested function for the recursive calls.

var list = 2 -> 1 -> 3 -> 6 -> 5 -> null
reverse(list) === 5 -> 6 -> 3 -> 1 -> 2 -> null

Related Kata in order of expected completion (increasing difficulty):
 Linked Lists - Push & BuildOneTwoThree
 Linked Lists - Length & Count
 Linked Lists - Get Nth Node
Linked Lists - Insert Nth Node
Linked Lists - Sorted Insert
Linked Lists - Insert Sort
Linked Lists - Append
Linked Lists - Remove Duplicates
Linked Lists - Move Node
Linked Lists - Move Node In-place
Linked Lists - Alternating Split
Linked Lists - Front Back Split
Linked Lists - Shuffle Merge
Linked Lists - Sorted Merge
Linked Lists - Merge Sort
Linked Lists - Sorted Intersect
Linked Lists - Iterative Reverse
Linked Lists - Recursive Reverse

Inspired by Stanford Professor Nick Parlante's excellent Linked List teachings.

Linked Lists
Data Structures
Algorithms

Stats:

CreatedSep 2, 2015
PublishedSep 4, 2015
Warriors Trained2227
Total Skips146
Total Code Submissions3523
Total Times Completed1032
JavaScript Completions402
Python Completions546
Swift Completions115
Total Stars65
% of votes with a positive feedback rating91% of 184
Total "Very Satisfied" Votes157
Total "Somewhat Satisfied" Votes21
Total "Not Satisfied" Votes6
Ad
Contributors
  • JDeBolt Avatar
  • jhoffner Avatar
  • Bubbler Avatar
  • user9644768 Avatar
Ad