To be honest I feel like it’s B that’s looks and seems the most correct to me
Answer:
6
Explanation:
The int functions founds down to the nearest whole number, which in this case would be 6.
Answer:
Giving that: The following is a sequence of undo-log records written by 2 transactions T and U:
< START T >;
< T,A,10 >;
< START U >;
< U, B, 20 >;
< T, C, 30 >;
< U, D, 40 >;
< Commit U >;
< T, E, 50 >;
< Commit T >;
1. < START U >
Recovery action in this case will be undo(-1) and undo(0). All restored to its original Value
log records < T, A, 10 >, < T, abort >; as written out
2. < T, E, 50 >
Recovery action in this case will be undo(8) and redo(0). A and C is restored to its original value, B and D are set to 20 and 40
log records <T, C, 30 >, < T, A, 10 >, < T, abort > are written out
3. < Commit T >
Recovery action in this case will be redo(7) and redo(4). A and C are set to 10 and 30, B and D are set to 20 and 40
Answer:
If all the character pairs match after processing both strings, one string in stack and the other in queue, then this means one string is the reverse of the other.
Explanation:
Lets take an example of two strings abc and cba which are reverse of each other.
string1 = abc
string2 = cba
Now push the characters of string1 in stack. Stack is a LIFO (last in first out) data structure which means the character pushed in the last in stack is popped first.
Push abc each character on a stack in the following order.
c
b
a
Now add each character of string2 in queue. Queue is a FIFO (first in first out) data structure which means the character inserted first is removed first.
Insert cba each character on a stack in the following order.
a b c
First c is added to queue then b and then a.
Now lets pop one character from the stack and remove one character from queue and compare each pair of characters of both the strings to each other.
First from stack c is popped as per LIFO and c is removed from queue as per FIFO. Then these two characters are compared. They both match
c=c. Next b is popped from stack and b is removed from queue and these characters match too. At the end a is popped from the stack and a is removed from queue and they both are compared. They too match which shows that string1 and string2 which are reverse of each other are matched.