You are on page 1of 35

No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in

any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020

LYCEUM OF APARRI

College of Information and Computing Sciences


Macanaya Aparri, Cagayan, 3515

Data Structures and Algorithm


No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
LEARNING ACTIVITY 1
Determine/solve the frequency count of the given program
1. X=5
Y = 10
Sum = x + y
Print d (sum);
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
Learning Activity 2
Determine/Solve for the frequency count of the given program
1.
k = 500
for (j=1; j<=k; j++)
x = x + 1;
n = 200;

2. For (k=1; k<=n+1; k++)


{
printf(“%d”, k)͖
printf(“%d”, n-k);
}
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
Learning Activity 3
Determine/Solve for the frequency count of the given program
If (x>2)
{
x++;
printf(“%d”, x)͖
}
else
{
for (i=0;i<n; i++);
printf (“%d”, i);
}
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
No portion of this module may be copied or reproduced, mimeographed, typewritten, photocopied or in
any form - for distribution, without the written permission of the school. The infringer shall be
prosecuted in compliance with copyright, trademark and other pertinent laws. ©
LOA-CICS 2020
Learning Activity 4

You might also like