Graph – Count all paths between source and destination
Objective: Given a graph, source vertex and destination vertex. Write an algorithm to count all possible paths between source and … Read more
Objective: Given a graph, source vertex and destination vertex. Write an algorithm to count all possible paths between source and … Read more
Objective: Given a directed graph write an algorithm to find out whether graph contains cycle or not. Example: Approach: Graph … Read more
Objective: Given undirected graph write an algorithm to find out whether graph contains cycle or not. Example: Approach: Earlier we … Read more
Objective: Given a directed graph write an algorithm to find out whether graph contains cycle or not. Example: Approach: Graph … Read more
Objective: Given an array which contains only 0’s and 1’s. write an algorithm to separate 0’s and 1’s. Example int [] … Read more
Objective: Given a string, write an algorithm to find the last repeating character in it. Example: String input = “horizon … Read more
Objective: Given two string sequences, write an algorithm to find the length of longest subsequence present in both of them. … Read more
Objective: Given a rod of length n inches and a table of prices pi, i=1,2,…,n, write an algorithm to find … Read more
Objective: Given a matrix of 0’s and 1’s (binary matrix). Find out the Maximum size square sub-matrix with all 1’s. … Read more
Objective: Given a 2D matrix of characters. Check whether the word exists in the matrix or not. If it exists … Read more
Objective: Write an algorithm to check if one string is Rotation of another string. This question has been asked in … Read more