Let w be any string of length n is {0,1}*. Let L be the set of all substrings of w. What is the minimum number… Read More
Consider the languages L1 = {0i1j | i != j}. L2 = {0i1j | i = j}. L3 = {0i1j | i = 2j+1}. L4… Read More
Let L={w \in (0 + 1)*|w has even number of 1s}, i.e. L is the set of all bit strings with even number of 1s.… 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
Hello everyone, I recently got selected for the internship at Microsoft IDC. GeeksForGeeks helped me a lot in preparing for the coding tests as well… Read More
Given a Binary tree and a key in the binary tree, find the node right to the given key. If there is no node on… Read More
The grammar S → aSa | bS | c is (A) LL(1) but not LR(1) (B) LR(1)but not LR(1) (C) Both LL(1)and LR(1) (D) Neither… Read More
The program below uses six temporary variables a, b, c, d, e, f. a = 1 b = 10 c = 20 d = a+b… Read More
The following C function takes a simply-linked list as input argument. It modifies the list by moving the last element to the front of the… Read More
#include<stdio.h> int f(int *a, int n) {   if(n <= 0) return 0;   else if(*a % 2 == 0) return *a + f(a+1, n-1);   else return… Read More
My on campus interview experience of Oracle Server Technology. Online Round: At first we had an online exam for shortlisting for final interview process. This… 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
The weight of a sequence a0, a1, …, an-1 of real numbers is defined as a0+a1/2+…+ aa-1/2n-1. A subsequence of a sequence is obtained by deleting… Read More
A 5-stage pipelined processor has Instruction Fetch(IF),Instruction Decode(ID),Operand Fetch(OF),Perform Operation(PO)and Write Operand(WO)stages.The IF,ID,OF and WO stages take 1 clock cycle each for any instruction.The PO… Read More
In the sequential circuit shown below,if the initial value of the output Q1Q0 is 00,what are the next four values of Q1Q0? (A) 11, 10,… Read More