Recent posts

Is the linked list a palindrome?
AskAI Algorithms, Data Structures and Coding

Given a linked list, this algorithm determines whether or not the list is a palindrome.

150
Nov 30
Greatest Common Divisor
AskAI Algorithms, Data Structures and Coding

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.

153
Nov 30
Shortest Path in Undirected Graph
AskAI Algorithms, Data Structures and Coding

The shortest path between two nodes in an undirected graph can be found by traversing the graph from one node to the other.

184
Nov 29
Determining if a String Has All Unique Characters
AskAI Algorithms, Data Structures and Coding

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".

162
Nov 29
Binary search in a sorted array.
AskAI Algorithms, Data Structures and Coding

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.

170
Nov 29
Distinct Subsets
AskAI Algorithms, Data Structures and Coding

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].

174
Nov 29
"Reversing a Linked List"
AskAI Algorithms, Data Structures and Coding

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.

157
Nov 29