All Questions
5 questions
0
votes
1
answer
36
views
shares of stack problem with js and dynamic programming
The problem receives an input like [[500, 5, 1], [450, 2, 1], [400, 5, 1]], where each row represents a buyer. Each buyer has a value in position 0, which represents the amount they are willing to pay ...
1
vote
1
answer
82
views
Function that supports both currying and traditional behaviour for 'n' parameters [duplicate]
I have the below code wherein, I have wrapped functions to achieve the above behaviour. But unfortunately it returns expected result only when the no of parameters equals to 2.
function baseCurry (...
0
votes
1
answer
167
views
Why does this dynamic programming optimization actually make code slower?
This is from Leetcode problem: Concatenated Words.
Below is a working solution. I added what I thought to be an optimization (see code comment), but it actually slows down the code. If I remove the ...
4
votes
2
answers
1k
views
How can I get constant variable with the global object in Nodejs?
I wanted to get a constant variable with the global object to use it dynamically but global.myconstant doesn't work but global.myvar works.
λ node
> const myconstant = true
undefined
> global....
3
votes
1
answer
2k
views
Is WebAssembly going to replace JavaScript? [closed]
It’s been 2 months I’ve been deeply studying JavaScript plus it’s libraries and frameworks. I’m hearing from other students in my high school telling me assembly will replace what JavaScript. Is this ...