This is Vivek Vikram Singh. Currently pursuing Master Of Engineering in Computer Science stream from BITS, Pilani. I strongly believe in contribution-based education and helping out fellow/upcoming graduates with the experience I have. I have shared my written and interview experience in various known institutes/ PSUs for my M.Tech. admission in 2014 Find me on my blog at: https://vivekvsingh14.wordpress.com/


Alma Mater:

Master of Engineering
Birla Institute of Technology and Science, Pilani
2014 to 2016
Bachelor of Engineering
Bansal Institute of Science and Technology, Bhopal
2009 to 2013


EMC Corporation
EMC Corporation
Example text
1 year 10 months ago

A = O(nlogn), B= O(n)

It is very trivial if you know the complexity concepts.


1 year 10 months ago

#include #include int main() { int i; for (i=0; i<3; i++) { pid_t pid = fork(); if (pid == 0) printf("parent:[%d] current:[%d] i=%d\n", getppid(), getpid(), i); else printf("FORK Failed for current: %d\n", getpid()); printf("*\n"); } printf("HI \n"); return 0; }

1 year 10 months ago

Tricky problem.

Please search for Fork() bomb.

narayanapot's picture
Lakshminarayana Potukuchi
virtualgate's picture
Virtual GATE
priyesh's picture
Priyesh Priyatam
ranita's picture
Ranita Biswas
pritam's picture
Pritam Prasun
pritam's picture
Pritam Prasun
priyesh's picture
Priyesh Priyatam
mnlcht's picture
pshall's picture
shailendra joshi
maheshkumars's picture
Mahesh Kumar
chandanchawda's picture
Chandan Chawda
kaushalmaurya's picture
shabinmuhammed's picture
Shabin Muhammed
tar_gate's picture
vineetkumar's picture
rahulkumar's picture
Rahul Kumar
kalpishsinghal's picture
Kalpish Singhal
targetgate's picture
Target Gate


29 Oct 2015 - 9:15pm

If you want a complete and best learning experience, I suggest you to go for a book called C++ Primer Plus.Link to it is here :  http://www.flipkart.com/c-primer-plus-english-6/p/itme3gyu82vhnfjz

more less


This link might be helpful to you.

Addition to this, please go through Galvin book. It has good and lucid explanation.

more less

The essence of such question is to take candidate's time and try all options and as Pritam said, it is not good idea to guess the answer. The best you can do it to try it in left time. But try it fully, no guessing at all.

more less

Segmentation fault while running. Range of valid indices will be a[0] to a[9], and you are accessing a[12] which is invalid for this program.

more less

Suppose that R is a relation with two attributes : R(A,B)

Possible FDs  set:{ A->B} or { B->A} or { A->B,B->A}. In all these cases, Determinant (Left hand side attribute) is the key,which is necessary and sufficient condition for BCNF.

more less
14 Sep 2015 - 12:19am

You have not posted the question Priyanka. It is impossible for us to solve question,without knowing it.

more less

You will create formula at the time of exams also, if you really know the concept.Let me give you a hint. This problem can be solved using Concept of Node structure of B+ Tree,leaf and non leaf.

One more thing, Please write the title of question carefully telling about topic with which the question is related to. It wil be easy to relate and answer the question by looking at the title.

more less
6 Sep 2015 - 8:05pm

You need to specify your problem clearly.

Are you asking about general tree, binary tree and binary search tree? Asking questions clearly at Techtud and other places will get you good answers .

I assume you meant binary search tree, and of course, it is always labeled.

with N=1, Number of trees  = 1.

N=2 , number of trees =2 .

N=3,nodes being 4,5,6. You should see that intuitively, making one node as root, for rest of others you will see. number of tree are previously computed.

Example, choose node 4 as root. As you know 5 and 6  will in left of 4 and with two nodes, 2 tree can be built with different order as previously seen.

Choose node 5 as root. 4 will be in left and 6 will be in right . With 1 node, only 1 tree can be built. Only 1 tree all alone with root as 5.

Choose 6 as root. 4 and 5 will on left of 6. and with 2 nodes , 2 trees can be built with different order.

 In this way, total 5 tree can be built with 3 nodes.

See picture:

This answer was to provide you intuitive way to think.

The formula for it will be , n =number of nodes , = \(\dbinom {2n} {n} / (n+1)\)    known as Catalan number.

Now if someone asks you , given nodes 1 to 6, what is the number of BSTs with 5 being its root?

You can simply use the above intuitive method to partition the nodes into left and right subtrees and answer this.

Answer will be . 1,2,3,4 will be at left so number of trees will be 14. and 6 will be in right so number of trees will be 1. Cumulatively it will be 14 * 1 = 14 trees with 5 being root node.

I hope this helps.

more less