Deploying to gh-pages from @ Quinta0/valgo@08af17e268 🚀
This commit is contained in:
1 parent
ab0c90c8fb
commit
9995df8ef1
36 files changed
+16
-16
No files matched your search
@@ -1 +0,0 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{1290:()=>{},3374:e=>{e.exports={style:{fontFamily:"'JetBrains Mono', 'JetBrains Mono Fallback'",fontStyle:"normal"},className:"__className_3c557b",variable:"__variable_3c557b"}},4912:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},7331:(e,a,l)=>{Promise.resolve().then(l.t.bind(l,4912,23)),Promise.resolve().then(l.t.bind(l,3374,23)),Promise.resolve().then(l.t.bind(l,1290,23))}},e=>{e.O(0,[343,441,255,358],()=>e(e.s=7331)),_N_E=e.O()}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{1267:(e,a,s)=>{Promise.resolve().then(s.t.bind(s,7102,23)),Promise.resolve().then(s.t.bind(s,9632,23)),Promise.resolve().then(s.t.bind(s,1290,23))},1290:()=>{},7102:e=>{e.exports={style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"},className:"__className_246ccd",variable:"__variable_246ccd"}},9632:e=>{e.exports={style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"},className:"__className_c29908",variable:"__variable_c29908"}}},e=>{e.O(0,[379,441,255,358],()=>e(e.s=1267)),_N_E=e.O()}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{2871:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>ev});var r=i(5155),n=i(2115),a=i(4486);class o{push(e,t,i,r){this.steps.push({array:[...e],action:t,indices:i,sorted:Array.from(this.sortedSet).sort((e,t)=>e-t),range:null==r?void 0:r.range,meta:null==r?void 0:r.meta,comparisons:this.comparisons,writes:this.writes})}compare(e,t,i){this.comparisons++,this.push(e,"compare",[t,i])}swap(e,t,i){[e[t],e[i]]=[e[i],e[t]],this.writes+=2,this.push(e,"swap",[t,i])}overwrite(e,t,i){e[t]=i,this.writes++,this.push(e,"overwrite",[t])}markSorted(e,t){t.forEach(e=>this.sortedSet.add(e)),this.push(e,"mark-sorted",t)}isSorted(e){return this.sortedSet.has(e)}finish(e){for(let t=0;t<e.length;t++)this.sortedSet.add(t);this.push(e,"done",[])}result(){return this.steps}constructor(){this.steps=[],this.sortedSet=new Set,this.comparisons=0,this.writes=0}}let s={bubble:function(e){let t=new o,i=[...e];t.push(i,"init",[]);let r=i.length;for(let e=0;e<r;e++){let n=!1;for(let a=0;a<r-e-1;a++)t.compare(i,a,a+1),i[a]>i[a+1]&&(t.swap(i,a,a+1),n=!0);if(t.markSorted(i,[r-e-1]),!n)break}return t.finish(i),t.result()},insertion:function(e){let t=new o,i=[...e];t.push(i,"init",[]),t.markSorted(i,[0]);for(let e=1;e<i.length;e++){let r=i[e],n=e-1;for(;n>=0&&(t.compare(i,n,n+1),!(i[n]<=r));)i[n+1]=i[n],t.writes++,t.push(i,"shift",[n,n+1]),n--;i[n+1]=r,t.writes++,t.push(i,"overwrite",[n+1]),t.markSorted(i,[e])}return t.finish(i),t.result()},heap:function(e){let t=new o,i=[...e];t.push(i,"init",[]);let r=i.length;function n(e,r){let a=r,o=2*r+1,s=2*r+2;o<e&&(t.compare(i,o,a),i[o]>i[a]&&(a=o)),s<e&&(t.compare(i,s,a),i[s]>i[a]&&(a=s)),a!==r&&(t.swap(i,r,a),n(e,a))}for(let e=Math.floor(r/2)-1;e>=0;e--)n(r,e);for(let e=r-1;e>0;e--)t.swap(i,0,e),t.markSorted(i,[e]),n(e,0);return t.markSorted(i,[0]),t.finish(i),t.result()},quick:function(e){let t=new o,i=[...e];return t.push(i,"init",[]),!function e(r,n){if(r<n){t.push(i,"partition-range",[],{range:[r,n]});let a=function(e,r){let n=i[r];t.push(i,"select-pivot",[r],{range:[e,r],meta:{pivot:n}});let a=e-1;for(let o=e;o<r;o++)t.compare(i,o,r),i[o]<n&&++a!==o&&t.swap(i,a,o);return t.swap(i,a+1,r),t.markSorted(i,[a+1]),t.push(i,"pivot-placed",[a+1]),a+1}(r,n);e(r,a-1),e(a+1,n)}else r===n&&t.markSorted(i,[r])}(0,i.length-1),t.finish(i),t.result()},merge:function(e){let t=new o,i=[...e];return t.push(i,"init",[]),!function e(r,n){if(r>=n)return;let a=Math.floor((r+n)/2);e(r,a),e(a+1,n),function(e,r,n){t.push(i,"merge-range",[],{range:[e,n],meta:{mid:r}});let a=i.slice(e,r+1),o=i.slice(r+1,n+1),s=0,l=0,d=e;for(;s<a.length&&l<o.length;)t.comparisons++,a[s]<=o[l]?i[d]=a[s++]:i[d]=o[l++],t.writes++,t.push(i,"merge-write",[d],{range:[e,n]}),d++;for(;s<a.length;)i[d]=a[s++],t.writes++,t.push(i,"merge-write",[d],{range:[e,n]}),d++;for(;l<o.length;)i[d]=o[l++],t.writes++,t.push(i,"merge-write",[d],{range:[e,n]}),d++;0===e&&n===i.length-1&&t.markSorted(i,Array.from({length:i.length},(e,t)=>t))}(r,a,n)}(0,i.length-1),t.finish(i),t.result()},radix:function(e){let t=new o,i=[...e];if(t.push(i,"init",[]),0===i.length)return t.finish(i),t.result();let r=Math.max(...i);for(let e=1;Math.floor(r/e)>0;e*=10){let r=Array(i.length).fill(0),n=Array(10).fill(0);t.push(i,"gap-set",[],{meta:{digit:e}});for(let r=0;r<i.length;r++){let a=Math.floor(i[r]/e)%10;n[a]++,t.push(i,"count",[r],{meta:{digit:a}})}for(let e=1;e<10;e++)n[e]+=n[e-1];for(let t=i.length-1;t>=0;t--){let a=Math.floor(i[t]/e)%10;r[n[a]-1]=i[t],n[a]--}for(let n=0;n<i.length;n++)i[n]=r[n],t.writes++,t.push(i,"overwrite",[n],{meta:{digit:e}})}return t.finish(i),t.result()},counting:function(e){let t=new o,i=[...e];if(t.push(i,"init",[]),0===i.length)return t.finish(i),t.result();let r=Math.min(...i),n=Array(Math.max(...i)-r+1).fill(0),a=Array(i.length).fill(0);for(let e=0;e<i.length;e++)n[i[e]-r]++,t.push(i,"count",[e],{meta:{bucket:i[e]-r}});for(let e=1;e<n.length;e++)n[e]+=n[e-1];for(let e=i.length-1;e>=0;e--)a[n[i[e]-r]-1]=i[e],n[i[e]-r]--;for(let e=0;e<i.length;e++)i[e]=a[e],t.writes++,t.markSorted(i,[e]);return t.finish(i),t.result()},bucket:function(e){let t=new o,i=[...e];if(t.push(i,"init",[]),0===i.length)return t.finish(i),t.result();let r=Math.min(...i),n=Array.from({length:Math.floor((Math.max(...i)-r)/5)+1},()=>[]);for(let e=0;e<i.length;e++){let a=Math.floor((i[e]-r)/5);n[a].push(i[e]),t.push(i,"bucket-place",[e],{meta:{bucket:a}})}for(let e=0;e<n.length;e++)n[e].sort((e,t)=>e-t),t.push(i,"bucket-sorted",[],{meta:{bucket:e}});let a=0;for(let e=0;e<n.length;e++)for(let r=0;r<n[e].length;r++)i[a]=n[e][r],t.writes++,t.markSorted(i,[a]),a++;return t.finish(i),t.result()},shell:function(e){let t=new o,i=[...e];t.push(i,"init",[]);let r=i.length;for(let e=Math.floor(r/2);e>0;e=Math.floor(e/2)){t.push(i,"gap-set",[],{meta:{gap:e}});for(let n=e;n<r;n++){let r=i[n],a=n;for(;a>=e&&(t.compare(i,a-e,a),!(i[a-e]<=r));)i[a]=i[a-e],t.writes++,t.push(i,"shift",[a-e,a],{meta:{gap:e}}),a-=e;i[a]=r,t.writes++,t.pLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{3538:(e,t,i)=>{Promise.resolve().then(i.bind(i,9043))},9043:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>ek});var r=i(5155),a=i(2115),n=i(4486);class o{push(e,t,i,r){this.steps.push({array:[...e],action:t,indices:i,sorted:Array.from(this.sortedSet).sort((e,t)=>e-t),range:null==r?void 0:r.range,meta:null==r?void 0:r.meta,comparisons:this.comparisons,writes:this.writes})}compare(e,t,i){this.comparisons++,this.push(e,"compare",[t,i])}swap(e,t,i){[e[t],e[i]]=[e[i],e[t]],this.writes+=2,this.push(e,"swap",[t,i])}overwrite(e,t,i){e[t]=i,this.writes++,this.push(e,"overwrite",[t])}markSorted(e,t){t.forEach(e=>this.sortedSet.add(e)),this.push(e,"mark-sorted",t)}isSorted(e){return this.sortedSet.has(e)}finish(e){for(let t=0;t<e.length;t++)this.sortedSet.add(t);this.push(e,"done",[])}result(){return this.steps}constructor(){this.steps=[],this.sortedSet=new Set,this.comparisons=0,this.writes=0}}let s={bubble:function(e){let t=new o,i=[...e];t.push(i,"init",[]);let r=i.length;for(let e=0;e<r;e++){let a=!1;for(let n=0;n<r-e-1;n++)t.compare(i,n,n+1),i[n]>i[n+1]&&(t.swap(i,n,n+1),a=!0);if(t.markSorted(i,[r-e-1]),!a)break}return t.finish(i),t.result()},insertion:function(e){let t=new o,i=[...e];t.push(i,"init",[]),t.markSorted(i,[0]);for(let e=1;e<i.length;e++){let r=i[e],a=e-1;for(;a>=0&&(t.compare(i,a,a+1),!(i[a]<=r));)i[a+1]=i[a],t.writes++,t.push(i,"shift",[a,a+1]),a--;i[a+1]=r,t.writes++,t.push(i,"overwrite",[a+1]),t.markSorted(i,[e])}return t.finish(i),t.result()},heap:function(e){let t=new o,i=[...e];t.push(i,"init",[]);let r=i.length;function a(e,r){let n=r,o=2*r+1,s=2*r+2;o<e&&(t.compare(i,o,n),i[o]>i[n]&&(n=o)),s<e&&(t.compare(i,s,n),i[s]>i[n]&&(n=s)),n!==r&&(t.swap(i,r,n),a(e,n))}for(let e=Math.floor(r/2)-1;e>=0;e--)a(r,e);for(let e=r-1;e>0;e--)t.swap(i,0,e),t.markSorted(i,[e]),a(e,0);return t.markSorted(i,[0]),t.finish(i),t.result()},quick:function(e){let t=new o,i=[...e];return t.push(i,"init",[]),!function e(r,a){if(r<a){t.push(i,"partition-range",[],{range:[r,a]});let n=function(e,r){let a=i[r];t.push(i,"select-pivot",[r],{range:[e,r],meta:{pivot:a}});let n=e-1;for(let o=e;o<r;o++)t.compare(i,o,r),i[o]<a&&++n!==o&&t.swap(i,n,o);return t.swap(i,n+1,r),t.markSorted(i,[n+1]),t.push(i,"pivot-placed",[n+1]),n+1}(r,a);e(r,n-1),e(n+1,a)}else r===a&&t.markSorted(i,[r])}(0,i.length-1),t.finish(i),t.result()},merge:function(e){let t=new o,i=[...e];return t.push(i,"init",[]),!function e(r,a){if(r>=a)return;let n=Math.floor((r+a)/2);e(r,n),e(n+1,a),function(e,r,a){t.push(i,"merge-range",[],{range:[e,a],meta:{mid:r}});let n=i.slice(e,r+1),o=i.slice(r+1,a+1),s=0,l=0,d=e;for(;s<n.length&&l<o.length;)t.comparisons++,n[s]<=o[l]?i[d]=n[s++]:i[d]=o[l++],t.writes++,t.push(i,"merge-write",[d],{range:[e,a]}),d++;for(;s<n.length;)i[d]=n[s++],t.writes++,t.push(i,"merge-write",[d],{range:[e,a]}),d++;for(;l<o.length;)i[d]=o[l++],t.writes++,t.push(i,"merge-write",[d],{range:[e,a]}),d++;0===e&&a===i.length-1&&t.markSorted(i,Array.from({length:i.length},(e,t)=>t))}(r,n,a)}(0,i.length-1),t.finish(i),t.result()},radix:function(e){let t=new o,i=[...e];if(t.push(i,"init",[]),0===i.length)return t.finish(i),t.result();let r=Math.max(...i);for(let e=1;Math.floor(r/e)>0;e*=10){let r=Array(i.length).fill(0),a=Array(10).fill(0);t.push(i,"gap-set",[],{meta:{digit:e}});for(let r=0;r<i.length;r++){let n=Math.floor(i[r]/e)%10;a[n]++,t.push(i,"count",[r],{meta:{digit:n}})}for(let e=1;e<10;e++)a[e]+=a[e-1];for(let t=i.length-1;t>=0;t--){let n=Math.floor(i[t]/e)%10;r[a[n]-1]=i[t],a[n]--}for(let a=0;a<i.length;a++)i[a]=r[a],t.writes++,t.push(i,"overwrite",[a],{meta:{digit:e}})}return t.finish(i),t.result()},counting:function(e){let t=new o,i=[...e];if(t.push(i,"init",[]),0===i.length)return t.finish(i),t.result();let r=Math.min(...i),a=Array(Math.max(...i)-r+1).fill(0),n=Array(i.length).fill(0);for(let e=0;e<i.length;e++)a[i[e]-r]++,t.push(i,"count",[e],{meta:{bucket:i[e]-r}});for(let e=1;e<a.length;e++)a[e]+=a[e-1];for(let e=i.length-1;e>=0;e--)n[a[i[e]-r]-1]=i[e],a[i[e]-r]--;for(let e=0;e<i.length;e++)i[e]=n[e],t.writes++,t.markSorted(i,[e]);return t.finish(i),t.result()},bucket:function(e){let t=new o,i=[...e];if(t.push(i,"init",[]),0===i.length)return t.finish(i),t.result();let r=Math.min(...i),a=Array.from({length:Math.floor((Math.max(...i)-r)/5)+1},()=>[]);for(let e=0;e<i.length;e++){let n=Math.floor((i[e]-r)/5);a[n].push(i[e]),t.push(i,"bucket-place",[e],{meta:{bucket:n}})}for(let e=0;e<a.length;e++)a[e].sort((e,t)=>e-t),t.push(i,"bucket-sorted",[],{meta:{bucket:e}});let n=0;for(let e=0;e<a.length;e++)for(let r=0;r<a[e].length;r++)i[n]=a[e][r],t.writes++,t.markSorted(i,[n]),n++;return t.finish(i),t.result()},shell:function(e){let t=new o,i=[...e];t.push(i,"init",[]);let r=i.length;for(let e=Math.floor(r/2);e>0;e=Math.floor(e/2)){t.push(i,"gap-set",[],{meta:{gap:e}});for(let a=e;a<r;a++){let r=i[a],n=a;for(;n>=e&&(t.compare(i,n-e,n),!(i[n-e]<=r));)i[n]=i[n-e],t.writes++,t.push(i,"shLine truncated
|
||||
Reference in new issue
Block a user