All Questions
2 questions
0
votes
1
answer
186
views
Minimum removal of subarrays to make array equal to target
Lets say we have an array [5, 4, -2, 4, -3] and we want all elements to equal to 0. Subarrays can be used to add or subtract by 1. For example, I can add 1's from index 0 to 3, and then the list is [5 ...
6
votes
5
answers
1k
views
How to extract all possible matching arrays of objects from one array of objects?
I have an array of objects, e.g.
var arr = [
{"a": "x"},
{"b": "0"},
{"c": "k"},
{"a": "nm"},
{"b": "765"},
{"ab": "i"},
{"bc": "x"},
{"ab": "4"},
{"abc": "L"}
];...