Question
Write different Time Complexity and Space Complexity of Bubble Sort, Selection Sort and Insertion Sort.

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

Python program to generate groups of 6 consecutive numbers in a list.
What is the role of the computer in cybercrime?
Write two characteristics of Web 2.0.
Observe the following table and answer the parts (i) and (ii) accordingly

Table: Product

Pno Name Qty PurchaseDate
101 Pen 102 12-12-2011
102 Pencil 201 21-02-2013
103 Eraser 90 09-08-2010
109 Sharpener 90 31-08-2012
113 Clips 900 12-12-2011

(a) Write the names of most appropriate columns, which can be considered as candidate keys.

(b) What is the degree and cardinality of the above table?

Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which are based on the tables:

TABLE: SALESPERSON

CODE NAME SALARY ITCODE
1001 TANDEEP JHA 60000 I2
1002 YOGRAJ SINHA 70000 I5
1003 TENZIN JACK 45000 I2
1005 ANOKHI RAJ 50000 I7
1004 TARANA SEN 55000 I7

TABLE: ITEM

ITCODE ITEMTYPE TURNOVER
I5 STATIONARY 3400000
I7 HOISTERY 6500000
I2 BAKERY 10090000

(a) To display the CODE and NAME of all salesperson having “I7” item Type Code from the table SALESPERSON.
(b) To display all details from table SALESPERSON in descending order of SALARY.
(c) To display the number of SALESPERSON dealing in each TYPE of ITEM.(Use ITCODE for the same)
(d) To display NAME of all the salesperson table along with their corresponding ITEMTYPE from the ITEM table.
(e) Select max(salary) from salesperson;
(f) Select distinct itcode from salesperson;
(g) select code,name,i.itcode from sales persons, item i where s.itcode=i.itcode and turnover>=7000000;
(h) Select sum (salary)from salesperson where itcode=”i2”;

Consider the table: CLUB as given below:

Table: CLUB

MEMBER_ID MEMBER_NAME ADDRESS AGE FEE
M002 NISHA GURGAON 19 3500
M003 NIHARIKA NEW DELHI 21 2100
M004 SACHIN FARIDABAD 18 3500

(a) What is the cardinality and degree of the above given table?

(b) If a new column contact_no has been added and three more members have joined the club then how these changes will affect the degree and cardinality of the above given table.

Out of the following, which all comes under cyber crime? [Delhi 2015]

(a) Stealing away a brand new computer from a showroom.

(b) Getting in someone’s social networking account without his consent and posting pictures on his behalf to harass him.

(c) Secretly copying files from server of a call center and selling it to the other organization.

(d) Viewing sites on a internet browser.

Find the output:

Differentiate between DDL & DMLcommands. Identify DDL & DML commands from the following:

(UPDATE, SELECT, ALTER, DROP)

Write a menu driven program to calculate the total surface area and volume of a cube, cuboid, or sphere depending upon user's choice. The program should continue until the user selects the option to exit the program.
Script: