Download as:
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Language:EN
Pages: 8

Ashoka university introduction computer programmingpset deadline ist

Recall the Course Rule that copying or plagiarism in any form will result in an F. You are free to discuss with anyone, consult any textbook or web-resource, but you are expected to write your own program/solution from scratch.

Instructions

• We are declaring the 12 hours prior to pset deadlines as the delayed response period.

Unless it is regarding an emergency, all emails to course staff will be responded to 4 hours after the email is sent. Make sure you start working on your solutions sufficiently early to avoid last minute hiccups.

Refer to appendix A for input and output formats.

[25]

by Goutam Paul

2. Implement a stack of strings using linked list with all the stack-related operations discussed in class: push, pop, peek, isFull, isEmpty, display.

[10 + 15 = 25]

2

Appendix A: Question-1 Input/Output Format

Input:
Line 1: An integer N, the number of operations to be performed

1

Input:
Lines: 1 . . . N will have N (here, 6) operations (denoted by the integer in the menu shown above) with their respective inputs (for insert/display operations). Please note, the Display operations print their outputs immediately after they are executed. We have denoted input in BLACK and output in RED.

1 2 3 4 5 6 7 8 9 10 11 12

1
apple
1
orange
2
apple -> orange
1
banana
1
melon
2
apple -> banana -> melon -> orange

Appendix B: Question-2 Input/Output Format

1

Input:
Lines: 1 . . . N will have N (here, 13) operations (denoted by the integer in the menu shown above) with their respective inputs (for insert/display operations). Please note, the Pop, Peek, isFull, isEmpty, and Display operations print their outputs immediately after they are executed. isFull and isEmpty display 0 if it’s False, and 1 if it’s True. Peek and Display display -1 if the Stack is empty, and Pop returns -1 if the Stack is empty (refer to March 23 Classroom Post for details). We have denoted input in BLACK and output in RED.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

PSET 4

Deadline: 23:59 IST, 16 April, 2021

Output:
The command list: these are provided to you in the source files. Note that this menu is printed on the console only once, but the Enter choice> prompt should print each time (just like PSET3). Follow the order of the commands in the comments of the .c files included in the repository.

1
2
3
4
5
6
7
8

Ashoka University
CS/PHY-1101-2: Introduction to Computer Programming

PSET 4

14
15
16

1

17

melon

18
19
20
21
22

5

23

1

24
25
26
27
28

parrot

29

7

30
1

8

Copyright © 2009-2023 UrgentHomework.com, All right reserved.