Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
2 answers
163 views

Search for an odd positive minimum

Please help me understand what the error is. Here are the conditions of the problem: Print the value of the smallest positive odd element of the array, and if there are no positive odd elements in ...
Дина's user avatar
3 votes
2 answers
157 views

Numpy array methods are faster than numpy functions?

I have to work with the learning history of a Keras model. This is a basic task, but I've measured the performance of the Python built-in min() function, the numpy.min() function, and the numpy ...
Ivan's user avatar
  • 33
2 votes
3 answers
3k views

Minimize array elements by multiplying adjacent elements only if the product is less than equal to k

I recently came across this question in an online assessment. arr = [2,6,2,4] k = 15 The array elements need to be minimized by multiplying two adjacent elements only and only if their product is ...
ng.newbie's user avatar
  • 3,270
0 votes
0 answers
341 views

RiscV Array maximum and minimum

I wanted to ask how do I create an array given 10 values entered by input and then calculate the maximum and minimum I'm going crazy. I started like this but then after the 4th value the program ends: ...
MattexD's user avatar
-1 votes
1 answer
52 views

Can't solve this text problem with a code in c++

Alex is a student at a collage and will now enroll in the summer semester, for which he needs to take paper documents to the faculty. All students bring their documents on one of the N days (marked ...
Alrk's user avatar
  • 9
-2 votes
2 answers
2k views

How to find the minimum and maximum value from an numpy array image in python?

I do have some numpy array images and I want to find the minimum and maximum value of the element from a certain portion of the image by row and column of the array. Suppose, I do have a grayscale ...
Jacob Issac's user avatar
-1 votes
3 answers
191 views

Determine the three maximum and two minimum values of the array

Task: Given a natural number N (set arbitrarily as a preprocessor constant) and one-dimensional array A0, A1, …, AN-1 of integers (generate positive and negative elements randomly, using the <...
Bob's user avatar
  • 13
-5 votes
1 answer
103 views

Replace elements of array C with units [closed]

I have a one-dimensional array where I need to replace the array elements after the smallest element with one, but I don't know what I need to write to make this condition work? I will be grateful for ...
Who is Antonio's user avatar
0 votes
2 answers
154 views

Finding min and min with nested array

I'm wanting to find the min and max value of values inside a nested array, however the nested array has strings and numbers I'm able to find min and max when using a variable of just the numbers but ...
user avatar
0 votes
2 answers
45 views

Why does my code not run correct with arr10 but work fine with arr9?

To get the minimum value in an array, I made the method minValue public int minValue() { int smallestVal = 0; //field if (intArray.length == 0) { //if array is empty, return 0 ...
nimi's user avatar
  • 1
1 vote
1 answer
127 views

How to find the minimum in JSON in Python

There is a part of a JSON file: { "payload": { "orders": [ { "quantity": 1, "platinum": 4, ...
KoraOnEarth's user avatar
0 votes
0 answers
27 views

Set a minimum and maximum int in a random number array (Java) [duplicate]

So I got an assignment, where the first problem is to set a minimum and maximum in an array which contains random numbers. I can figure out how to print the array with random numbers but I fail at ...
meltdown543's user avatar
0 votes
0 answers
11 views

How to print and find youngest in Java parallel arrays? [duplicate]

In two parallel arrays, String[] names and int[] ages, every name has a corresponding age and vice versa. Both arrays have the same length, say something like: String[] names = {“Alice”, “Paul”, “Jay”,...
jdona13's user avatar
  • 13
-1 votes
2 answers
923 views

Find indexes of multiple minimum value in an array in c++

Please don't write that I should do my homework myself. I have tried but cannot find the answer. Input: arr[11]={1,2,3,4,1,5,6,7,8,1,9} Output: 0 4 9 Returned position numbers are to be inserted ...
jano's user avatar
  • 23
-1 votes
1 answer
39 views

im trying to do this question: define two separate methods with array parameter to find the maximum and minimum number the user inputs

I believe i have the basics of what I want to do down. I'm just having trouble working oy the kinks of the problem.I cant figure out what to do or where to even start attempting to figure it out. I ...
Sherry Faith's user avatar

15 30 50 per page
1
2 3 4 5
25