Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

1. Create an HTML Page showing information about your favorite movie in following mann, Slides of Computer Science

1. Create an HTML Page showing information about your favorite movie in following manner: a. Name of the movie as the heading in center as well as title of page. b. One paragraph stating the information about movie like release date, genre, director, budget etc. c. At least two images of the posters of movie. d. One paragraph describing the plot of the movie. e. An unordered list stating the cast of the movie along with equal size photos. f. An

Typology: Slides

2015/2016

Uploaded on 09/21/2021

sakshi-sharma-26
sakshi-sharma-26 🇮🇳

5 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Stack,'Queue'and'Heap'
Intermediate'Level'Questions:'
''
'
Stack:'
Implement'Stack'using'Queues'
[Practice'here:'https://practice.geeksforgeeks.org/problems/stack-using-two-queues/1 ]
How'to'efficiently'implement'“k”'stacks'in'an'array'?'
[Follow'here:'https://www.geeksforgeeks.org/efficiently-implement-k-stacks-single-array/ ]
Design'a'Stack'that'supports'getMin()'in'O(1)'time'and'O(1)'
extra'space.'
[Follow'here:'https://www.geeksforgeeks.org/design-a-stack-that-supports-getmin-in-o1-time-and-
o1-extra-space/ ]
Implement'stack'and'Queue'using'deque'
[Follow'here:'https://www.geeksforgeeks.org/implement-stack-queue-using-deque/ ]
Implement'methods'for'Infix'to'Postfix,'Prefix'to'Infix,'Prefix'to'
Postfix,'Postfix'to'Infix'and'Postfix'to'prefix'Conversion'using'
stack.'
[Follow'here:'https://www.geeksforgeeks.org/stack-set-2-infix-to-postfix/ ]
[Follow here: https://www.geeksforgeeks.org/prefix-infix-conversion/ ]
[Follow here: https://www.geeksforgeeks.org/prefix-postfix-conversion/ ]
[Follow here: https://www.geeksforgeeks.org/postfix-prefix-conversion/ ]
[Follow here: https://www.geeksforgeeks.org/postfix-to-infix/ ]
Find'the'next'Greater'element'
[Practice'here:'https://practice.geeksforgeeks.org/problems/next-larger-element/0 ]
The'celebrity'Problem'
[Practice'here:'https://practice.geeksforgeeks.org/problems/the-celebrity-problem/1 ]
Arithmetic'Expression'evaluation'
[Practice'here:'https://www.geeksforgeeks.org/arithmetic-expression-evalution/ ]
pf3
pf4
pf5

Partial preview of the text

Download 1. Create an HTML Page showing information about your favorite movie in following mann and more Slides Computer Science in PDF only on Docsity!

Stack, Queue and Heap

Intermediate Level Questions:

Stack:

• Implement Stack using Queues

[Practice here: https://practice.geeksforgeeks.org/problems/stack-using-two-queues/1 ]

• How to efficiently implement “k” stacks in an array?

[Follow here: https://www.geeksforgeeks.org/efficiently-implement-k-stacks-single-array/ ]

• Design a Stack that supports getMin() in O(1) time and O(1)

extra space.

[Follow here: https://www.geeksforgeeks.org/design-a-stack-that-supports-getmin-in-o1-time-and-

o1-extra-space/ ]

• Implement stack and Queue using deque

[Follow here: https://www.geeksforgeeks.org/implement-stack-queue-using-deque/ ]

• Implement methods for Infix to Postfix, Prefix to Infix, Prefix to

Postfix, Postfix to Infix and Postfix to prefix Conversion using

stack.

[Follow here: https://www.geeksforgeeks.org/stack-set- 2 - infix-to-postfix/ ]

[Follow here: https://www.geeksforgeeks.org/prefix-infix-conversion/ ]

[Follow here: https://www.geeksforgeeks.org/prefix-postfix-conversion/ ]

[Follow here: https://www.geeksforgeeks.org/postfix-prefix-conversion/ ]

[Follow here: https://www.geeksforgeeks.org/postfix-to-infix/ ]

• Find the next Greater element

[Practice here: https://practice.geeksforgeeks.org/problems/next-larger-element/0 ]

• The celebrity Problem

[Practice here: https://practice.geeksforgeeks.org/problems/the-celebrity-problem/1 ]

• Arithmetic Expression evaluation

[Practice here: https://www.geeksforgeeks.org/arithmetic-expression-evalution/ ]

  • Evaluation of Postfix expression

[Practice here: https://practice.geeksforgeeks.org/problems/evaluation-of-postfix-expression/0 ]

  • Implement a method to insert an element at its bottom without

using any other data structure.

  • Reverse a stack using recursion

[Follow here: https://www.geeksforgeeks.org/reverse-a-stack-using-recursion/ ]

  • Sort a Stack using recursion

[Practice here: https://practice.geeksforgeeks.org/problems/sort-a-stack/1 ]

  • Merge Overlapping Intervals

[Practice here: https://practice.geeksforgeeks.org/problems/overlapping-intervals/0 ]

  • Largest rectangular Area in Histogram

[Practice here: https://practice.geeksforgeeks.org/problems/maximum-rectangular-area-in-a-

histogram/0 ]

  • Length of the Longest Valid Substring

[Practice here: https://practice.geeksforgeeks.org/problems/valid-substring/0 ]

  • Expression contains redundant bracket or not

[Follow here: https://www.geeksforgeeks.org/expression-contains-redundant-bracket-not/ ]

  • Find the maximum difference between nearest left and right

smaller elements

[Practice here: https://practice.geeksforgeeks.org/problems/maximum-difference/1 ]

  • Remove brackets from an algebraic string containing + and –

operators

[Follow here: https://www.geeksforgeeks.org/remove-brackets-algebraic-string-containing-

operators/ ]

  • Find the first circular tour that visits all Petrol Pumps

[Practice here: https://practice.geeksforgeeks.org/problems/circular-tour/1 ]

  • Minimum time required to rot all oranges

[Practice here: https://practice.geeksforgeeks.org/problems/rotten-oranges/0 ]

  • Find maximum level sum in Binary tree

[Practice here: https://practice.geeksforgeeks.org/problems/max-level-sum-in-binary-tree/1 ]

  • Distance of nearest cell having 1 in a binary matrix

[Practice here: https://practice.geeksforgeeks.org/problems/distance-of-nearest-cell-having-1/0 ]

  • First negative integer in every window of size “k”

[Practice here: https://practice.geeksforgeeks.org/problems/first-negative-integer-in-every-window-

of-size-k/0 ]

  • Check if all levels of two trees are anagrams or not.

[Practice here: https://www.geeksforgeeks.org/check-if-all-levels-of-two-trees-are-anagrams-or-not/ ]

  • Sum of minimum and maximum elements of all subarrays of size

“k”.

[Practice here: https://www.geeksforgeeks.org/sum-minimum-maximum-elements-subarrays-size-k/ ]

  • Minimum sum of squares of character counts in a given string after

removing “k” characters.

[Practice here: https://practice.geeksforgeeks.org/problems/game-with-string/0 ]

  • Queue based approach or first non-repeating character in a stream.

[Practice here: https://practice.geeksforgeeks.org/problems/first-non-repeating-character-in-a-

stream/0 ]

Heap:

  • Heap Sort

[Follow here: https://www.geeksforgeeks.org/heap-sort/ ]

  • “k” largest element in an array

[Practice here: https://practice.geeksforgeeks.org/problems/k-largest-elements/0 ]

  • K th

smallest and largest element in an unsorted array

[Practice here: https://practice.geeksforgeeks.org/problems/kth-smallest-element/0 ]

  • Check if a Binary Tree is Heap

[Practice here: https://practice.geeksforgeeks.org/problems/is-binary-tree-heap/1 ]

  • Connect “n” ropes with minimum cost

[Practice here: https://practice.geeksforgeeks.org/problems/minimum-cost-of-ropes/0 ]

  • Merge “K” sorted arrays.

[Practice here: https://practice.geeksforgeeks.org/problems/merge-k-sorted-arrays/1 ]

  • Largest Derangement of a Sequence

[Practice here: https://www.geeksforgeeks.org/largest-derangement-sequence/ ]

  • Maximum distinct elements after removing “k” elements

[Practice here: https://practice.geeksforgeeks.org/problems/maximum-distinct-elements-after-

removing-k-elements/0 ]

  • Median in a stream of Running Integers

[Practice here: https://practice.geeksforgeeks.org/problems/find-median-in-a-stream/0 ]

  • Largest Triplet Product in a stream

[Practice here: https://www.geeksforgeeks.org/largest-triplet-product-stream/ ]

  • Convert BST to Min Heap

[Practice here: https://www.geeksforgeeks.org/convert-bst-min-heap/ ]