python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to convert 3-dimensional array of fixed size to a reference-style?
I work with 3-dimensional arrays of fixed size. For the first time I used passing by value.
fn some_func(matrix: [[[f64;Z];Y];X]) {// body}
fn main() {
let m = [[[0.0;Z];Y];X];
some_func(m);
...
Alexander Fyodorov
Votes: 0
Answers: 1
Sum and combine similar object elements in array if condition is met - Javascript
I have an array of this shape:
[
{
unique: 8,
views: 24,
name: "https://l.instagram.com/",
sec: 5.39,
},
{
unique: 2,
views: 20,
name: "",
sec...
lisa
Votes: 0
Answers: 4
Minimum adjacent swaps to group equal elements in an array
Given an array L containing N elements, from an alphabet of M distinct elements, is there an effective way to calculate the minimum number of swaps of two adjacent elements such that we group all the ...
rmlb
Votes: 0
Answers: 0
CSES range query section question salary queries problem
I am trying to solve cses salary queries (https://cses.fi/problemset/task/1144/)
Question: I will make a frequency array of salaries and I will use coordinate compression but while update I have to re...
bharat aaryavrat
Votes: 0
Answers: 1