Skip to content

Commit

Permalink
feat: small fixes + heap!
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePrimeagen committed Aug 3, 2022
1 parent 29ba2cd commit 7ffe2a8
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions scripts/dsa.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
const length_property = {
getters: [{
name: "length",
return: "number",
prop_name: "_length",
}],
properties: [{
name: "_length",
name: "length",
type: "number",
scope: "private",
scope: "public",
}]
};
const list_interface = {
Expand Down Expand Up @@ -40,6 +35,24 @@ const list_interface = {
};

module.exports = {
MinHeap: {
type: "class",
methods: [{
name: "push",
args: "value: number",
return: "void",
}, {
name: "delete",
args: "",
return: "number",
}],
properties: [{
name: "length",
type: "number",
scope: "public",
}]
},

Map: {
generic: "<T extends (string | number), V>",
type: "class",
Expand Down Expand Up @@ -76,15 +89,10 @@ module.exports = {
name: "pop",
return: "T | undefined",
}],
getters: [{
name: "length",
return: "number",
prop_name: "_length",
}],
properties: [{
name: "_length",
name: "length",
type: "number",
scope: "private",
scope: "public",
}]
},

Expand Down

0 comments on commit 7ffe2a8

Please sign in to comment.