This function takes in a set of integers and a target value, and returns true if there is a pair of integers in the set that sum up to the target value. Otherwise, it returns false.
This technical problem involves removing duplicate elements from a singly linked list. An example input is given, as well as the expected output.
Given an array of n integers, this algorithm will find the maximum sum of any contiguous subarray of the array. For example, given the input array [1, -3, 2, 1, -1], the algorithm would output 3.
Given a simple expression string consisting of parentheses, plus/minus signs, and non-negative integers, implement a basic calculator to evaluate the string.
This problem deals with implementing a binary search algorithm to find the index of a given target value in a sorted array. If the target is not found, the function should return -1.
The problem asks for a way to determine whether there is a route between two nodes in a directed graph. One example is given, where the nodes are connected in a linear fashion. The solution should work for more general cases as well.
Given a set of distinct integers, this algorithm returns all possible subsets. The subsets must be in non-descending order, and the solution set must not contain duplicate subsets.
Given a 2D array of integers, this algorithm finds the length of the longest path of 1's in the array. The path can start and end at any position in the array.