ログイン

Data Structures and Algorithms Mocktest (Midterm) BSIT 307
50問 • 1年前
  • Xai Alexandrei Delos Reyes
  • 通報

    問題一覧

  • 1

    is an ordered list in which the first element added is the first element retrieved or removed (First-In, First-Out).

    Queue

  • 2

    The first element in the queue is known as the _____ of the queue.

    head

  • 3

    Example: A QUEUE of customers: Lisa, Jennie, Jisoo, Rose Lisa is the customer who has been waiting the longest, while Rose is the one who last arrived. Who will be the first customer removed from the queue?

    Lisa

  • 4

    The methods of the Queue interface from the _______ are used to implement queues in Java.

    java.util package

  • 5

    The methods of ___________ are used to implement queues in Python.

    collections.deque

  • 6

    The import statement for Queues in Python shall be from ________?

    collections import deque

  • 7

    It adds an item into the queue

    Enqueue

  • 8

    Syntax in Java to add an item into the queue

    offer()

  • 9

    Syntax in Python to add an item into the queue

    append()

  • 10

    Which syntax is correct in initializing a Queue in Java

    Queue queue = new LinkedList();

  • 11

    Which syntax is correct in initializing a Queue in Python?

    queue = deque([ ])

  • 12

    It removes the head of the queue

    Dequeue

  • 13

    It retrieves the head of the queue

    Peek

  • 14

    Syntax in Java to Peek

    peek()

  • 15

    Syntax in Java to Delete all elements in a Queue

    clear()

  • 16

    is an ordered list in which the last element added is the first element retrieved or removed (Last-In, First-Out).

    Stack

  • 17

    The methods of the Stack class from the _______ are used to implement queues in Java.

    java.util package

  • 18

    It adds an item to the top of the Stack.

    Push

  • 19

    Syntax in Java to add an item in top the Stack?

    push()

  • 20

    Which syntax is correct in initializing a Stack in Java

    Stack stack = new Stack();

  • 21

    Syntax in Python to add an item into the Stack

    append()

  • 22

    Which syntax is correct in initializing a Stack in Python

    stack = [ ]

  • 23

    removes an item from the top of the stack

    Pop

  • 24

    Syntax in Java to remove an item from the top of the stack

    pop()

  • 25

    Syntax in Python to remove an item into the Stack

    pop()

  • 26

    It looks at the item at the top of the stack without removing it from the stack

    Peek

  • 27

    Syntax in Java to look at the item at the top of the stack without removing it from the stack

    peek()

  • 28

    Syntax in Python to look at the item at the top of the stack without removing it from the stack

    stack_name[-1]

  • 29

    It is a string that reads the same in either direction.

    Palindrome

  • 30

    It represents a hierarchical nature of a structure in a graphical form.

    Tree

  • 31

    Trees consists of elements or _____?

    nodes

  • 32

    Which BEST exemplifies a tree

    computer's file system

  • 33

    The top of a tree is called its _____

    root

  • 34

    The links from a node to its successors are called _____?

    branches, edges, lines, or paths

  • 35

    The successors of a node are called its _____?

    child nodes

  • 36

    The predecessor of a node is called its ______?

    parent nodes

  • 37

    Nodes that have the same parent are ______

    sibling nodes

  • 38

    A node that has no child nodes is a _____ or external node.

    leaf node

  • 39

    Nodes that have children are known as ________?

    internal nodes

  • 40

    A tree within a tree is considered a ______?

    subtree

  • 41

    The _____ of a node is a measure of its distance from the root.

    level

  • 42

    The ______ of the tree is its highest level.

    depth

  • 43

    It is the number of child nodes in a subtree.

    degree

  • 44

    It is the process of visiting all the nodes in a specific order.

    Traversal

  • 45

    What type of traversal is where nodes are visited by level?

    Breadth-First or Level Order

  • 46

    What type of traversal is where nodes are visited by Left, Root, Right?

    Inorder

  • 47

    What type of traversal is where nodes are visited by Root, Left, Right?

    Preorder

  • 48

    What type of traversal is where nodes are visited by Left, Right, Root?

    Postorder

  • 49

    The JTree is a Java Swing component that displays a set of hierarchical data as an outline. It is included in the ______ package

    javax.swing

  • 50

    The Java class, ______________, is used to represent a general-purpose node in a tree data structure. It is included in the javax.swing.tree package.

    DefaultMutableTreeNode

  • The Contemporary World Mock test (Prelims)

    The Contemporary World Mock test (Prelims)

    Xai Alexandrei Delos Reyes · 58問 · 2年前

    The Contemporary World Mock test (Prelims)

    The Contemporary World Mock test (Prelims)

    58問 • 2年前
    Xai Alexandrei Delos Reyes

    Computing Mock test (Prelims)

    Computing Mock test (Prelims)

    Xai Alexandrei Delos Reyes · 67問 · 2年前

    Computing Mock test (Prelims)

    Computing Mock test (Prelims)

    67問 • 2年前
    Xai Alexandrei Delos Reyes

    Programming Mock Test (Prelims)

    Programming Mock Test (Prelims)

    Xai Alexandrei Delos Reyes · 64問 · 2年前

    Programming Mock Test (Prelims)

    Programming Mock Test (Prelims)

    64問 • 2年前
    Xai Alexandrei Delos Reyes

    Entrepreneurship Mock Test (Prelims)

    Entrepreneurship Mock Test (Prelims)

    Xai Alexandrei Delos Reyes · 23問 · 2年前

    Entrepreneurship Mock Test (Prelims)

    Entrepreneurship Mock Test (Prelims)

    23問 • 2年前
    Xai Alexandrei Delos Reyes

    Computing Mock Test (Midterms) BSIT 107

    Computing Mock Test (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 76問 · 2年前

    Computing Mock Test (Midterms) BSIT 107

    Computing Mock Test (Midterms) BSIT 107

    76問 • 2年前
    Xai Alexandrei Delos Reyes

    Math Mock Test (Prelims)

    Math Mock Test (Prelims)

    Xai Alexandrei Delos Reyes · 48問 · 2年前

    Math Mock Test (Prelims)

    Math Mock Test (Prelims)

    48問 • 2年前
    Xai Alexandrei Delos Reyes

    Programming Mock Test (Midterms) BSIT 107

    Programming Mock Test (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 52問 · 2年前

    Programming Mock Test (Midterms) BSIT 107

    Programming Mock Test (Midterms) BSIT 107

    52問 • 2年前
    Xai Alexandrei Delos Reyes

    UTS Mock Test (Midterms) BSIT107

    UTS Mock Test (Midterms) BSIT107

    Xai Alexandrei Delos Reyes · 40問 · 2年前

    UTS Mock Test (Midterms) BSIT107

    UTS Mock Test (Midterms) BSIT107

    40問 • 2年前
    Xai Alexandrei Delos Reyes

    Entrepreneurship Mock Test (Midterms) BSIT 107

    Entrepreneurship Mock Test (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 38問 · 2年前

    Entrepreneurship Mock Test (Midterms) BSIT 107

    Entrepreneurship Mock Test (Midterms) BSIT 107

    38問 • 2年前
    Xai Alexandrei Delos Reyes

    Contemporary World Mock Test (Midterms) BSIT 107

    Contemporary World Mock Test (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 28問 · 2年前

    Contemporary World Mock Test (Midterms) BSIT 107

    Contemporary World Mock Test (Midterms) BSIT 107

    28問 • 2年前
    Xai Alexandrei Delos Reyes

    Math Mocktest (Midterms) BSIT 107

    Math Mocktest (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 24問 · 2年前

    Math Mocktest (Midterms) BSIT 107

    Math Mocktest (Midterms) BSIT 107

    24問 • 2年前
    Xai Alexandrei Delos Reyes

    Computer Programming Mocktest (Pre-finals)

    Computer Programming Mocktest (Pre-finals)

    Xai Alexandrei Delos Reyes · 26問 · 2年前

    Computer Programming Mocktest (Pre-finals)

    Computer Programming Mocktest (Pre-finals)

    26問 • 2年前
    Xai Alexandrei Delos Reyes

    Math Mocktest (Pre-Finals)

    Math Mocktest (Pre-Finals)

    Xai Alexandrei Delos Reyes · 19問 · 2年前

    Math Mocktest (Pre-Finals)

    Math Mocktest (Pre-Finals)

    19問 • 2年前
    Xai Alexandrei Delos Reyes

    Computing Mock Test (Pre-finals)

    Computing Mock Test (Pre-finals)

    Xai Alexandrei Delos Reyes · 36問 · 2年前

    Computing Mock Test (Pre-finals)

    Computing Mock Test (Pre-finals)

    36問 • 2年前
    Xai Alexandrei Delos Reyes

    Computing Mock Test Finals

    Computing Mock Test Finals

    Xai Alexandrei Delos Reyes · 26問 · 2年前

    Computing Mock Test Finals

    Computing Mock Test Finals

    26問 • 2年前
    Xai Alexandrei Delos Reyes

    Comprog 2nd sem (prelims) BSIT 205

    Comprog 2nd sem (prelims) BSIT 205

    Xai Alexandrei Delos Reyes · 63問 · 1年前

    Comprog 2nd sem (prelims) BSIT 205

    Comprog 2nd sem (prelims) BSIT 205

    63問 • 1年前
    Xai Alexandrei Delos Reyes

    Discrete Math 2nd sem (prelims) BSIT 205

    Discrete Math 2nd sem (prelims) BSIT 205

    Xai Alexandrei Delos Reyes · 36問 · 1年前

    Discrete Math 2nd sem (prelims) BSIT 205

    Discrete Math 2nd sem (prelims) BSIT 205

    36問 • 1年前
    Xai Alexandrei Delos Reyes

    Art Appreciation (Prelim) BSIT 205

    Art Appreciation (Prelim) BSIT 205

    Xai Alexandrei Delos Reyes · 56問 · 1年前

    Art Appreciation (Prelim) BSIT 205

    Art Appreciation (Prelim) BSIT 205

    56問 • 1年前
    Xai Alexandrei Delos Reyes

    Ethics 2nd sem (Prelims) BSIT 205

    Ethics 2nd sem (Prelims) BSIT 205

    Xai Alexandrei Delos Reyes · 45問 · 1年前

    Ethics 2nd sem (Prelims) BSIT 205

    Ethics 2nd sem (Prelims) BSIT 205

    45問 • 1年前
    Xai Alexandrei Delos Reyes

    STS 2nd Sem (Prelim) BSIT 205

    STS 2nd Sem (Prelim) BSIT 205

    Xai Alexandrei Delos Reyes · 40問 · 1年前

    STS 2nd Sem (Prelim) BSIT 205

    STS 2nd Sem (Prelim) BSIT 205

    40問 • 1年前
    Xai Alexandrei Delos Reyes

    問題一覧

  • 1

    is an ordered list in which the first element added is the first element retrieved or removed (First-In, First-Out).

    Queue

  • 2

    The first element in the queue is known as the _____ of the queue.

    head

  • 3

    Example: A QUEUE of customers: Lisa, Jennie, Jisoo, Rose Lisa is the customer who has been waiting the longest, while Rose is the one who last arrived. Who will be the first customer removed from the queue?

    Lisa

  • 4

    The methods of the Queue interface from the _______ are used to implement queues in Java.

    java.util package

  • 5

    The methods of ___________ are used to implement queues in Python.

    collections.deque

  • 6

    The import statement for Queues in Python shall be from ________?

    collections import deque

  • 7

    It adds an item into the queue

    Enqueue

  • 8

    Syntax in Java to add an item into the queue

    offer()

  • 9

    Syntax in Python to add an item into the queue

    append()

  • 10

    Which syntax is correct in initializing a Queue in Java

    Queue queue = new LinkedList();

  • 11

    Which syntax is correct in initializing a Queue in Python?

    queue = deque([ ])

  • 12

    It removes the head of the queue

    Dequeue

  • 13

    It retrieves the head of the queue

    Peek

  • 14

    Syntax in Java to Peek

    peek()

  • 15

    Syntax in Java to Delete all elements in a Queue

    clear()

  • 16

    is an ordered list in which the last element added is the first element retrieved or removed (Last-In, First-Out).

    Stack

  • 17

    The methods of the Stack class from the _______ are used to implement queues in Java.

    java.util package

  • 18

    It adds an item to the top of the Stack.

    Push

  • 19

    Syntax in Java to add an item in top the Stack?

    push()

  • 20

    Which syntax is correct in initializing a Stack in Java

    Stack stack = new Stack();

  • 21

    Syntax in Python to add an item into the Stack

    append()

  • 22

    Which syntax is correct in initializing a Stack in Python

    stack = [ ]

  • 23

    removes an item from the top of the stack

    Pop

  • 24

    Syntax in Java to remove an item from the top of the stack

    pop()

  • 25

    Syntax in Python to remove an item into the Stack

    pop()

  • 26

    It looks at the item at the top of the stack without removing it from the stack

    Peek

  • 27

    Syntax in Java to look at the item at the top of the stack without removing it from the stack

    peek()

  • 28

    Syntax in Python to look at the item at the top of the stack without removing it from the stack

    stack_name[-1]

  • 29

    It is a string that reads the same in either direction.

    Palindrome

  • 30

    It represents a hierarchical nature of a structure in a graphical form.

    Tree

  • 31

    Trees consists of elements or _____?

    nodes

  • 32

    Which BEST exemplifies a tree

    computer's file system

  • 33

    The top of a tree is called its _____

    root

  • 34

    The links from a node to its successors are called _____?

    branches, edges, lines, or paths

  • 35

    The successors of a node are called its _____?

    child nodes

  • 36

    The predecessor of a node is called its ______?

    parent nodes

  • 37

    Nodes that have the same parent are ______

    sibling nodes

  • 38

    A node that has no child nodes is a _____ or external node.

    leaf node

  • 39

    Nodes that have children are known as ________?

    internal nodes

  • 40

    A tree within a tree is considered a ______?

    subtree

  • 41

    The _____ of a node is a measure of its distance from the root.

    level

  • 42

    The ______ of the tree is its highest level.

    depth

  • 43

    It is the number of child nodes in a subtree.

    degree

  • 44

    It is the process of visiting all the nodes in a specific order.

    Traversal

  • 45

    What type of traversal is where nodes are visited by level?

    Breadth-First or Level Order

  • 46

    What type of traversal is where nodes are visited by Left, Root, Right?

    Inorder

  • 47

    What type of traversal is where nodes are visited by Root, Left, Right?

    Preorder

  • 48

    What type of traversal is where nodes are visited by Left, Right, Root?

    Postorder

  • 49

    The JTree is a Java Swing component that displays a set of hierarchical data as an outline. It is included in the ______ package

    javax.swing

  • 50

    The Java class, ______________, is used to represent a general-purpose node in a tree data structure. It is included in the javax.swing.tree package.

    DefaultMutableTreeNode