What is the chromatic number of the complement of the line graph of a bipartite graph?
Which of the following is a programming planning tool?
Can a linked list be implemented using arrays?
What is the correct relationship between the greatest common divisor (gcd) and the least common multiple (lcm) of two integers m and n?
Which algorithm is implemented by constructing a tree of choices called the state-space tree?
In a situation where swap operations are very costly, which sorting algorithm should be preferred to minimize the number of swap operations?
When total memory requirements exceed physical memory,
Belady's anomaly states that
Consider a complete binary tree with 7 nodes. Let A denote the set of first 3 elements obtained by performing Breadth-First Search (BFS) starting from the root. Let B denote the set of first 3 elements obtained by performing Depth-First Search (DFS) starting from the root. The value of ∣A−B∣ is
Complete the following program to find the smallest prime factor for a given range [1,N]:
(spf of a number n refers to the smallest prime factor of n, example spf of even numbers is 2)
int spf[N+1]; for(int i=1;i<=N;i++) { spf[i]=i; } for(int i=2;i<=N;i++) { if(spf[i]==(1)) { for(int j=2*i;j<=N;j+=i) { if(spf[j]==(2)) spf[j]=(3); } } }
Find the values of 1,2 and 3: