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 informatio, Lecture notes of Compilers

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

Typology: Lecture notes

2015/2016

Uploaded on 09/21/2021

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

5 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Array%
Intermediate%level%Questions:%
1.
Find%the%Union%and%Intersection%of%the%two%sorted%arrays.%
[practice here: https://practice.geeksforgeeks.org/problems/union-of-two-arrays/0 ]
2.
Write%a%program%to%cyclically%rotate%an%array%by%one.%
[Practice here: https://practice.geeksforgeeks.org/problems/cyclically-rotate-an-array-by-
one/0 ]
3.
You%are%given%a%list%of%n-1%integers%and%these%integers%are%in%the%range%
of%1%to%n.%There%are%no%duplicates%in%the%list.%One%of%the%integers%is%
missing%in%the%list.%Write%an%efficient%code%to%find%the%missing%integer.%
[Practice here: https://practice.geeksforgeeks.org/problems/missing-number-in-array/0 ]
4. F
ind%all%pairs%on%integer%array%whose%sum%is%equal%to%given%number
.
[Practice here: https://practice.geeksforgeeks.org/problems/count-pairs-with-given-sum/0 ]
5. F
ind%duplicates%in%an%array.
[Practice here : https://practice.geeksforgeeks.org/problems/find-duplicates-in-an-array/1 ]
6. S
ort%an%Array%using%Quicksort%algorithm.
[ Follow link: https://www.geeksforgeeks.org/quick-sort/ ]
7. F
ind%common%elements%in%three%sorted%arrays
[Practice here: https://practice.geeksforgeeks.org/problems/common-elements/0 ]
8. F
ind%the%first%repeating%element%in%an%array%of%integers.
[Practice here: https://practice.geeksforgeeks.org/problems/first-repeating-element/0 ]
9. F
ind%the%first%non-repeating%element%in%a%given%array%of%integers.%
[Solution: https://www.geeksforgeeks.org/non-repeating-element/ ]
pf3

Partial preview of the text

Download 1. Create an HTML Page showing informatio and more Lecture notes Compilers in PDF only on Docsity!

Array

Intermediate level Questions:

1. Find the Union and Intersection of the two sorted arrays.

[practice here: https://practice.geeksforgeeks.org/problems/union-of-two-arrays/0 ]

2. Write a program to cyclically rotate an array by one.

[Practice here: https://practice.geeksforgeeks.org/problems/cyclically-rotate-an-array-by-

one/0 ]

3. You are given a list of n-1 integers and these integers are in the range

of 1 to n. There are no duplicates in the list. One of the integers is

missing in the list. Write an efficient code to find the missing integer.

[Practice here: https://practice.geeksforgeeks.org/problems/missing-number-in-array/0 ]

4. F ind all pairs on integer array whose sum is equal to given number.

[Practice here: https://practice.geeksforgeeks.org/problems/count-pairs-with-given-sum/0 ]

5. F ind duplicates in an array.

[Practice here : https://practice.geeksforgeeks.org/problems/find-duplicates-in-an-array/1 ]

6. S ort an Array using Quicksort algorithm.

[ Follow link: https://www.geeksforgeeks.org/quick-sort/ ]

7. F ind common elements in three sorted arrays

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

8. F ind the first repeating element in an array of integers.

[Practice here: https://practice.geeksforgeeks.org/problems/first-repeating-element/0 ]

9. F ind the first non-repeating element in a given array of integers.

[Solution: https://www.geeksforgeeks.org/non-repeating-element/ ]

10. G iven an array with all distinct elements, find the largest three

elements. Expected time complexity is O(n) and extra space is O(1).

Input: arr[] = {10, 4, 3, 50, 23, 90}

Output: 90, 50, 23

11. R earrange the array in alternating positive and negative items with

O(1) extra space. [follow link : https://www.geeksforgeeks.org/rearrange-array-

alternating-positive-negative-items-o1-extra-space/ ]

12. F ind if there is any subarray with sum equal to zer

[Practice here: https://practice.geeksforgeeks.org/problems/subarray-with- 0 - sum/0 ]

13. F ind Largest sum contiguous Subarray.[Very Important]

[Practice here: https://practice.geeksforgeeks.org/problems/kadanes-algorithm/0 ]

14. F ind the factorial of a large number.

[Practice here: https://practice.geeksforgeeks.org/problems/factorials-of-large-numbers/0 ]

15. Fi nd Maximum Product Subarray.

[Practice here: https://practice.geeksforgeeks.org/problems/maximum-product-subarray/0 ]

16. F ind longest consecutive subsequence.

[Practice here: https://practice.geeksforgeeks.org/problems/longest-consecutive-subsequence/0 ]

17. F ind the minimum element in a rotated and sorted array.

[Practice here: https://practice.geeksforgeeks.org/problems/minimum-element-in-a-sorted-and-

rotated-array/0 ]

18. Given an array of size n and a number k, fin all elements that^ appear

more than n/k times.

[Practice here: https://practice.geeksforgeeks.org/problems/count-element-

occurences/1 ]

19. G CD of given index ranges in an array

[Solution : https://www.geeksforgeeks.org/gcds-of-a-given-index-ranges-in-an-array/ ]

20. M aximum profit by buying and selling a^ share at most twice.

[ Practice here : https://www.geeksforgeeks.org/maximum-profit-by-buying-and-selling-a-

share-at-most-twice/ ]