Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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 ...
francium's user avatar
  • 139
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 ...
Legato's user avatar
  • 9,919
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? ...
user avatar
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. ...
user avatar
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: ...
Fihop's user avatar
  • 1,035
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:...
Fihop's user avatar
  • 1,035