"Oh no! The power is off again!" Says a student playing games in the dorm.
"This is the last of my Hamon!" -DYY.
Our greatest vice president for general affairs is trying to resolve the power outage problem by the end of his term. In the beginning, He's trying to ask Doraemon for help. Unfortunately, Doraemon already retired last semester! In turn, he seeks cheap labor, the Pokemon Pikachu to do him a favor. By using Pikachu's move "10 万ボルト (Thunderbolt)", the campus would generate enough electricity, and can be lit up forever! This is too trivial for him...How clever is DYY!
The main power pipe of the campus is connecting the substation in a line, each substation has a id number representing it. Now, DYY wants to rearrange the order of the substations, by reversing the segments on the power pipe. Help him!
This is a partial judge problem. For the given linked list, you would only need to implement the function "reverse" to do the corresponding operation. For your convenience, we already pass the pointer of node_l and node_r to the function. You can refer to the following image to know the detail. If you implement the function and reverse the linked list correctly, the given program would output two lines - the reversed linked list and "pikachuuuu!!", and you can pass this problem.
If you implement the function and reverse the linked list correctly, the given program would output two lines - the reversed linked list and "pikachuuuu!!", and you can pass this problem.