function l(n,e){if(!n||e<=0||e>n.length)throw new Error("Invalid BBFS input or combination length.");const r=[];function u(o,i){if(o.length===e){r.push(o);return}for(let t=i;t<n.length;t++)u(o+n[t],t+1)}return u("",0),r}function h(n,e){if(!n||e<=0||e>n.length)throw new Error("Invalid BBFS input or combination length.");const r=[];function u(o,i){if(o.length===e){r.push(o);return}for(let t=0;t<i.length;t++)u(o+i[t],i.slice(0,t)+i.slice(t+1))}return u("",n),r}window.generateBBFS=l;window.generatePermutations=h;