Main content: https://github.com/Ada-Developers-Academy/textbook-curriculum/tree/master/04-cs-fundamentals
The content in this folder contains solutions to practice problems and in-progress content that is not yet folded into the main content.
Question 1: Print all permutations of a string.
- input: "abc"
- output: "abc", "acb", "bac", "bca", "cba", "cab"
- Solution: https://github.com/shrutivanw/CSFundamentals/blob/master/string_permutation.rb
Question 2: Windows of strings from 1 to n for the given string where n is the number of characters in the string. Assume non repeated characters
- input: "abc",
- output: "a", "b", "c", "ab", "bc", "abc"
- input: "abcd",
- output: "a", "b", "c", "d", "ab", "bc", "cd", "abc", "bcd", "abcd"
- Solution: https://github.com/shrutivanw/CSFundamentals/blob/master/string_window.rb
Question 3: Print all combinations of a string. Assume non repeated characters.
- input: "abc",
- output: "a", "b", "c", "ab", "ac", "bc", "abc" string.
- input: "abcd")
- output: "a", "b", "c", "d", "ab", "ac", "ad", "bc", "bd", "cd", "abc", "acd", "abd", "bcd", "abcd"
- Solution: https://github.com/shrutivanw/CSFundamentals/blob/master/string_combination.rb