Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
54 views
18 pages
Raushan Kumar - 22scse2120040 (DAA)
Uploaded by
RAUSHAN KUMAR
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Raushan kumar_22scse2120040(DAA) For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
54 views
18 pages
Raushan Kumar - 22scse2120040 (DAA)
Uploaded by
RAUSHAN KUMAR
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Raushan kumar_22scse2120040(DAA) For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Raushan kumar_22scse2120040(DAA) For Later
You are on page 1
/ 18
Search
Fullscreen
DSo74 a given Set OF elements USINI Fhe Buick com method l AMA getermind the time PeOUIFed FO Sor7F The Clements. Repex SHE EXperimecct for Aicferent Vault ve NO, THE Number oF Phe elemete fn the Hist tp Se Sorted ane plot 4 Irak OF the time taken verson 1. The elements CON be read From a 18 oy CAN bE Qenerceted USINA Fhe wandorn number gancrator. Cot: — tinciude
HH rocltudes conto 44> > telaclude< S48[tine vetd Swap (father bot *y) < fant temb; temp = or 5 an 245 *y < teks ¢ erocte,_ random( ft ac, tat 9) vera gu Soule, fot 03 strane (timed 09); for( tro; tan;itt) ali) 2 rand) 21000, 7 fot Pav tition( < ignt 200, Fat !, rata) tet 0 LPS Let feAel; Pr doe ee medad-% gwrire((&=Ds swap aac), 82° GD; swap ($907,290); retun J > ¢ fot Buick sor int oC), fat ™, foto) ¥ ine 9; re (ment) £ S = Pareition(a.m), Buecksovd(9,m, S-1); me : PuickCorl 9, $41); yetumn a; 5 7 fot maino ft @ Or90000,, 1, ch, 5 Stuer timevat t; Aouble Start, ene ; ALE * ep: printf" Enter the type ef eperations \n"'); printe ("te vandomiy generate umber ane{ Suite sor\n”); brine “2- Ranctomiy generate NWF Ant BLUCKSo7F WH”) scaneé (“* 24" Beh); Susitea (cm): $ case ft Ep = Fopen (“Buick gon, txt”, “w)- J PTOFor (v= 100000" ('ep90000 ; f= 11 S000) $ generate random (9, Oo; gettime sfdar (at, NULL); Stat = 1 AV. Sect (LUV Leste [10000000 .0)” Brick sora (9,0 1=1)3 Pettimekleg Ht, NULL): end = t.tve see + (t ty_see/ fv 000000); print na ht 2 EWN, fend ~ st077); eprint (ep, “ad bt are In", t, ent otara); t Eclose(Ab)y brent; case. : prieté (“Enter tht nuunser 0F valuas Fo be gowrater’ scant ha" & te Jenerate — ranelom (4,1); qerrimestdoy{ st, NULL); Stara s tety. Seet (tty see 1000000.0); QuicteSovF(9, 0, (-1), Jettimeocday( Rt, NULY; end = totve Sec + (t.tv_usec /(0000000.0)5 priate (hal \t ETE An", ¢, end St979); printeU Sovtedl Number are \n"); pring G THE Sorted r7Aq fs \n"); For (viz 5 9< 6 N44) printe (“yg \t" 999); breck; default! printé (“ Invatigd choice tn"); 4 random 0! anBD From @ given vertex ( a weignted tonnerted Graph, Find Shoraect patho to BtAEH verter using DirstraS alg roth Sot: - Pinctude estdio-n> TEInclude < seidt's.n> TH notes < toniv-4> int mac) Pat Tobl[10} 2, stem, fnteqeree (io), Frag PINES Enter tre unser oF vertex \n)s cant nd”, BV), printe( Enter the numer oF dae matrix"): . Vent arroy(29J (299, v, 3, Wountso+ for([ so; (eve (#4) § for (T=°5 Tev; T+) seanet nd"! & Orre4( iI GI): 5 white (Wount
Pine ledeg ct qetr's 4 5 thdeting niax 20 using NAMESPALE Ltd; Int stk (Max); fot set Cmax; int Sizes int tepr-r; Int Cz veld push Lint 1) $ * te (top = = MAX-1) ; Y Cout<<“ no more plan” ; exit (2); 3 e4ge sek (+t tery =7t5 8 Veid Ppl) 4 fe (-topse) ‘ ne Cout<< Mo elements’, exit), 7 LIL top--@; pro || void ofc plagD < Cott << C445 fost int 0=%5 coutcc ste FI << “ ''3 3 Cout << ende ; “ Gorution” << e
Sit; epements J; AEO*ae Enter the epements (n”)! For( ters Cersizes rad) Set; COU “ Enter the yem@uiree/ Se :"); cin> Cin >> Sum; Cout
Hi qetucle< Pomanipk> 4h deFine MAX 10 ysing namespree std; fot path(maxd; statre int K=O; int Count=0; int perm (12094) 5 fot tourcost (120); veld swap lint Forint *Y $ ine tenp; tempi*n, mH "7: ye tenesVoid DES (fot c, int vomax, Int glinaa fore hat Y) fat vs vieJzte patr (k++) =; For( tro: tons (t+) i tE(FEIO BA tv) fe DES ULV. En); | | b | Void permute (int acd, int ¢, igt 1) < ° , No fat SK red fsom) for (E20; Kam, K+4) perm (count) (Kt 2 90K; count++} 5 else f forte 1) S220; 54D ° susap((940, (a3); permute(a, Caryn); cwapl (94 YA 44))5 5 tne * apersp {fat a, fat tone AX Eman) int Ld, v,4, min, excest=D;2 ae fot sum, et fend {23, POVAX), AMATI, Sra), tree Cran Grn) Pat Source, Count: Pat visited (MAX) 20 min> 999 , Source so; ee er) r for( dso, J
cost Ceourse] (iJ; SCJ =; pli cSoure; s (gourd) ets Sums 0; | o> Count = ©; wiilec count J 59-0) min 2999) Ur-ly fos[ i 0; fxg itt) ¢ eS C5) = 20) £ PPof Ed 0S <> min) ¢ N min > 4057; bens) $ 7! “eCKIG) =u; theI OI = POI; kets Count #t3 cum ex cost tut LUI? sed 2 for( Vz 0; VK, VE) . le( sv E20 BS cost Fe) G7 447) ¢ a7 2 est COI; plyg ats 5 4 for( (20; teas b+ 4) fortdzo; 3
= 999) Cout cc {ny Alo Min Cost span tree \n")s e} s€ es ys . foo (= 05 Vans a4) < ’ . r? free 4 OI CN AOIO = 5 ? PES (0, visited tree ,n) Cortex “Ini Approximate Loutt fous sf "<< Ondl; fort (20; Ven ks C44) § Ts ” Cont potaty CF<< “> 3 exceste = ost (Poth C/V poth C(4) 5 , Cour e< path (oJ; gree COVOTATHI() =1; } fot nuunoe CFS ena fot joterér ties 2-1, GS; iat met > 997, metindex, append ; fost f= 0, Cen; ft) city C3 ett pesmute (HY, 0, intercities 1) 5 for Fan-t; I> 5 te) Fact = fact *) ; For( (0; (
” (Loot) appmer (met ; Cot ge (LU Aeet)appmer) met)-1)™ loo Optimat tour Ing. rerum 0: Cot ce Hy, Aetteray
includes stdfis,4> thinclesle< syspime > tHhinelooles omp.h>- deste Senattroyd lint FreprlieI le), fat ver dousre ASHI, feuste 4204; $ $ yt C5, K, fakloyg Cerin): Street timeval ous qettimerdog (sty, nivie)- ASIF = Lv. tv_ seer Lty. tv vsee/ 0000000 os fort (20; Fever: fray 4 . Fo S=0) jever > yea) f ioFloyd (I) = grapnCcjp)- 3 2 ; PURI) Kcc ver seat) a fort (20: (’e vers C++) $ é for{ Jz0: d
tv. tv_ sec tltytve tte / 10000000. 9 J: wetum 4end~ $4077; % Int maint) int graph (eI (10), ver, (Ss double 184097, den, Times, TrmeP, Fqetor: bantet“tn Enter the numer of verpexs””): scane“ Af, aver): Ponte“ Ia Enter tu rez OA Fase matrix \n’ Oe Prt iso; fevers faa £ fox] Jr; dccver; Std) ; u on 74") Rgqrepr€ c] G)); t Tres = Serio (Fraph, ver, 4810, dang); Fimep = PATHeerd( graph ver stort, donq): pomre (“Time Taken By seriat fyoyy =hEIN” Tr mes %)- pune Time Taken By parallel Floyd = 26 In" temeP):Factor = UTimeP Times) 100; printey “ Povallel Floyd fs AE perceet time faster than Senal Floyd \n”’, Fa epor); wetum Q; > eS 2 2 —— 4 Eng
You might also like
Python Telegram Bot
PDF
100% (1)
Python Telegram Bot
788 pages
OOPS Practical Mine PDF
PDF
No ratings yet
OOPS Practical Mine PDF
67 pages
Artificial Intelligence
PDF
No ratings yet
Artificial Intelligence
45 pages
Oop Notes 1
PDF
No ratings yet
Oop Notes 1
153 pages
Basic Handnote of CSE-101 Course
PDF
No ratings yet
Basic Handnote of CSE-101 Course
43 pages
Dynamic Programming
PDF
No ratings yet
Dynamic Programming
47 pages
Untitled
PDF
No ratings yet
Untitled
12 pages
Dynamic Programming
PDF
No ratings yet
Dynamic Programming
47 pages
Chapter 3 (DS)
PDF
No ratings yet
Chapter 3 (DS)
34 pages
PPS Class Notes.3
PDF
No ratings yet
PPS Class Notes.3
32 pages
Computer Science Practical Amit Bikram Mishra Class Xii Science A
PDF
No ratings yet
Computer Science Practical Amit Bikram Mishra Class Xii Science A
18 pages
Raushan Kumar - 22scse2120040 (DAA)
PDF
No ratings yet
Raushan Kumar - 22scse2120040 (DAA)
18 pages
Array Level - 3
PDF
No ratings yet
Array Level - 3
16 pages
Array Extra Cls
PDF
No ratings yet
Array Extra Cls
11 pages
DP - ClassIV - Notes - 10th June 2023
PDF
No ratings yet
DP - ClassIV - Notes - 10th June 2023
8 pages
CLRS Gist - Handwritten
PDF
No ratings yet
CLRS Gist - Handwritten
32 pages
Gate Cse Notes: Joyoshish Saha
PDF
No ratings yet
Gate Cse Notes: Joyoshish Saha
8 pages
Dashrath Notes
PDF
No ratings yet
Dashrath Notes
20 pages
Java Unit 3 @72
PDF
No ratings yet
Java Unit 3 @72
72 pages
C Programming Notes (Unit-1234A) First Sem
PDF
No ratings yet
C Programming Notes (Unit-1234A) First Sem
86 pages
Arrays - Class 1
PDF
No ratings yet
Arrays - Class 1
13 pages
1
PDF
No ratings yet
1
8 pages
New Doc 02-22-2024 23.56
PDF
No ratings yet
New Doc 02-22-2024 23.56
27 pages
Array - Notes
PDF
No ratings yet
Array - Notes
24 pages
Ict 5
PDF
No ratings yet
Ict 5
9 pages
Algorithm Design Lab
PDF
No ratings yet
Algorithm Design Lab
28 pages
Computer Science Notes
PDF
No ratings yet
Computer Science Notes
36 pages
Divide and Conquer
PDF
No ratings yet
Divide and Conquer
13 pages
Codetantra Unit 4 Updated
PDF
No ratings yet
Codetantra Unit 4 Updated
63 pages
AD Notes After Midsem
PDF
No ratings yet
AD Notes After Midsem
12 pages
Smart Interviews Notes
PDF
No ratings yet
Smart Interviews Notes
75 pages
DS Notes Unit 1
PDF
No ratings yet
DS Notes Unit 1
32 pages
C Exam Answer Sheet
PDF
No ratings yet
C Exam Answer Sheet
15 pages
Daa Micro
PDF
No ratings yet
Daa Micro
25 pages
DP ClassV Notes 11th June 2023
PDF
No ratings yet
DP ClassV Notes 11th June 2023
9 pages
Java 1
PDF
No ratings yet
Java 1
31 pages
Fraud Detection Using The Fraud Triangle Theory and Data
PDF
No ratings yet
Fraud Detection Using The Fraud Triangle Theory and Data
22 pages
07 Dsa
PDF
No ratings yet
07 Dsa
25 pages
Irrigation System
PDF
No ratings yet
Irrigation System
22 pages
Notesof C Language by Abhay Kumar Awasthi Till Recursion
PDF
No ratings yet
Notesof C Language by Abhay Kumar Awasthi Till Recursion
27 pages
Automatic Irrigation Model Powered by Smart Rain P
PDF
No ratings yet
Automatic Irrigation Model Powered by Smart Rain P
17 pages
03 DSA Spiral
PDF
No ratings yet
03 DSA Spiral
25 pages
C
PDF
No ratings yet
C
25 pages
DS Assignment
PDF
No ratings yet
DS Assignment
16 pages
MCS-011 Problem Solving and Programming
PDF
No ratings yet
MCS-011 Problem Solving and Programming
13 pages
SDE Sheet by Striver - 240502 - 085409
PDF
No ratings yet
SDE Sheet by Striver - 240502 - 085409
58 pages
Data Structures ShortNotes
PDF
No ratings yet
Data Structures ShortNotes
15 pages
AD 1 Assignment
PDF
No ratings yet
AD 1 Assignment
32 pages
(Lecture 1) Introduction Counting Sort Insertion Sort
PDF
No ratings yet
(Lecture 1) Introduction Counting Sort Insertion Sort
7 pages
Design& Analysis of Algorithms Home Assignment
PDF
No ratings yet
Design& Analysis of Algorithms Home Assignment
32 pages
Unit 3 Pps
PDF
No ratings yet
Unit 3 Pps
19 pages
Python Model Practical.. (Set 4)
PDF
No ratings yet
Python Model Practical.. (Set 4)
65 pages
Python Record - 4
PDF
No ratings yet
Python Record - 4
29 pages
Pop IA2
PDF
No ratings yet
Pop IA2
10 pages
DAA Unit 4
PDF
No ratings yet
DAA Unit 4
50 pages
Aiml Unit 2 Notes
PDF
No ratings yet
Aiml Unit 2 Notes
33 pages
DAA Unit 1,2
PDF
No ratings yet
DAA Unit 1,2
33 pages
Arrays
PDF
No ratings yet
Arrays
44 pages
C++ Unit 2
PDF
No ratings yet
C++ Unit 2
46 pages
Arrays
PDF
No ratings yet
Arrays
20 pages
Supermind 4 Unit 9 Exercise
PDF
No ratings yet
Supermind 4 Unit 9 Exercise
8 pages
AdaModule1 2
PDF
No ratings yet
AdaModule1 2
41 pages