Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

494
Vistas
Pseudocode find biggest number in list

I have come across a question i am trying to answer but cant seems to figure it out, if someone can help me, please.

The intended functionality of the program below is to take a list of more than 1000 numbers (not in sequence) and determine the biggest number in the list. Identify any error(s) within this pseudocode solution and provide an explanation on why you identified this as a potential problem.

Let maxNumber represent the biggest number, set it to zero to start
While there are still numbers left in the list
    Look at the next number in the list
    Compare it to the maxNumber
        If next number is smaller than maxNumber
            Set maxNumber to that number
Report maxNumber as the biggest in the list
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

What if they are all negative numbers. You code will return 0 which is not even in the list. You should set maxNumber to the first number in the list before looping.

about 4 years ago · Juan Pablo Isaza Denunciar

0

If you want to find the biggest number, setting maxNumber to the larger numbers is a procedure.

(Still, the question seems too basic.)

Let maxNumber represent the biggest number, set it to zero to start
While there are still numbers left in the list
    Look at the next number in the list
    Compare it to the maxNumber
        If next number is **bigger** than maxNumber
            Set maxNumber to that number
Report maxNumber as the biggest in the list

Else, set maxNumber to the first element in the list for a more precise and valid output.

Let maxNumber represent the first number in the list
While there are still numbers left in the list
    Look at the next number in the list
    Compare it to the maxNumber
        If next number is **bigger** than maxNumber
            Set maxNumber to that number
Report maxNumber as the biggest in the list
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda