Recent posts

Reverse the Order of Words in a String
AskAI Algorithms, Data Structures and Coding

Given a string, reverse the order of the words. Do not use any built-in reverse functions.

117
Dec 01
Determine if a route exists between two nodes in a directed graph
AskAI Algorithms, Data Structures and Coding

This technical problem involves determining whether a route exists between two nodes in a directed graph. An example input and output are given.

163
Dec 01
Printing the median of a stream of integers.
AskAI Algorithms, Data Structures and Coding

This problem deals with printing the median of a stream of integers. At each time step, the median of the integers received so far is printed out.

147
Dec 01
Non-repeating character in a string
AskAI Algorithms, Data Structures and Coding

This problem is about finding the first non-repeating character in a string. For example, if the input string is "GeeksforGeeks", then the output should be 'f '.

147
Dec 01
"Sum all elements in an array"
AskAI Algorithms, Data Structures and Coding

This technical problem involves finding the sum of all elements in an array. The input is an array of integers, and the output is the sum of all elements in the array.

165
Nov 30
Maximum Depth of Binary Tree
AskAI Algorithms, Data Structures and Coding

To find the maximum depth of a binary tree, we can use recursion. First, we need to check if the tree is empty. If not, we need to find the maximum depth of the left and right subtrees. The maximum depth of the tree is the maximum of the left and right subtrees' depths, plus one.

127
Nov 30
"Finding the Shortest Path in a Maze"
AskAI Algorithms, Data Structures and Coding

This problem is about finding the shortest path through a maze. The input is a 2D array representing the maze, and the output is the shortest path from the top-left corner to the bottom-right corner.

181
Nov 30
Implement binary search function
AskAI Algorithms, Data Structures and Coding

The problem asks you to implement a binary search function that takes in a sorted array of integers and a target integer. The function should return the index of the target integer if it is found in the array, or -1 if it is not found.

163
Nov 30