Add a function to get the ordered sequence that can form a key.
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-11-12 21:51:42 +02:00
parent c03dc68458
commit 6a1ecf93db
2 changed files with 17 additions and 1 deletions
@@ -13,6 +13,13 @@
{\a [\a \b] \b [\b \a] \c [\a \c]} "abc" [[\a \b] [\b \a] [\a \c]]
{\a [\a \b] \c [\b \a] \b [\a \c]} "abc" [[\a \b] [\a \c] [\b \a]])))
(deftest get-possible-key-vector-from-reversed-count-map-test
(testing ""
(are [reversed-count-map expected-key-vector]
(= expected-key-vector (get-possible-key-vector-from-reversed-count-map reversed-count-map))
{1 [\a \c] 2 [\b]} [[\b] [\a \c]]
{2 [\a] 1 [\b] 3 [\c]} [[\c] [\a] [\b]])))
(deftest get-possible-keys-test
(testing "The keys must be the all combinations"
(are [possible-keys-vector expected-keys]