Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
2 answers
136 views

LinkedList Stack Implementation

I'm new to the programming and I want to ask a question about my linkedlist stack implementation if it's correct and if it meets the requirements of the linkedlist stack implementation. If there is ...
E.Etem's user avatar
  • 31
0 votes
2 answers
76 views

Another Stack implementation in Java

I'm trying to write my own stack implementation using LinkedList. It looks like it is doing what it should doing. But how does it look from a design perspective? ...
Paweł Jarosiewicz's user avatar
9 votes
2 answers
2k views

A counterexample in balanced parentheses

In this program I had to analyse if the parenthesis given are well balanced. For instance, input (()) is correct and input ())(()...
I likeThatMeow's user avatar
1 vote
1 answer
632 views

Analyzing an arithmetic expression using stacks

I'm looking for some constructive (harsh) criticism of a homework I've done (the code works fine). Also Is there a better/another way to solve the exercise? Exercise: Read an arithmetic expression ...
I likeThatMeow's user avatar
4 votes
2 answers
293 views

My implementation of Stack and Queue with Array without help of library functions

I am new to Java and am trying to learn coding. Here is my implementation of a stack and a queue without the help of library functions. Please provide your suggestions on design, coding style and ...
SLR's user avatar
  • 139
0 votes
1 answer
580 views

Sort a stack using Java

This is my attempted solution to cracking the coding interview exercise 3.5. Looking for any feedback on coding style or the algorithm anywhere I can improve really. The problem specification is as ...
Average's user avatar
  • 851
2 votes
2 answers
83 views

Program looks for correct balance of ( [ and { in expression

I'm still new to programming. (First exposure was school about a year ago), and for some reason this problem really gave me a lot of problems trying to solve it. Can you help me understand what I ...
P. Fernandez's user avatar
10 votes
2 answers
2k views

Implementation of stack

Task: Create a class RPNStack which represents a stack of objects of type Node. Class RPNStack contains only one private field top of type Node. Objects of type Node represent data that are ...
Eugene Shymko's user avatar
5 votes
2 answers
3k views

Simple FIFO and LIFO ferry simulator

I am trying to make a ferry simulator with one ferry that works like a stack and another like a queue. I have a working class for stacks and queues with pop/push; I am trying to figure out how to ...
Shema Martin's user avatar
6 votes
1 answer
8k views

Palindrome using stack

I recently started learning Java, algorithms, and data structures. I am trying to check if a string is palindrome. I would like a review to see where and how I could improve. ...
wandermonk's user avatar
2 votes
3 answers
3k views

Delimiter-matching using Stack in Java

Is this code okay? ...
Arun Prakash's user avatar
  • 1,493
10 votes
6 answers
24k views

Reversing a String using Stack

Is this code okay? ...
Arun Prakash's user avatar
  • 1,493
8 votes
4 answers
65k views

Array Implementation of Stack

I've implemented the basic logic of a stack data structure. How can I make this code more generic? Is there any better way to display the stack contents? StackMethods.java ...
Arun Prakash's user avatar
  • 1,493
10 votes
3 answers
113k views

Stack implementation using a linked list

To understand the concept, I implemented the stack operations using a linked list. Please review the code and tell me your suggestions. Node.java ...
Arun Prakash's user avatar
  • 1,493