1. Programación II
Clase práctica 7: Uso del TDA Pila
M. Sc. Leandro Tabares Martín, P. As.
https://www.slideshare.net/LeandroTabaresMartn, ltmartin@uci.cu
3. Bibliografía
Heileman, G.; Estructuras de datos,
algoritmos y programación orientada a
objetos. Capítulo 6.
Aho, V., Hopcroft, J., Ullman, J.;
Estructuras de datos y algoritmos.
Capítulo 2, epígrafes 2.3 y 2.4.
5. Revisión del estudio independiente
Diseñe una clase Cadena que contenga un
método nombrado Palíndromo, que devuelve
verdadero si la cadena se lee igual de izquierda
a derecha y de derecha a izquierda. Utilice una
pila y una cola.
14. Estudio independiente
Realizar el ejercicio que está en la
URL
https://practiceit.cs.washington.edu/
problem/view/bjp3/chapter14/e1-
splitStack
15. Estudio independiente
Write a method splitStack that takes a stack of integers as
a parameter and splits it into negatives and non-negatives.
The numbers in the stack should be rearranged so that all
the negatives appear on the bottom of the stack and all the
non-negatives appear on the top. In other words, if after
this method is called you were to pop numbers off the
stack, you would first get all the nonnegative numbers and
then get all the negative numbers. It does not matter what
order the numbers appear in as long as all the negatives
appear lower in the stack than all the non-negatives. You
may use a single queue as auxiliary storage.
16. Programación II
Clase práctica 7: Uso del TDA Pila
M. Sc. Leandro Tabares Martín, P. As.
https://www.slideshare.net/LeandroTabaresMartn, ltmartin@uci.cu