Recent posts

Pair Sums to Target Value
AskAI Algorithms, Data Structures and Coding

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.

167
Dec 09
Remove duplicates from a singly linked list.
AskAI Algorithms, Data Structures and Coding

This technical problem involves removing duplicate elements from a singly linked list. An example input is given, as well as the expected output.

138
Dec 09
Find the Maximum Sum of a Contiguous Subarray
AskAI Algorithms, Data Structures and Coding

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.

169
Dec 09
Evaluating a Simple Expression String
AskAI Algorithms, Data Structures and Coding

Given a simple expression string consisting of parentheses, plus/minus signs, and non-negative integers, implement a basic calculator to evaluate the string.

170
Dec 08
Binary Search: Given a Sorted Array of Integers, Write a Function that...
AskAI Algorithms, Data Structures and Coding

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.

139
Dec 08
Graph Route Checker
AskAI Algorithms, Data Structures and Coding

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.

191
Dec 08
All Possible Subsets of a Set of Distinct Integers
AskAI Algorithms, Data Structures and Coding

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.

124
Dec 07
2D array - longest path of 1's
AskAI Algorithms, Data Structures and Coding

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.

149
Dec 07