Tag: Strings
Longest Common Subsequence Program in Javascript
Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in the same relative order, but not necessarily contiguous. […]
Program to print all permutations of a given string In Javascript
Below are the permutations of string ABC.ABC ACB BAC BCA CBA CAB This can be solved using recursive algorithm and most asked question in interviews, Algorithm: BacktrackingTime Complexity: O(n*n!)