Struktur Data

Nama        : Dendi Pradana
Nim           : 1117101510
Kelompok : 02

SCRIPT : 

<html>
        <head>
            <title>Belajar Javascript : pop </title>
        </head>
        <body >
            <script>
var jumlah =["6","5","4","1","5","3","2","3","5"]
document.write(jumlah);
document.write("<br>");
jumlah.pop();
document.write(jumlah);
document.write("<br>");
jumlah.pop();
document.write(jumlah);
document.write("<br>");
jumlah.pop();
document.write(jumlah);
document.write("<br>");
jumlah.pop();
document.write(jumlah);
document.write("<br>");
jumlah.pop();
document.write(jumlah);
document.write("<br>");
jumlah.pop();
document.write(jumlah);
document.write("<br>");
jumlah.pop();
document.write(jumlah);
document.write("<br>");
jumlah.pop();
document.write(jumlah);
</script>
        </body>
    </html>

DIAGRAM :


1
2
3
4
5
6
7
8
Max_Stack  = 8

6
5
4
1
3
2
3
5
Top_Stack   = 7

0
1
2
3
4
5
6
7
IsEmpty       = F









IsFull             = T

















1
2
3
4
5
6
7
8
Max_Stack   = 8

6
5
4
1
3
2
3

Top_Stack    = 6

0
1
2
3
4
5
6
7
IsEmpty         = F

IsFull              = F




1
2
3
4
5
6
7
8
Max_Stack   = 8

6
5
4
1
3
2


Top_Stack    = 5

0
1
2
3
4
5
6
7
IsEmpty         = F

IsFull              = F











1
2
3
4
5
6
7
8
Max_Stack   = 8

6
5
4
1
3



Top_Stack    = 4

0
1
2
3
4
5
6
7
IsEmpty        = F

IsFull              = F











1
2
3
4
5
6
7
8
Max_Stack   = 8

6
5
4
1




Top_Stack    = 3

0
1
2
3
4
5
6
7
IsEmpty        = F

IsFull              = F











1
2
3
4
5
6
7
8
Max_Stack   = 8

6
5
4





Top_Stack    = 2

0
1
2
3
4
5
6
7
IsEmpty        = F

IsFull              = F











1
2
3
4
5
6
7
8
Max_Stack   = 8

6
5






Top_Stack    = 1

0
1
2
3
4
5
6
7
IsEmpty        = F

IsFull              = F











1
2
3
4
5
6
7
8
Max_Stack   = 8
6







Top_Stack    = 0
0
1
2
3
4
5
6
7
IsEmpty         = F
IsFull              = F










1
2
3
4
5
6
7
8
Max_Stack   = 8








Top_Stack    = -1
0
1
2
3
4
5
6
7
IsEmpty         = T








IsFull              = F

HASIL :



Komentar

Postingan populer dari blog ini

Tugas Struktur Data 3

Tugas UTS Struktur Data