Skip to content

aafful/SimpleStack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

SimpleStack

A simple implementation of the Java stack interface

Write a program which implements a stack interface for integers. The interface should have ‘push’ and ‘pop’ functions. Your task is to ‘push’ a series of integers and then ‘pop’ and print every alternate integer.

INPUT SAMPLE:

Your program should accept a file as its first argument. The file contains a series of space delimited integers, one per line.

For example:
1: 1 2 3 4
2: 10 -2 3 4

OUTPUT SAMPLE:

Print to stdout every alternate space delimited integer, one per line.

For example:
1: 4 2
2: 4 -2

About

A simple implementation of the Java stack interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages