1 / 9

ESTRUCTURA DE DATOS

ARREGLOS. ESTRUCTURA DE DATOS. ING.CIP .IVAN PETRLIK AZABACHE. ARREGLOS. ARREGLOS. Conjunto de espacios de memoria uno a continuacion del otro.Pertenece a un solo tipo de dato donde cada Espacio de memoria es identificado por un indice. TIPOS DE ARREGLOS.

odelia
Télécharger la présentation

ESTRUCTURA DE DATOS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ARREGLOS ESTRUCTURA DE DATOS ING.CIP .IVAN PETRLIK AZABACHE

  2. ARREGLOS

  3. ARREGLOS • Conjunto de espacios de memoria uno a continuacion del otro.Pertenece a un solo tipo de dato donde cada Espacio de memoria es identificado por un indice.

  4. TIPOS DE ARREGLOS • ARREGLOS UNIDIMENSIONALES(VECTORES)

  5. TIPOS DE ARREGLOS • ARREGLOS BIDIMENSIONALES(MATRICES)

  6. ARREGLO UNIDIMENSIONAL • EN UNA MISMA LINEA: int x[ ] = new int [ 3 ] ; String nomb [ ] = new String [ 4 ] ; • EN DOS LINEAS: int x [ ] ; x = new int [ 3 ] ; String nomb[]; nomb=new String [ 4 ] ;

  7. DECLARACION E ASIGNACION • En Una Misma Linea: int x[ ]= { 3,5,4,6 }; String nomb[]={ “ivan”,”carlo”,”beto”,”wily”}; • En mas de una Linea : int x [ ]= new int [ 3 ]; x [ 0 ] = 3 ; x [ 1 ] = 5 ; x [ 2 ] = 4 ; x [ 3 ] = 6 ;

  8. ARREGLO BIDIMENSIONAL • EN UNA MISMA LINEA: int x[ ] [ ] = new int [ 3 ] [3 ] ; String nomb [ ] [ ] = new String [ 4 ] [4 ] ; • EN DOS LINEAS: int x [ ] [ ] ; x = new int [ 3 ] [3 ] ; String nomb[] [ ] ; nomb=new String [ 4 ] [4 ] ;

  9. DECLARACION E ASIGNACION • En Una Misma Linea: int x[ ] [ ] = { { 3 , 5} , {4 , 6 } }; String nomb[] [ ] ={ {“ivan”,”carlo”}, {”beto”,”wily” }}; • En mas de una Linea : int x [ ] [ ] = new int [ 2] [ 2] ; x [ 0 ] [0 ] = 3 ; x [ 1 ] [ 1] = 5 ;

More Related