Skip to content
All Medium Articles
Assume that the size of int is 4. #include <stdio.h> void f(char**); int main() {     char *argv[] = { "ab", "cd", "ef", "gh", "ij", "kl"… Read More
#include<stdio.h> int main() {     int a[10][20][30] = {0};     a[5][2][1] = 2;     return 0; } Which of the following will print the value 2 for the… Read More
The binary operation c is defined as follows P Q PcQ T T T T F T F T F F F T Which one… Read More
For the composition table of a cyclic group shown below * a b c d a a b c d b b a d c… Read More
S -> aSa|bSb|a|b; The language generated by the above grammar over the alphabet {a,b} is the set of (A) All palindromes (B) All odd length… Read More
What is the chromatic number of an n-vertex simple connected graph which does not contain any odd length cycle? Assume n >= 2. (A) 2… Read More
Output of following Java program? import java.util.Arrays; class Test {     public static void main (String[] args)      {         int arr1[] = {1, 2, 3};         int arr2[]… Read More
Output of following C program? #include<stdio.h> #define max abc #define abc 100    int main() {     printf("maximum is %d", max);     return 0; } (A) maximum… Read More
It is recommended to refer following post as prerequisite of this post.Splay Tree | Set 1 (Search)As discussed in the previous post, Splay tree is… Read More
The worst case time complexity of Binary Search Tree (BST) operations like search, delete, insert is O(n). The worst case occurs when the tree is… Read More
Which of the following is/are true about constructors in Java? 1) Constructor name should be same as class name. 2) If you don't define a… Read More
class Test {    public static void main(String args[]) {      int arr[2];        System.out.println(arr[0]);      System.out.println(arr[1]);    } } (A) 0 0 (B) garbage value garbage value (C) Compiler… Read More
Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot.… Read More
  This article introduces the concept of polymorphism and virtual functions, and their use in inheritance. We’ll cover the following Definitions Without Virtual Functions Using… Read More
Can destructors be virtual in C++? (A) Yes (B) No Answer: (A) Explanation: See of this Question My Personal Notes arrow_drop_up Save
Predict the output of following C++ program #include<iostream> using namespace std;    class Base { public:     virtual void show() { cout<<" In Base \n"; }… Read More
Pattern: written + 3 Tech Interview + 1HR Type: Online cgpa criteria: NO Written exam Modules: 2hrs (no -ve marking) 1. Coding skills(comprehension oriented) 2.… Read More
The problem is to print all the possible paths from top left to bottom right of a mXn matrix with the constraints that from each… Read More
Given a positive integer n, generate all possible unique ways to represent n as sum of positive integers.  Examples:  Input: n = 2 Output: 2… Read More
Question 1: Given a directed weighted graph. You are also given the shortest path from a source vertex ‘s’ to a destination vertex ‘t’.  If… Read More