Шукаєте відповіді та рішення тестів для Data Structures and Algorithms? Перегляньте нашу велику колекцію перевірених відповідей для Data Structures and Algorithms в moodle.lnmiit.ac.in.
Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!
What is the output of the following program?
struct node
{
int data;
struct node *next;
};
main()
{
struct node N1, N2, N3;
N1.data = 1; N2.data = 10; N3.data = 100;
N1.next = &N2; N2.next = &N3; N3.next = &N1;
printf("%d, %d", N2.next -> data, N2.next -> next -> data);
}
What are the postfix equivalents of the given infix expressions: A*(B+D)/E –F *(G + H/K)
Consider a singly circular linked list with a maintaining Tail pointer; follow these steps as given below:
1. Create a node: NewNode
2. NewNode -> next = Tail -> next
3. Tail -> next = NewNode
4. Tail = NewNode
Using the above steps, predict what will be the correct operation with time complexity:
Consider a stack is implemented using array A of size N. The pseudocode for Push() and Pop() operations are given below, where the top points to the top element of the stack.
Condition for stack empty is:
Consider the following postfix expression: 5, 6, 2, +, *, 12, 4, /, –.
What is the evaluated output of the above expression using stack?
Which of the following permutations can be obtained in the same order using stack, assuming that the input sequence is given as E, F, G, H, I:
push(24), push(22), a=pop(), push(25), push(32), pop( ), b=pop().
Here, push() and pop() represent the push and pop operation of the stack, and ‘a’, and ‘b’ are two variables.
What will be the value of |a – b|?