
PERMUTE A STRING FREE
Feel free to post more suggestions if you're inspired, but I'm good. I'm gonna go with /u/ uniqueturtlelove's solution here. Any suggestions? thanks for your time! (post-edit, because I thought the bold made the question more clear than 'code' text )Įdit: Thanks everyone for your help. I suppose I could do it in for-loops, but I'm betting there's a more elegant solution out there. It's pretty easy to do permutations of each character, but combining them in all their permutations is where I'm stuck.

just two in the set), and so forth, so "A RCC N" would have 8 sequences. There are also other "Wildcards", like R = (i.e. Likewise, if I have "A NCC N", then I will want to output the 16 possible sequences that satisfy this constraint.

For example, N=, so if I have the input sequence "A NCCT", then I want to produce the following output of 4 sequences: The "Fundamental" characters are A,C,G, and T, but there are other characters that represent a larger set of these fundamentals to be traced over.
PERMUTE A STRING UPDATE
Void permute(char *a, int start, int end)Ĭout= arr if i is even and arr <= arr if i is odd and j < i 151 927 Number of Distinct Islands Leetcode Solution 151 928 Convert Sorted List to Binary Search Tree 151 929 3 Sum 151 930 Merge Two Sorted Lists Leetcode 151 931 BFS for Disconnected Graph 151 932 Pattern Occurrences using Stack 151 933 Construct the Rectangle Leetcode Solution 151 934 Count subarrays where second highest lie before highest 151 935 Diagonal Traversal LeetCode Solution 151 936 K’th Largest Element in BST when modification to BST is not allowed 151 937 Three way partitioning of an array around a given range 151 938 All Unique Triplets that Sum up to a Given Value 150 939 Minimum Height Trees LeetCode Solution 150 940 Vertical sum in a given binary tree 150 941 Intersection of Two Linked Lists LeetCode Solution 150 942 Rearrange Spaces Between Words Leetcode Solution 150 943 Sliding Window Maximum 150 944 Number of Equivalent Domino Pairs Leetcode Solution 150 945 Three Consecutive Odds Leetcode Solution 149 946 Maximum Product Subarray 149 947 Print Fibonacci sequence using 2 variables 149 948 Strongly Connected Component 149 949 Difference Array | Range update query in O(1) 149 950 Minesweeper LeetCode Solution 149 951 Reverse Nodes in K-Group 149 952 Longest Palindromic Subsequence 149 953 Largest area rectangular sub-matrix with equal number of 1’s and 0’s 149 954 Split Array Into Consecutive Subsequences 149 955 Spiral Matrix III LeetCode Solution 149 956 Combination Sum IV LeetCode Solution 149 957 Construct BST from its given Level Order Traversal 148 958 Count Submatrices With All Ones LeetCode Solution 148 959 Can Make Arithmetic Progression From Sequence Leetcode Solution 148 960 Create Maximum Number 148 961 Maximum Frequency Stack Leetcode Solution 148 962 Valid Boomerang Leetcode Solution 148 963 Binary array after M range toggle operations 148 964 Maximum Subarray Sum Excluding Certain Elements 148 965 Product of Array Except Self LeetCode Solution 148 966 Remove Duplicates from Sorted List II LeetCode Solution 148 967 Sign of the Product of an Array LeetCode Solution 148 968 Check if any two intervals overlap among a given set of intervals 148 969 Palindrome Partitioning Leetcode Solution 148 970 Maximize Sum of Array after K Negations Leetcode Solution 148 971 Special Positions in a Binary Matrix Leetcode Solution 148 972 Binary Tree Longest Consecutive Sequence LeetCode Solution 147 973 Depth First Search (DFS) for a Graph 147 974 4Sum 147 975 Find Maximum of Minimum for Every Window Size in a Given Array 147 976 Merging Intervals 147 977 Stone Game II Leetcode 147 978 Climbing stairs 147 979 Count Primes in Ranges 146 980 Largest Substring Between Two Equal Characters Leetcode Solution 146 981 Length of Longest Fibonacci Subsequence 146 982 Breadth First Search (BFS) for a Graph 146 983 Asteroid Collision LeetCode Solution 146 984 Symmetric Tree 146 985 Unique Paths II 146 986 Serialize and Deserialize Binary Tree 146 987 Palindrome Partitioning 145 988 Design Hit Counter LeetCode Solution 145 989 Check If a Word Occurs As a Prefix of Any Word in a Sentence Leetcode Solution 145 990 Merge Sort 145 991 Word Break 145 992 Scramble String LeetCode Solution 145 993 Kth Smallest Element in a BST Leetcode Solution 145 994 Friends Of Appropriate Ages LeetCode Solution 145 995 Largest divisible pairs subset 145 996 Shuffle 2n integers as a1-b1-a2-b2-a3-b3-.I want to perform string substitution with comprehensive permutations. Takes string, starting index and ending index as the arguments

This function will print all the permutations * Function to swap values at two pointers */
