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

Exercises and Questions for Data Structures and Algorithms, Exams of Community Health

A collection of exercises and questions related to data structures and algorithms. It covers various topics, including arrays, linked lists, stacks, queues, trees, graphs, sorting, and searching. The exercises are designed to test understanding of fundamental concepts and problem-solving skills in the field of data structures and algorithms.

Typology: Exams

2024/2025

Available from 12/04/2024

LECTGRADER
LECTGRADER šŸ‡ŗšŸ‡ø

392 documents

Partial preview of the text

Download Exercises and Questions for Data Structures and Algorithms and more Exams Community Health in PDF only on Docsity!







  !"#$%#&'()+),-./.)/-& &#$%#&'()),-./)- 0 #+) 11. 2 - -&. 30 #+ 4 &./. 5 6&)- 2 ) 3 .%#.-#),,. 70 )-.&'()),-./)- 0 #+# 1 -&. 30 #+ 4 &./. 8  9 : 9 ;<=;>; 9 ?!@ 0 - /#A. 10 B)- 0 # 6)-./'+. 5 C)%-/)+ 1 #/()- 0 # DEF 2 #* 2 .-/)- 0 #/ 0 +. GF 2 .)) 20 % 0102 )- 0 # HI 0 /%.B- 0 * 2 - 0 # JK,)- 0 * 7 )+ 0 # 5 L 9 MNO!C 0 (0-+ 3 .-$..$& 02 &A,# 3 ),+P+-.(+('+-# 4 ./)-.-# 4 /. 7 .-) 3 /' 4 - )% 0 //. 7 ./+ 03 ,..* 70 /#(.-), 2 &)*A. DL 9 MNO==QRO!I 0 #A.# 2 &.(0 2 ), 1 ,#$+# 1 







@A 0 ** 0 - B$C& 0 - %# 1 $ = 9      

D; 9         

EF-!'",#"/$,%7&#*G"' 0 !$HIJ 1 $2       

      =; K 8 

:   = 9 LE:M  K 

I!",- 0 !$HIJ 1 $:N  9K 8  ;  

:K      LM       

  4 N    9 O   







 (^)     !"#$%! &!'('"")+, -"$'(",!'"$'''"$(!."#'%$%/  0 $"$  1  2 3 4  5 !$," 0 .''.#$"(! ) 6 "!%$$(!!"# "#."!'% 7 %!$ " 6 !''"% 6 !($ ."!'% / 289 :; 1  2 3 4  0 $ ")"<,'$"!$'')$ 6  "!$! "$=!""$ $("$$$'! "$ 6 >"),'$') 0 "<$"$ 6 "!= ?@3 8 A 1  B 89  C1 A B:D''%#!$!"$ $%""$$"!""$E"!$ "#'%!#'$$ 6 $'!$  ".!'%#"$($%!"$F#$ +G 8  $."'" ',!"%%"$%(#$%'H"$") !I$#!'(







; < =>? ; 6 @AAB 8 @%! 3 %A 2  2! 2 &' A * 2 $!'!$ 2 " 2 !

CD > /< >?  <  E/F!&3 2 9  2 + 

2 !'%!4  ' $! 2 + 2 !**GG#$%%$!&  4 ! 9 $ 2 +# 2!

,H 0  I  D EJ E. K L"$ 5 6 ! 2 $*%$ 4  2 + ! 







 (^)             !"#"$%&%'( )   *  ) +,,,,-    . )-  )- /0 1 (2% 34 ( 546 & 4 #(% 789 &$ 89 "&:(;"%:& 8 (<"=>( 4 :(: 84 = 8 (" 5 ( 4 & 80 ="?"$%&%'(@ + --A ) -B C )A -D  + E  D - F 4 <&(" 5 ( 43 = 9 $ 6 # 86 =%(G& 80 ="?"$%&%( 4 = 36 2%& 8 :'(H I E  -  E H +--A  D   -E + E  - D   JK"# 6 2L 94 &(% 7 $ 04 & 3 %(G& 80 ="?"$%&%( 4 = 36 2%& 8 :'(H *    D -  E D ,M







=!@/&',A./(-$, 0 #' 1 (/ 2 / 3 - #-,( 4 %5-#'& 6 ,!B  







 (^)       !"#$%&'&'"&( )%"*!"!&+%,&% & *&,&#& ,-%.&".&/&/ ,&&!-% % 0 ' -"$ 0 & 1  % 2  3 "&.$& -&!%-%-&&%&' #&%.&$%#&% '&!-  4  5 6 7 8      9 %%"%'%"/-&$"%" 2  !%%"& &  3 - -'#.&$. %.&#& %. %&,&  :; < 7= > ?""&,& &,% & / ,&+/: 1  3 - - 3 % -&!$"%"% & ,&!& &,-&% @ABCD/@&$#&,&%"&&/'"'"%!,.#&%.& &, &#&  @AEE/&$#&,&%"'%&"",%&-%$&!.#&%.& &,  FGHII@&$#&,&%"A%&"E",%&E-%$& 3 -  3 &&-&!&$/ J&",%&-%$&% %,%K-&%-,% &%- L 5  7 MN   8  O:""'&&% 3 -O 4 /""&$" 







=+> 4 ?#@"3 4 $# 5 %A  B( 1  C,: 1 

: 1  -C 

D . B ''(:  1 B ., 1  :1 B  1 1 '

 1 - 1(B  1   1 1   1 ,-  1 B .

=E$ 3 !$F 5  4 # 3 $ 45 %D : : 1 :  1 ' 1  .1

, : 1 9  1  ,, ''1   ,1G-(B 1.







 (^)       !"#"$""% "&''("!)&) &'%&)#!+&)'$!("!$&),"-).-+/)#!+)'(!,) 0  ! 0 '&),& 1 !+%&)/'&"  23  45 6 3 7 4  3 5 8  9 '/''"'& !) '&" :;  3  56 "!/"!&%!%+&!)&"'&"!& & 0  0 '!+% <= 4  3 5> ?@'A'&)"!)"& 0 &'& 'B,-# 0 -' &),,&'&"/-'"C+"-&'#-&) 0 !+,&" D!'&#E'&)"!)FG&'&- 0 )"!, )'&%,#&),-''&'$&)" "&,# H'#'&)"!)FI''&- 0 )"!&'&%,#-+,&'&""&'-!/&), , )) 0  @!"A'&)"!)"& 0 F-'&),,&'&- !$"!!"#- 0 )!&) !) &)!'!+







   0   A / B 

C 9 D$:!) 9 *"&ED *%) 9 ")"!&"F9(:'-"G 4   02  5 /

  4 / /.  H

BI )*"'()J&(" 9 K"+) 9 ')J&(%)!<": 9 %%-" 5   4 

L 0  M  N

O 4 G/ 

G  4 







 (^)   !"# $%%&'()(!+!,-,!-,,!"-.! / 0  1 ,!,-"-!#+!-,!+- 2  !-+- 2 , 3 #!!/ 0  4 # 1   5  678 & 9 * 7 :;< 9 =>)?(@A!-! 1  0 B,C!!-D ,+ 2 ",!# 1 ---,! 2 !-,-, 2  0 , 2 !#+ 2 " 2 + 1 ,+ 2  2 E, 1 ,, 1 - !- 2 ,"!,- 2 !,#+!! 2 ., 1  1 "  2  2 - E!-, 2 + ( 7 )>&>F 9 *G& 9 ))>:G@ 9 >)HE-D, 2 E-,E-I!D "# 2 "--+ 1  2 +#, 2 !",J KG? 9 @G@AE-+! 2 , 2  2  1 #-",-,,-EE 2 

  • - 2  LM 9 @)(;;-",N, 1 #,-EE 2 -- 2 --E-D 







>@#"A"B"C

- <D E'&/%( (F"")*!"#"""!"!"#

!G+!!" 2 " 2 " 2 ! 2 

- = %$&%%EE%6H"#"!"!"#*", 2 !"","

"I)!!!"#"

-   ( 1 !","#+!"#"I!",







 (^)      ! "#$$# % $&##$'$$##$(   ) * "#$$+ #!$",,"##$#, "$! $& "  ##$

  • ./ 0 1 2 0 $" " 
  •  3 030 040  50  6 $$ "##$ ##$# 7 #!# 7 !$ +!  7 !$ $"$#%$!  ,$#
  • 0 50 3 8 3 3  040  504  9 $:$+" "  ##$##$#,$ 7 #!# 7 !$ +! ! 7 #! $# 7 !$ ;+$##"$#$<
  • = 30 3 0  040  50 >? 4@!'+$##"$#$## 77 ## 7 !$  !%$#$$!# # 7 $' #$ 9 $$!#+!  7  7 $""%,
  • A0 50 3 4 8 3 3  040  50 4>? 4B! $#$+! 







<= 3 >> 3 ?>@!A( ## -# 

/B> 3 CC 00 >@!DEFG+'+ ' *$# 7 & #' 

<HC>!E- & 7 7 I  7 - 6$ $ # #G+ 

<J 1 KC> 3 CC!D , LI+'   , #()