Skip to main content

All Questions

Tagged with
1 vote
1 answer
3k views

All subsets of a String in java using recursion

I wrote this code for printing all sets of a String. It also prints the empty subset. Is this the right approach ...
Curious's user avatar
  • 13
4 votes
2 answers
6k views

From a set of words, output all words that fit a string of random letters (like Scrabble)

I am in my first year of programming with Python 3 and am wondering if anyone had a better way to program this problem. When the user provides up to 7 random letters as a single string, the program ...
jtdans's user avatar
  • 43
3 votes
1 answer
964 views

Extract index of first unique element in large array in Swift

I'm using the following code to return the first index of a unique character in a large String. It works fine until I get to large strings, where it times out. Is ...
Adrian's user avatar
  • 196
1 vote
1 answer
735 views

Printing the power set of a given set of elements

Input: Set of elements (String) Output: Printing the elements of the power set of the given set ...
Neelesh Salian's user avatar
3 votes
2 answers
647 views

Determining if two Strings have common subtrings of a given length in Java

Problem: Given 2 strings, consider all the substrings within them of length len. Len will be 1 or more. Returns true if there are any such substrings which appear in both strings. Compute this ...
Thor's user avatar
  • 607