i have an 2-d array(matrix) 3x3 like [[1, 2, 3],[4, 5, 6],[7, 8, 9]] and i need to replace 2 rows where is max and min value so its looks like: [[7, 8, 9],[4, 5
I've tryed to print out some array of strings but faced error: excess elements in char array initializer Please make a hint what's worng with this code? Step 1
I want to verify that a given array doesn't contain any of a list of values. There is expect.arrayContaining but I don't get how it is supposed to be used for t
I am practicing binary search with problem 704 on leetcode. At first, I just follow the concept of binary search and came up with this solution: int search(int*
I have a very specific problem in Javascript. I have array of objects, and each object contains some date. const array = [ {name: 'first', dat
how to get new array newSelect using map ,forEach const selects = [false, true, true, true, false]; const oldSelects = [ { select: true, name: 'AA' },
I try to use the find() method but I get cartItems.find is not a function what happens? and how to fix it? import React, {useState} from 'react' function car
I was trying to learn algos and data structures, and i was wondering about best approach to sort arrays in constant time. I am newbie but my only intention is t
I have two arrays, $array_A and $array_B. I'd like to append the first value from $array_B to the end of the first value of $array_A and repeat this approach fo
I am trying to remove item using ng-if and ng-else-if. "ng-if="navItem.gbn.indexOf('12345') !== -1" is true then array item only show contains('12345') items. b
I have an indexed array of associative arrays like this: [ ['brand' => 'ABC', 'model' => 'xyz', 'size' => 13], ['brand' => 'QWE', 'model' =&
I have five div elements containing the same six images. Only one div is shown at a time (others are display:none) but all are on the same page. Basic example:
My code to access elements of array using for loop. The output of the program is [19,17,15] which are the elements of array int a[] = { 12, 15, 16, 17, 19, 23 }
I want to extract the longest sequence of consecutive non NaN values from an array in Python. So from this one: a = [NaN, NaN, NaN, 1, 4, NaN, NaN, NaN, 4, 6, 8
I have, { mydata.map(({ name }) => ( <p style = {{ display: "inline" }} > { " " } { name }, </p>)) } How can I remove the last c
Right now I'm doing this tutorial for WebAssembly with Rust. The task is to implement Conways Game of Life in Rust. Writing a low-level language like Rust is ne
ch4-out is the sample imageI have a numpy array that contains some image data (ch4_out). Now, I want to extract intensity profile along a particular line (horiz
I have this two array. I want to make a array inside an array like this. How can I achieve that. Code posted below. This is the image I am sending inside fileTo
I am trying to convert the data object to custom format This is my data which i want to convert [ { Name: 15, GroupID: 1, Id: 1 }, { Name: 16, GroupID: 1,
I have four (nx1) dimensional arrays named a, b, c, and F. I want to run this algorithm without any loops. for i in range(n): if a[i] < b[i]: F[i