Railroad diagrams, also known as syntax diagrams, are a visual way to represent the grammar of a programming language. To use it, you...
Search Results
Searching for: multiple choice
Individual Exercises
How many times does the loop execute? That is, how many times is hello()
called?
for(;;) hello(); }
How many times does the loop execute? That is, how many times is hello()
called?
for (int i = 0; i < 5; i++) hello(); }
How many times does the loop execute? That is, how many times is hello()
called?
for (int i = 0; i <= 5; i++) hello(); }
How many times does the code below calls greetings()
?
for (int i = 0; i < 10; i++) hello(); greetings(); }
What is the root node of the tree shown here?
How many internal nodes there are in the tree shown here?
What is the depth of the tree shown here?
Select all of the nodes that are children of node 10 in the binary tree shown here.
What type of binary tree is this?
What is the depth of the tree shown here?
How many nodes are at level 3 in this tree?
Parenthesized notation
A binary tree can be represented in parenthesized notation. The image below shows an example of how to represent...
Parenthesized notation
A binary tree can be represented in parenthesized notation. The image below shows an example of how to represent...
Parenthesized notation
A binary tree can be represented in parenthesized notation. The image below shows an example of how to represent...
Parenthesized notation
A binary tree can be represented in parenthesized notation. The image below shows an example of how to represent...
Parenthesized notation
A binary tree can be represented in parenthesized notation. The image below shows an example of how to represent...
Parenthesized notation
A binary tree can be represented in parenthesized notation. The image below shows an example of how to represent...
Given an integer num
, return the sum of the multiples of num
between 1 and 100. For example, if num
is 20, the returned value should be...
Given two integers size
and num
, return an array that can hold size
integers and is filled with multiples of num
, starting with num
. For...
Surround the appropriate lines of code with a try catch block so that first, an exception is caught when the String index is out of...
Complete the code so that the variable polarity is -1 when adding first and second is negative, but polarity is 1 when adding first and...
You wrote the following statements when first learning about Jeroo
methods--they move the Jeroo
forward 3 steps. Now that you've found...