Question
Write algorithm for insert operation in Queue.

Answer

Get the step-by-step solution for this question inside the Vidyadip app.

Get the answer in the app

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free

Similar questions

WAP to find the sum of first n terms of the following series:
$x+x^2+x^3+\ldots$

Write a program which accepts a sequence of commaseparated numbers from console and generate a list and a tuple which contains every number.

Suppose the following input is supplied to the program:
23,45,67,78,89
Then, the output should be:
['23', '45', '67', '78', '89']
('23', '45', '67', '78', '89')

Write a python program to create a list of numeric values and sort the list using Insertion Sort Technique.
Write algorithm for Delete operation in Queue.
Write a script to create a list of 10 random floating point numbers and then
(a) Display this list of numbers
(b) Find the largest and smallest numbers present in the list (without using max() and min() functions)
Write the Pseudocode to sort the list using Insertion sort – to sort a list A in ascending order
Write the Pseudocode to sort the list using Bubble sort– to sort a list A in ascending order
WAP to find the sum of first n terms of the following series:
$1-\frac{x^3}{3 !}+\frac{x^5}{5 !}-\frac{x^7}{7 !} \ldots$
Expertia Professional Global (EPG) is an online corporate training provider company for IT related courses. The company is setting up their new campus in Mumbai. You as a network expert have to study the physical locations of various buildings and the number of computers to be installed. In the planning phase, provide the best possible answers for the queries (a) to (d) raised by them.

Building to Building distances (in Mtrs.)

FROMToDistance
Administrative BuildingFinance Building60
Administrative BuildingFaculty Studio building120
Finance BuildingFaculty Studio building70

Number of computers in each of the blocks/Center is as follows:

Administrative Building20
Finance Building40
Faculty Studio building120

(a) Suggest the most appropriate building, where EPG should plan to install the server.

(b) Suggest the most appropriate building to building cable layout to connect all three buildings for efficient communication.

(c) Which type of network out of the following is formed by connecting the computers of these three buildings?

LAN, MAN, WAN

(d) Which wireless channel out of the following should be opted by EPG to connect to students of all over the world?

Infrared, Microwave, Satellite

Write SQL queries for (a) to (f) and write the outputs for the SQL queries mentioned shown in (g1) to (g4) parts on the basis of tables ITEMS and TRADERS:

Table: ITEMS

CODE INAME QTY PRICE COMPANY TCODE
1001 DIGITAL
PAD 12i
120 11000 XENITA T01
1006 LED
SCREEN 40
70 38000 SANTORA T02
1004 CAR GPS
SYSTEM
50 21500 GEOKNOW T01
1003 DIGITAL
CAMERA
12X
160 8000 DIGICLICK T02
1005 PEN DRIVE
32GB
600 1200 STOREHOME T03

Table: TRADERS

TCode TName CITY
T01 ELECTRONIC SALES MUMBAI
T03 BUSY STORE CORP DELHI
T02 DISP HOUSE INC CHENNAI

(a) To display the details of all the items in the ascending order of item names (i.e. INAME).

(b) To display item name and price of all those items, whose price is in range of 10000 and 22000 (both values inclusive).

(c) To display the number of items, which are traded by each trader. The expected output of this query should be:

T01 2

T02 2

T03 1

(d) To display the price, item name and quantity (i.e. qty) of those items which have quantity more than 150.

(e) To display the names of those traders, who are either from DELHI or from MUMBAI.

(f) To display the names of the companies and the names of the items in descending order of company names.

(g1) Select max(price), min(price) from items;

(g2) Select price*qty amount from items where code=1004;

(g3) Select distinct tcode from items;

(g4) Select iname, tname from items i, traders t where i.tcode=t.tcode and qty <100;