Recent posts

Find shortest path from one city to another in a list of airline flights.
AskAI Algorithms, Data Structures and Coding

Given a list of airline flights with their departure and arrival times, find the shortest path from one city to another using a graph algorithm.

171
Oct 12
Sum of integers at even indices
AskAI Algorithms, Data Structures and Coding

Given a list of integers, the sum of the integers at even indices is returned. So for the input list [1, 2, 3, 4, 5], the output would be 6 (2 + 4).

181 1
Oct 11
Shortest Path in a Directed Graph
AskAI Algorithms, Data Structures and Coding

This technical problem deals with finding the shortest path between two nodes in a directed graph. An example input and output is given in the problem description.

176
Oct 09
Reversing a Singly Linked List
AskAI Algorithms, Data Structures and Coding

To reverse a singly linked list, we simply need to iterate through the list and reverse the pointers of each node. This can be done in place, without creating a new list.

134
Oct 05
Binary Search: Find Target Value in Sorted Array
AskAI Algorithms, Data Structures and Coding

This problem requires the use of a binary search algorithm to find a target value in a sorted array. If the target value is found, the index of that value is returned. If the target value is not found, -1 is returned.

208
Oct 04
Binary Search
AskAI Algorithms, Data Structures and Coding

This problem involves searching for a given value in a sorted array of integers. If the value is found, the index of the target value is returned; if not, -1 is returned.

201
Oct 03
Longest Path in a 2D Array
AskAI Algorithms, Data Structures and Coding

Given a 2D array of integers, find the longest path of consecutive integers starting from the top left corner of the array. The path can move in 4 directions: up, down, left , or right.

197
Oct 02
TwoSum: Find Two Numbers That Add Up to a Specific Target Number
AskAI Algorithms, Data Structures and Coding

The twoSum function should return the indices of two numbers in an array that add up to a specific target number.

175
Oct 01