-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Description:
Opening this issue to implement the fossil_algorithm_permute function, which will generate all possible permutations of an array or list of fossil_tofu_t elements. This function will be useful for combinatorial problems, testing scenarios, and generating all possible orderings of a given set of elements.
Goals:
• Define fossil_algorithm_permute API:
• Input: an array or list of fossil_tofu_t elements
• Output: a collection of all possible permutations of the input array
• Implement a backtracking or iterative approach to generate all permutations efficiently
• Ensure that the function works with arrays or lists of arbitrary length and handles duplicate elements correctly
• Provide the option to generate permutations with or without replacement, depending on the use case
• Write unit tests using Fossil Test framework to verify correctness and edge cases (e.g., empty array, duplicate elements)
• Document time complexity (O(n!)) and performance considerations for large datasets
This function will be particularly useful for combinatorial problems such as generating all possible solutions in puzzles, testing permutations of inputs, or applying algorithms that require exhaustive search across permutations.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status