GATE Overflow - Recent questions tagged divide-and-conquer
http://gateoverflow.in/tag/divide-and-conquer
Powered by Question2AnswerDivide and conquer
http://gateoverflow.in/116863/divide-and-conquer
<p><img alt="" src="http://gateoverflow.in/?qa=blob&qa_blobid=7943001960008370790"></p>
<p><strong>Reply with solution @Arjun sir,@habibkhan,@vijaycs</strong></p>Algorithmshttp://gateoverflow.in/116863/divide-and-conquerTue, 07 Feb 2017 07:45:15 +0000divide and conquer
http://gateoverflow.in/85769/divide-and-conquer
Consider an array containing ānā elements. The elements present in an array are in arithmetic progression, but one element is missing in that order. What is the time complexity to find the position of the missing element using divide and conquer?Algorithmshttp://gateoverflow.in/85769/divide-and-conquerFri, 25 Nov 2016 03:19:03 +0000Divide and conquer+Dynamic
http://gateoverflow.in/72538/divide-and-conquer-dynamic
<p><img alt="Loading Question" src="https://d2190hpfa85jkd.cloudfront.net/q/b447cbf84ec3a8edd819eeb39fc6523f.jpg"></p>Algorithmshttp://gateoverflow.in/72538/divide-and-conquer-dynamicSat, 08 Oct 2016 11:39:29 +0000CMI2013-B-04
http://gateoverflow.in/46614/cmi2013-b-04
You are given two sorted lists of integers of size $m$ and $n$. Describe a divide and conquer algorithm for computing the $k$-th smallest element in the union of the two lists in time $O(\log m + \log n)$.Algorithmshttp://gateoverflow.in/46614/cmi2013-b-04Mon, 23 May 2016 09:07:38 +0000CMI2012-B-04
http://gateoverflow.in/46567/cmi2012-b-04
<p>You have an array $A$ with $n$ objects, some of which are identical. You can check if two objects are equal but you cannot compare them in any other way—i.e. you can check <span style="white-space: pre-wrap; line-height: 1.6;">A[i] == A[j] </span><span style="line-height: 1.6;">and </span><span style="white-space: pre-wrap; line-height: 1.6;">A[i] != A[j]</span><span style="white-space: pre-wrap; line-height: 1.6;">, but comparisons such as $A[i] < A[j]$ are not meaningful. (Imagine that the objects are JPEG images.) The array A is said to have a majority element if strictly more than half of its elements are equal to each other. Use divide and conquer to come up with an $O(n \log n)$ algorithm to determine if $A$ has a majority element.</span></p>
<p> </p>
Algorithmshttp://gateoverflow.in/46567/cmi2012-b-04Mon, 23 May 2016 03:40:44 +0000ISICAL MTech 2014 CS
http://gateoverflow.in/27885/isical-mtech-2014-cs
<p>How many asterisks $(*)$ in terms of $k$ will be printed by the following C function, when called as $\text{count}(m)$ where $m = 3^k$ ? Justify your answer.</p>
<p>Assume that $4$ bytes are used to store an integer in C and $k$ is such that $3^k$ can be stored in $4$ bytes.</p>
<pre class="prettyprint lang-c_cpp">
void count(int n){
printf("*");
if(n>1){
count(n/3);
count(n/3);
count(n/3);
}
}</pre>
Programminghttp://gateoverflow.in/27885/isical-mtech-2014-csMon, 23 Nov 2015 13:03:01 +0000