About

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/

Role

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

Experience:

Intern
EMC Corporation
2016
ASE
EMC Corporation
2016
TudLead
Example text
1 year 10 months ago

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

It is very trivial if you know the complexity concepts.

n=O(nlogn)

moreless
TudLead
Answer
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; }

moreless
TudLead
Answer
1 year 10 months ago

Tricky problem.

Please search for Fork() bomb.

moreless
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
905
Rajeev
914
priyesh's picture
Priyesh Priyatam
923
Himanshi
976
mnlcht's picture
jhilik
979
pshall's picture
shailendra joshi
998
maheshkumars's picture
Mahesh Kumar
1017
chandanchawda's picture
Chandan Chawda
1019
kaushalmaurya's picture
kaushal
1022
shabinmuhammed's picture
Shabin Muhammed
1065
tar_gate's picture
TarGate
1165
vineetkumar's picture
vineet
1238
rahulkumar's picture
Rahul Kumar
1246
kalpishsinghal's picture
Kalpish Singhal
1474
targetgate's picture
Target Gate
1518

Pages

This is GATE 2014 Question.

To get better answers, please write appropriate title telling something about the your problem, not just one word.

"Explain", "Binary Tree", "Doubt", "problem"  and similar others are bad ways to ask questions. No one will know what is your question about, by just seeing the title.

Not just title, please search for GATE questions on Techtud first. It will save your energy and time and avoid duplication of efforts.

How about : " Number of Subtrees in Binary Tree. Time complexity : GATE 2014 "? or you can skip "GATE 2014" Part if you are not aware about it. But write a proper and good title of question.

more less
26 Jan 2016 - 12:46pm

In the case of Binary Search tree in order traversal, elements will be in increasing order. But the questions does not say anything about the nature of the tree. 

more less
25 Jan 2016 - 11:17pm

You are correct @luckysunda . 

more less

Let me name the loops as loop1 being outermost,loop2 being middle loop and loop3 being innermost loop.

1) loop1 will run at most (n/2) times ,which is Θ(n) , increasing linearily.

2) for each time of loop1, loop2 will run (n/4) times, increasing linearily ,which is Θ(n) . So total running time of program ,considering loop1 and loop2 is Θ(n) * Θ(n) = Θ(n2) .

3) Now for each iteration of Θ(n2, loop3 will be running log(n)  times, as loop variable is getting increased not linearly but exponentially. 

For simplicity, if n=1000, and k=2( k=1 can be ignored), k will be equal to n in 10 iterations which is log(1000).

So total running time complexity of this program will be Θ(n2) * Θ(log(n)) =  Θ(n2logn).

Links given below are good resources to understand the time complexity analysis

http://www.techtud.com/resource-share/time-complexity-notes-univ-wisc

http://www.techtud.com/resource-share/harvard-loop-time-complexity

http://www.techtud.com/resource-share/geeksforgeeks-time-complexity-analysis

 

more less
11 Jan 2016 - 10:37pm

This is my blog post about my PGEE 2014 Admission and I think this should clear most of your doubts: 

https://vivekvsingh14.wordpress.com/2014/07/17/international-institute-of-information-technology-hyderabad-iiith-pgee-2014-written-and-interview-experience/

more less
31 Dec 2015 - 11:53pm

You are confusing two different things.

When we talk about Virtual Memory,which is an Operating System concept, we talk about Page and Frame. They are about Memory address translation of a process space(disk) to Main memory.

When we talk about Memory organization in Computer Organization, We refer to terms Block and cache Line. We talk about transfer of data between Memory and Processor.

more less
23 Dec 2015 - 1:45pm

Answer to this question is pretty intuitive. Let me give you a simple way to find out correct path for serching a node in BST.

All the numbers smaller than Key should be in increasing order and larger number should be in Decreasing order.

For explanation, see the question given in the link : http://www.techtud.com/doubt/number-possible-paths-when-searching-key-binary-search-tree 

more less

Good question. These kind of question test not just the knowledge of Data Structures but Discrete Maths and problem solving.

Now coming back to question, think, if we are searching for value 60 and we are at number X which is less than 60 then we will go to right only (assuming the notion of BST with right child having larger values) and we will never see the number less than X. So in this way numbers less than X must be in increasing order. In this case it should be 10,20,40,50.

Similar way, if we are at number Y which is bigger than 60, then we go left and will never see the value less bigger than . In this way,numbers greater than must be there in search path in decreasing order. In this case it is 90,80,70.

Note that these sequences can be interfered i.e. 10,20,30,40,50,90,80,70 and 10,90,20,30,80,70,40,50,both are valid BST traversal.

Now the problem reduces to pick the positions of larger numbers( or smaller numbers) than 60 out of all positions in search order.

So the answer is \(\dbinom{7}{3}\) i.e. 35.

more less
30 Nov 2015 - 6:58pm

These are best explained in Kurose and Ross book of Computer Networking.Please go through it once.

more less

Pages