Given a linked list, this algorithm determines whether or not the list is a palindrome.
The greatest common divisor of two positive integers can be found by recursively dividing the larger number by the smaller number until the remainder is 0.
The shortest path between two nodes in an undirected graph can be found by traversing the graph from one node to the other.
Find the sum of the first n integers in a list.
This problem is about determining if a given string has all unique characters. An example input would be "abcdefg" and the corresponding output would be "True".
The problem is to find the index of a given target value in a sorted array. If the target is not present, the function should return -1.
This problem asks you to generate all possible subsets of a given set of distinct integers. For example, if the input is [1,2,3], the output should list all possible subsets: [1], [1,2], [1,2,3], [1,3], [2], [2,3], and [3].
This problem asks you to reverse the order of a linked list. For example, if the given linked list is 1->2->3->4->5, the output should be 5-> 4->3->2->1.