Posted at 03:53h
in
Uncategorized
by admin
Question:
A number of K balls are dropped one by one from the root of a fully binary tree structure FBT. Each time the ball being dropped first visits a non-terminal node. It then keeps moving down, either follows the path of the left subtree, or...
Question:(You could use stack to solve the problem)
Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary. However, the number of elementary multiplications needed strongly depends...
Posted at 03:35h
in
Uncategorized
by admin
Question:
In the previous class, we wrote the code to display the image on the screen. We also modified the code to move the image to the right. The code for displaying the image is as below. Modify the below code, to bounce the image in...
Posted at 03:24h
in
Uncategorized
by admin
Question:
The computer file system keeps a log each time some user performs a change folder operation.
The operations are described below:
"../" : Move to the parent folder of the current folder. (If you are already in the main folder, remain in the same folder).
"./"...
Question:
Create a Time class with two properties called hours and minutes
The constructor method, Time(hours, minutes) will create an Time object and initialize it with hours and minutes.
The method addTime(hours, minutes) which should add the arguments hours and minutes to the properties of the Time class.
The...
Posted at 04:06h
in
Uncategorized
by admin
Question:
You’re typing a long text with a broken keyboard. Well it’s not so badly broken. The only problem with the keyboard is that sometimes the “home” key or the “end” key gets automatically pressed (internally).
You’re not aware of this issue, since you’re focusing on the...