Questions tagged [highest]

134 questions
1
vote
4 answers

How to find a highest scoring word inside a string?

I am doing some of the CodeWars challenges again. I have a problem with this one: "Given a string of words, you need to find the highest scoring word. Each letter of a word scores points according to its position in the alphabet: a = 1, b = 2, c = 3…
Mateusz Woś
  • 333
  • 2
  • 10
1
vote
4 answers

Get HIGHEST and SECOND HIGHEST value for each ID (SQL)

New to SQL. In Access 2016. In a table of different equipment (EQUIP1, EQUIP2, EQUIP3), I want in a query the last and second to last maintenance dates. Many fixes I have searched for do not account for grouping by an ID (EQUIP# in my case) What I…
1
vote
1 answer

Find highest value in multidimensional array and keep highest

How can I get the highest value from an array? For example, I'm trying to get the highest result of each quiz instead of multiple results of the same test. I have an array that looks like this: [ { "ID":"806", …
CyberGoat
  • 13
  • 2
1
vote
4 answers

Java - Find the row and column with the max sum

As the title says, I want to know a way (in Java) to find which row (in a matrix/2D Array) and column has the highest sum of its numbers. There might be an easy solution but I'm struggling to find it. I currently have the first part of the program…
Mauricio
  • 13
  • 1
  • 7
1
vote
0 answers

How do I get Max() from 100+ fields in Django

The table has 110 fields. I need to highest value from each row (like gratest in mysql) from 100 columns (thousands of records) and I need the filed name well (which has the highest value) Work platform in Django, MySQL. I've tried hitting db from…
Vrunda
  • 21
  • 1
  • 4
1
vote
4 answers

Create function in python to find the highest of all function arguments, and return the "tag" of the value

Consider the following: p1=1; p2=5; p3=7; highest=max(p1,p2,p3). The max function would return 7. I am looking to create a similar function, which would return "p3". I have created a small function (by simple comparisons) for the above example,…
gatechgrad
  • 25
  • 1
  • 4
1
vote
5 answers

R Selecting highest count cells conditional on a second column

Apologies, if this is a duplicate please let me know, I'll gladly delete. I am attempting to select the four highest values for different values of another column. Dataset: A COUNT 1 1 2 2 1 6 3 1 3 4 1 9 5 1 2 6 1 …
Joseph0210
  • 195
  • 7
1
vote
1 answer

How to get the N highest numbers on an array while keeping original sorting?

For instance for N highest numbers, lets say N = 3 I have a and want to get b a = np.array([12.3,15.4,1,13.3,16.5]) b = ([15.4,13.3,16.5]) Thanks in advance.
Jan
  • 45
  • 7
1
vote
3 answers

Batch command to find highest number in set of strings?

For instance: file.txt contains: 4.3 - random1 5.6 - random2 2.2 - random3 3 - random4 1.8 - random5 I need a command that will output the highest number only, not the preceding text. Ie. Output = 5.6
Billy Jeffs
  • 29
  • 1
  • 6
1
vote
2 answers

F#: recursive function to find bigger value in non empty list

I need a recursive function in F# that gives me the biggest value of a non empty list. example: biggest [2;4;5;3;9;3] should return 9 Update 1 I'm learning recursive functions and this is an exercise from the book with no answer on it. I thought…
Seb
  • 69
  • 7
1
vote
3 answers

find highest values for an array of hashes with common keys in javascript

I currently have a JSON file with an array of hashes and would like to be able to return an array of hashes for each matching key "Club" that contains the highest "Decimal" value (using javascript in my Angular app). [ {"Bookmaker": "First",…
Sachin Karia
  • 547
  • 2
  • 8
  • 22
1
vote
2 answers

Finding Lowest Value. Function. Error: Thread 1: EXC_BAD_ACCESS (Code =1, address = 0x7fff5fc89000)

I am working on a function to find the lowest value within 5 input doubles. I found a reference online. I have tried to do my code using arrays, however I receive the following error: Error: Thread 1: EXC_BAD_ACCESS (Code =1, address =…
ab_dev
  • 93
  • 8
1
vote
4 answers

Get specific element with highest value in ArrayList

I'm new to java and I'm having a problem with ArrayList. I want to get the highest value from Jozef and Klaus. ArrayList looks like: | Name | Age| +--------------+----+ | Jozef Coin | 55 | | Jozef Coin | 56 | | Jozef Coin | 57…
Ilja
  • 85
  • 1
  • 7
1
vote
1 answer

How to order a dictionary within a list by alphabetical order and highest number

I have a basic piece of coding which follows: dict1 = [{"Name":"Ron","one":3,"two":6,"three":10} ,{"Name":"Mac","one":5,"two":8,"three":0} ,{"Name":"DUDE","one":16,"two":9,"three":2}] print(dict1) import…
Joao
  • 53
  • 4
1
vote
3 answers

Math.max() - if more elements are max?

For my quiz, I want to get the highest number of all answers. So far it works, but when there are 4 answers and 2 said A is right and two said B is right, then the overall group-result should be WRONG. So I want to find out, if there are more than…
Marc
  • 137
  • 1
  • 12
1 2
3
8 9