All Questions
6 questions
3
votes
2
answers
3k
views
Non-Contiguous Substrings
Problem:
A non-contiguous substring of string \$s\$ is a sequence of \$k \geq 0\$ characters in \$s\$, in the order in which they occur in \$s\$. For instance, the set of all non-contiguous ...
11
votes
2
answers
452
views
You need to diversify your strings
Challenge:
Write a program which prints all the permutations of a string in alphabetical order.
Specifications:
Your program should accept a file as its first argument.
The file contains input ...
9
votes
2
answers
27k
views
Recursive function that generates the permutations of a string
I am looking for a review of my recursive function that generates the permutations of a string. Are there better ways to do this?
...
11
votes
2
answers
4k
views
Printing permutations of a given string
I want some feedback on the program I developed in C for printing the permutations of a given string.
...
2
votes
2
answers
3k
views
Print all interleavings of two given strings
Given two strings str1 and str2, write a function that prints all
interleavings of the given two strings. You may assume that all
characters in both strings are different
Example:
...
12
votes
2
answers
8k
views
Print all permutations with repetition of characters
Given a string of length n, print all permutation of the given string.
Repetition of characters is allowed. Print these permutations in
lexicographically sorted order
Examples:
Input: AB
Ouput:...