• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Quiz for Sudo GATE 2021

Question 11

Which of the above statements are not True? Note - This question is multiple select questions (MSQ).
  • N3/2 < NlogN < NlogN < 2N
  • (logN)2 = log2N
  • logN * logN = log log N
  • N21/30 < N3 < eN < 4N

Question 12

Which of the following option is correct considering normal implementations of sorting algorithms? Note - This question is multiple select questions (MSQ).
  • Merge Sort, Insertion Sort, and Bubble sort are type of stable sorting algorithms.
  • Quick Sort, Heap Sort, Selection sort are type of non-stable sorting algorithms.
  • When the array is sorted, insertion and bubble sort gives complexity of n but quick sort gives complexity of n^2.
  • When order of input is not known, merge sort is preferred as it has worst case time complexity of nlogn and it is NOT stable as well.

Question 13

Consider the following graph and given search sequences:

Which of the following sequence(s) is/are Breadth First Sequence(s) of given graph with starting node A? Note - This question is multiple select questions (MSQ).
  • ACFBGEIDH
  • ACFGBEIDH
  • AFCEBGDIH
  • AFCEGBDIH

Question 14

The line graph L(G) of a simple graph G is defined as follows:
  • There is exactly one vertex v(e) in L(G) for each edge e in G.
  • For any two edges e and e’ in G, L(G) has an edge between v(e) and v(e’), if and only if e and e’are incident with the same vertex in G.
Which of following option(s) is/are correct about "Line Graph"? Note - This question is multiple select questions (MSQ).
  • A line graph has an articulation point if and only if the underlying graph has a bridge for which neither endpoint has degree one
  • For a graph G with n vertices and m edges, the number of vertices of the line graph L(G) is m, and the number of edges of L(G) is half the sum of the squares of the degrees of the vertices in G, m.
  • If a graph G has an Euler cycle, that is, if G is connected and has an even number of edges at each vertex, then the line graph of G is Hamiltonian.
  • None of these

Question 15

Consider the following Jobs with their deadline and profit:
Job Deadline Profit
a 2 37
b 3 50
c 1 37
d 4 60
e 3 50
f 2 80
Which of the following is/are correct profit sequence order for given jobs with respective profit and deadlines? Note - This question is multiple select questions (MSQ).
  • b, f, e, d
  • f, d, e, b
  • e, f, b, d
  • None of these

Question 16

Which of the following option is correct? Note - This question is multiple select questions (MSQ).
  • In a depth-first traversal of a graph G with V vertices, E edges are marked as tree edges. The number of connected components in G is (V - E).
  • Depth-first search requires O(V^2) time if implemented with adjacency lists
  • Queue data structure can be used to implement least recently used (LRU) page fault algorithm and Quick short algorithm.
  • If the queue is implemented with a linked list, keeping track of a front pointer, Only rear pointer s will change during an insertion into an non-empty queue.

Question 17

Consider the following list of the integer:
19, 23, 40, 32, 91, 25, 100, 36 
Sort this list in increasing order using insertion sort and determine the number of passes, comparisons, and swaps. Here a pass means iteration of main loop. We may assume that we start checking from first element which is 19 here. Note - This question is multiple select questions (MSQ).
  • There will be total 8 passes for all 8 integers
  • Number of comparisons and Swaps for each pass for given sequences to sort in increasing order are 14 and 7 respectively
  • Number of comparisons for each pass for given sequences to sort in increasing order is 7
  • Number of swaps for each pass for given sequences to sort in increasing order is 14

Question 18

Consider the following C program :
CPP
#include <stdio.h>
#include <string.h>

struct s {
    int i;
    char *c;
} str[] = {100, \"eclasses\", 200, \"geeks\",300, \"data\",400,\"structure\",500,\"students\"};

int main()
{ 
    struct s *p = str;
    p += 1;
    printf(\"%s\", p -> c);
    p--;
    printf(\"%s,\", ++p -> c);
    printf(\" %d, \", p[1].i);
    p=p+4;
    printf(\"%s\", p -> c);
} 
Which of the string(s) will be in the final output of the above C program ? Note - This question is multiple select questions (MSQ).
  • geeksclasses
  • 100
  • students
  • 200

Question 19

Consider the C program given below.
C
#include<stdio.h>
#include<string.h>
int main()
{
    char *s1[]={\"Dubai\",\"Singapore\",\"Paris\",\"Sanghai\",\"HongKong\"};
    char **s2[]={(s1+2),(s1+1),(s1+3),(s1+4),(s1+0)};
    char ***s3=s2;
    char str1[]=\"I love to visit \";
    char str2[]=\"times every year.\";
    s3++;
    printf(\"%s\",str1);
    printf(\"%s \",**++s3);
    printf(\"%d-%d \",s3-s2,*s3-s1);
    printf(\"%s\",str2);
    return  0;
}
Which of the following string(s) is/are part of output of above C program ? Note - This question is multiple select questions (MSQ).
  • Dubai
  • Sanghai
  • 2-3
  • 3-4

Question 20

Which of the following is/are correct ? Note - This question is multiple select questions (MSQ).
  • BFS is vertex-based algorithm while DFS is an edge-based algorithm.
  • Memory space is efficiently utilized in DFS while space utilization in BFS is not effective.
  • BFS is optimal algorithm while DFS is not optimal.
  • None of these

There are 55 questions to complete.

Last Updated :
Take a part in the ongoing discussion