|
|
| (3 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| − | <span style="font-size: larger;">Leetcode Solutions and Render3D/RENDER examples.</span>
| |
| − |
| |
| − |
| |
| | == LeetCode Solutions == | | == LeetCode Solutions == |
| | | | |
| − | === LeetCode 1109 (using keytags)===
| + | This page links to grouped LeetCode problems. |
| − | <pre>
| |
| − | bookings = [[1,2,10],[2,3,20],[2,5,25]],
| |
| − | n = 5;
| |
| − | ro={};
| |
| − | f=(x,y)=>ro[x]=(ro[x]||0) + y;
| |
| − | f#;
| |
| − | bookings.map(r=>f((r[0])..(r[1]),r[2]));
| |
| − | ro
| |
| − | KEYTAGS(ro).map(r=>[r[0],SUM(r[1])])
| |
| − | PRINT(ro)
| |
| − | </pre>
| |
| − | | |
| − | === LeetCode 1109 (using objects.entries)===
| |
| − | <pre>
| |
| − | bookings = [[1,2,10],[2,3,20],[2,5,25]];
| |
| − | n = 5;
| |
| − | ro = {};
| |
| − | f = (x, y) => ro[x] = SUM(ro[x] || 0, y);
| |
| − | f#;
| |
| − | bookings.map(r => f((r[0])..(r[1]), r[2]));
| |
| − | PRINT(ro);
| |
| − | Object.entries(ro).map(r=>[r[0],SUM(r[1])])
| |
| − | </pre>
| |
| − | | |
| − | === LeetCode 2491 ===
| |
| − | <pre>
| |
| − | skill = [3,4];
| |
| − | p = skill.⋰.⁜(2);
| |
| − | arr = p[0].mergerows(p[1].reverse());
| |
| − | tar = ∑(arr[0]);
| |
| − | | |
| − | if(arr.filter(r => ≠(∑(r), tar)).length > 0)
| |
| − | {
| |
| − | result = "Not compatible(-1)";
| |
| − | }
| |
| − | else{
| |
| − | result = ∑(arr.$$(✖))
| |
| − | }
| |
| | | | |
| − | PRINT(result);
| + | * [[LeetCode Solutions/Problem Group 1 (Team Chemistry)]] |
| − | </pre>
| + | * [[LeetCode Solutions/Problem Group 2 (Flight Bookings)]] |
| | + | * [[Dynamic Weather Sphere]] |
| | + | * [[Planet Clock]] |