Check if Array is Sorted
Determine if an array is sorted in ascending, descending, or not sorted at all
Find the Maximum Element in an Array
Find and return the largest element in an array of integers
Find the Second Largest Element in an Array
Find and return the second largest element in an array of integers
LC 25 Reverse Nodes in k-Group (Linked List) | O(1)
Reverse linked list in k groups (Hard): in-place pointer reversal with dummy node. Optimal O(n) time, O(1) space—step-by-step solution.
Reverse a Linked List
Reverse a singly linked list in-place and return the new head.
Reverse an Array
Reverse the order of elements in an array in-place and return the modified array
Swap Nodes in Pairs
Swap every two adjacent nodes in a linked list