Data Structures And Algorithms

Shortest Path Between Two Cities
AskAI

This problem asks for the shortest path between two cities, given a list of airline flights. This can be solved using a graph data structure, where the nodes represent cities and the edges represent flights between them.

Shortest Path in a Graph
AskAI

This problem is about finding the shortest path between two nodes in a graph. This can be done using a variety of algorithms, such as Dijkstra's algorithm or A*.

All possible permutations of a set of distinct integers
AskAI

This problem asks for all possible permutations of a set of distinct integers. The input is a list of distinct integers, and the output is a list of all possible permutations of those integers .

Detecting cycles in a directed graph.
AskAI

This technical problem involves finding cycles in a directed graph. One way to do this is to use a depth-first search algorithm, which can detect cycles by keeping track of which vertices have been visited. If a depth-first search algorithm reaches a vertex that has already been visited, then there is a cycle in the graph.

Shortest Path Between Two Words in a List
AskAI

Given a list of words, this problem seeks to find the shortest path from one word to another such that each intermediate word is also in the list. For example, if the input list is [cat, rat, bat, mat], the shortest path from cat to mat would be cat -> bat -> mat.

Shortest path in a directed graph
AskAI

The problem is to find the shortest path in a directed graph from the source vertex to the destination vertex. The graph may be disconnected, have cycles, or have negative edge weights.

Integer Reversal
AskAI

Given a list of integers, this program outputs the integers in reverse order.

Find the shortest word in a list
AskAI

Given a list of words, this program outputs the shortest word in the list. If there are multiple shortest words, it outputs the first one in alphabetical order.