42, 49
2011/6/10 • » νιρυℓ « • vipulmehta.1...@gmail.com
42, 47
just guessing according to the pattern.
On Fri, Jun 10, 2011 at 1:37 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote:
*Find next number in series
* * ***
*
*
**
*What are the next two numbers in this sequence?
7, 14, 17,
to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
+91-7838289304
Software Engineer
Slideshare
Delhi
INDIA.
--
You received this message
...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
+91-7838289304
Software Engineer
Slideshare
Delhi
INDIA.
--
You received this message because you are subscribed
.
--
With Regards
Ankur Aggarwal
+91-7838289304
Software Engineer
Slideshare
Delhi
INDIA.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email
.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
+91-7838289304
Software Engineer
Slideshare
Delhi
://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
+91-7838289304
Software Engineer
Slideshare
Delhi
INDIA.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge
to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
--
You received
.
--
With Regards
Ankur Aggarwal
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options
://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks
this ques was asked by google.. i* could find any gud soln than order n*n
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
read coremen excercise ques of linklist... u will understand...
On Fri, Jul 16, 2010 at 1:13 PM, ankur aggarwal ankur.mast@gmail.comwrote:
@thread_creator
do u really need a code... try understanding the logic.. coding is not
tough.. i have a code.. i can mail u if u wanaa
On Fri
...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
--
You received
to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
--
You
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com
this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group
.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
--
You received this message because you
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com
://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr
email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
--
You
.
--
With Regards
Ankur Aggarwal
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options
Write a C/C++ console application that connects to a MySQL server and prints
the number of aborted connects using information provided by MySQL's global
variables.
--
With Regards
Ankur Aggarwal
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
With Regards
Ankur Aggarwal
Research internee
Optical Zeitgeist
%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Ankur Aggarwal
Research internee
Optical Zeitgeist Laboratory
Institut National de la Recherche Scientifique (INRS) - ÉMT
800, de la Gauchetière Ouest, bureau 6900
@daizi
i think this will not be n^2.
check it again ..
On Sun, Nov 1, 2009 at 1:09 PM, daizi sheng daizish...@gmail.com wrote:
with all arrays sorted firstly, if you enumerate ai, bj in ascedning order,
ck will be sure in descending order.
foreach(ai in A)
ck = largest element in C
Given 3 randomly filled array of size N ( say Aa1,a2..aN , Bb1,b2…bN and
Cc1,c2..cN ).give Algorithm to verify if there exists a triplet such that
ai + bj + ck =0 where
0I,j,k=N Time complexity of Your algorithm should be O(NlogN) and state
space complexity of
you’re algorithm .O(N^2) algorithm
If you have a large number of data which are stored on 100 distributed
computers, unsorted, how can you compute the kth number of all the data?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
yeh..
no shortcut..
On Thu, Oct 15, 2009 at 9:44 PM, harit agarwal agarwalha...@gmail.comwrote:
no use of all these logics.u have 2 calculate whole value of 100! for
summation...
use link list to store final value...after ever product...
i think yeh 8 puzzle problem maine convert karke ho sakti hain
we r not provided wid any info about the moves..
i define my move as in 8 puzzle problem
On Thu, Oct 15, 2009 at 10:58 PM, Pawandeep bhatti.pawand...@gmail.comwrote:
Case 1: We have the Big Picture to verify the result
= (n x) | ( temp (32 -x));
On Mon, Oct 12, 2009 at 5:32 PM, ankur aggarwal
ankur.mast@gmail.comwrote:
*You are given a integer and you want to rotate the bits of the
number by
a value x. Consider the right rotation by x means the least
significant x
bits should go out
A square picture is cut into 16 squares and they are shuffled. Write a
program to rearrange the 16 squares to get the original big square.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
1. Given only putchar (no sprintf, itoa, etc.) write a routine putlong
that prints out an unsigned long in decimal.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group,
-x));
On Mon, Oct 12, 2009 at 5:32 PM, ankur aggarwal
ankur.mast@gmail.comwrote:
*You are given a integer and you want to rotate the bits of the
number by
a value x. Consider the right rotation by x means the least
significant x
bits should go out from left and take
in that case it is ok..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to
*You are given a integer and you want to rotate the bits of the number by a
value x. Consider the right rotation by x means the least significant x bits
should go out from left and take the position of most significant x bits.*
--~--~-~--~~~---~--~~
You received
@raghav
plz give an example
wat r u trying 2 do.
On Mon, Oct 12, 2009 at 8:41 PM, Raghavendra Sharma
raghavendra.vel...@gmail.com wrote:
temp = (0x (32 - x)) n;
n = (n x) | ( temp (32 -x));
On Mon, Oct 12, 2009 at 5:32 PM, ankur aggarwal
ankur.mast@gmail.comwrote:
*You
*...@manisha
one traversal for each of the lists
*
After* two traversals, *both pointers will surely meet at intersection
point..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
*...@manisha
one traversal for each of the lists
*
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this
@gautam
i dont understand
On Sun, Oct 11, 2009 at 6:59 PM, Prunthaban Kanthakumar
pruntha...@gmail.com wrote:
On Sun, Oct 11, 2009 at 6:40 PM, Gautham Muthuravichandran
gautha...@gmail.com wrote:
9.. All the factorials above 5! is divisible by 9.
Divisible by 9 does not mean exactly
Q1. Give steps to sort 5 numbers in minimum number of comparisons .Justify
that number of comparisons are minimum. Extend your argument for *N*numbers.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
You've got someone working for you for seven days and a gold bar to pay
them. The gold bar is segmented into seven connected pieces. You must give
them a piece of gold at the end of every day. If you are only allowed to
make two breaks in the gold bar, how do you pay your worker?
@manisha
that is the ques..
there are many soln for 2 traversal
like loop in the linklist.
simple travesal
n many more..
On Sun, Oct 11, 2009 at 1:20 PM, ankur aggarwal ankur.mast@gmail.comwrote:
*...@manisha
one traversal for each of the lists
*
After* two traversals, *both
@gautam
*
find sum of all the digits in number-100!*
now show wat is significance of 9 in this ques ??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
2. Given an array all of whose elements are positive numbers, find the
maximum sum of a subsequence with the constraint that no 2 numbers in the
sequence should be adjacent in the array.
i) 3 2 7 10 should return 13 (sum of 3 and 10)
ii) 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)
How to find the intersection point in linked list with the following
constraints
1) one traversal for each of the lists
2) should not find the LENGTH of the lists
3) can USE recursion It goes like this ...
--~--~-~--~~~---~--~~
You received this message because you
How will you implement infinite memory(infinite strings) in finite space
Propose some method...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
You are standing at a crossing from where there emerge four roads extending
to infinity. Your friend is somewhere on one of the four roads. You do not
know on which road he is and how far he is from you. You have to walk to
your friend and the total distance traveled by you must be at most a
@sharad
wat about space ??
extra space ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send
it is NP hard problem i suppose..
On Fri, Oct 9, 2009 at 4:20 PM, Miroslav Balaz gpsla...@googlemail.comwrote:
LOL search for dominance in graph.
2009/10/7 ankur aggarwal ankur.mast@gmail.com
Given a graph..
Find the minimum number of coloring (Marking) required to node
yes anil
your approach is rite..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to
Given 13 balls, how would you arrange them in 9 lines, such that there are 4
balls in each line? You can assume that the lines are arranged in 2-D space
and that a ball
cannot be placed on top of another ball.
Bonus: if you find that too easy, and have loads of time to kill, then how
about
Implement a c++ class such that it allows us to add data members at
runtime.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
To
Given a graph..
Find the minimum number of coloring (Marking) required to node such that
every node in the final graph is connected by at least one of the
colored(marked) node.
ex:
AB
AC
BD
BE
CF
sol: 2 nodes to be colored.
i.e. Colouring C and B would suffice..
The original (3×3×3) Rubik's Cube has eight corners and twelve edges. There
are 8! http://en.wikipedia.org/wiki/Factorial (40,320) ways to arrange the
corner cubes. Seven can be oriented independently, and the orientation of
the eighth depends on the preceding seven, giving 37 (2,187)
edit distance..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to
tries
On Fri, Sep 25, 2009 at 11:30 PM, ankur aggarwal
ankur.mast@gmail.comwrote:
edit distance..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
@dufus
i dont think
becoz if u have to take 1000rs then we have 500 note and 100 rs note
though we have 1000rs note.
IT is in INDIA..
i dont know about other countries
On 9/20/09, Dufus rahul.dev.si...@gmail.com wrote:
Is it different from classic Coin Denomination problem?
_dufus
On Sep
i think there is no use of discussing this ques..
On Sun, Sep 20, 2009 at 2:25 PM, eSKay catchyouraak...@gmail.com wrote:
yes it is different.
Coin Denomination Problem [http://haroonsaeed.wordpress.com/2006/06/06/
All of you guys must have played a game in which a 2-D Matrix of characters
is given. The goal to find words which satisfy some criteria (eg. Names of
various countries etc...) The words can
be present horizontally, vertically and
diogonally both in forward and reverse order.
This is a pretty
5. void foo1()
{
if(AB)
Then {_/* */}
else
if(CD)
then foo2()
}
How many time foo2() would get called given
AB 25% of the times and CD 75% of the times and
foo1() is called 5000 times
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
*For each of the n*m sums add it to the heap (if it ain't full with k
elements) or replace the root and heapify if the sum is lesser than the
root.* how u can judge which is the next value to be added..
try your algo at
array a 1 2 3 4 5 7 9
and array b 2 3 5 6 7
compiler dependent as simple as that..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email
at 5:42 PM, ankur aggarwal
ankur.mast@gmail.comwrote:
nothing happens...
On Sun, Sep 13, 2009 at 5:32 PM, Vikram Sridar
vikramsridar...@gmail.comwrote:
The man lives forever... sleeps forever actually- Hide quoted text -
- Show quoted text
this soln may fail on -ve number
i havenot tried ..
but the basic funda is this ..
On Sun, Sep 13, 2009 at 11:23 AM, ankur aggarwal
ankur.mast@gmail.comwrote:
size of char is 1 byte but that of int is 4
If i use int then output for a,b will be a+4*b
in the program the value of ptr
nothing happens...
On Sun, Sep 13, 2009 at 5:32 PM, Vikram Sridar vikramsridar...@gmail.comwrote:
The man lives forever... sleeps forever actually
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm
EXTRACT_MIN for Z[n^2] can be done in O(n) time.
http://lyle.smu.edu/~saad/courses/cse3358/ps5/problemset5sol.pdfhttp://lyle.smu.edu/%7Esaad/courses/cse3358/ps5/problemset5sol.pdf
Then using it we can find the kth smallest element in O(nk) time.
_dufus
On Sep 4, 10:03 pm, ankur aggarwal
7
On Fri, Sep 11, 2009 at 8:14 PM, Dave dave_and_da...@juno.com wrote:
Answered recently: see
http://groups.google.com/group/algogeeks/msg/077bdb6a282a1184
Dave
On Sep 11, 9:32 am, dinesh bansal bansal...@gmail.com wrote:
Hi All,
I got a question:
I have 25 horses and I need to
@all
int main() {
int a,b;
cinab;
char *ptr = (char *) a;
char *ptr2 = ptr[b];
cout (int) ptr2 endl;
return 0;
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm
?
--
*From:* ankur aggarwal ankur.mast@gmail.com
*To:* i...@mca_2007 iit_rmca_2...@googlegroups.com;
lets-talk-g...@googlegroups.com; algogeeks@googlegroups.com
*Sent:* Sunday, 6 September, 2009 2:58:40 PM
*Subject:* [algogeeks] find triangle in a graph
google question : find triangle
http://stackoverflow.com/questions/137783/given-a-function-which-produces-a-random-integer-in-the-range-1-to-5-write-a-fun
and wat about it
return
(((rand_5()+rand_5()+rand_5()+rand_5()+rand_5()+rand_5()+rand_5())-7)%7 + 1
)
--~--~-~--~~~---~--~~
You
@dave
*
*On Tue, Sep 8, 2009 at 7:27 AM, Dave dave_and_da...@juno.com wrote:
Use the rejection technique, something like this:
do
{
do
U1 = random_1_to_5();
while( U1 == 5 );
// At this point, U1 is a uniform integer in the range 1 to 4.
U2 = random_1_to_5();
* if(
in the range 1 to 4.
U2 = random_1_to_5();
if( U1 2 )
U2 += 5;}
while( U2 7 );
// At this point, U2 is a uniform random integer in the range 1 to 7.
It takes on average 45/14 1_to_5 random numbers to make a 1_to_7
random number.
Dave
On Sep 7, 10:56 am, ankur
for 1st
use hare and tortoise algo to find the mid point of the linklist ...
and reverse the other end
like
a-b--c-d-v-u
a-b--c-d-v-u
pointer 1 will point to a and other pointer will point to u
then it is done ..
u can check..
2nd
for(p = original; p != null; p = p-next-next)
@karthik
but look at the prob part..
it seems ok 2 me..
it is random generator u cannot guarntee which number is going 2 come..
On Tue, Sep 8, 2009 at 7:34 PM, Karthik Singaram Lakshmanan
karthiksinga...@gmail.com wrote:
The rejection technique may never halt...(with an infinitesimally
@dave
plz quote the name of the person u r taking / pointing..
On Tue, Sep 8, 2009 at 8:11 PM, Dave dave_and_da...@juno.com wrote:
Your comment is moot, since if any random number generator returns the
same number forever, you are not going to be able to use it to
generate other random
] = {0,2,..,k-1}
foreach (permutation from all possible-permuations of code[])
sort balls[] on the basis of code[color_tag]
print balls[]
--
*From:* ankur aggarwal ankur.mast@gmail.com
*To:* lets-talk-g...@googlegroups.com; algogeeks@googlegroups.com
On Tue, Sep 8, 2009 at 9:04 PM, ankur aggarwal ankur.mast@gmail.comwrote:
@dave
plz quote the name of the person u r *talking* / pointing..
On Tue, Sep 8, 2009 at 8:11 PM, Dave dave_and_da...@juno.com wrote:
Your comment is moot, since if any random number generator returns the
same
passes, can we do it in single pass on a list?
One method i can think of is, hashing character to its postion and
check for the sum.
abccba
123456
a: 1+6=7
b: 2+5=7
c: 3+4=7
On Sep 8, 5:33 pm, ankur aggarwal ankur.mast@gmail.com wrote:
for 1st
use hare and tortoise algo to find
extra space is sol to this problem..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email
@bharath
how will u recognize
which a to compare to which a
or apply on malayalam
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
3.You have 50,000 html files, some of which contain phone numbers. How would
you create a list of all the files which contain phone numbers?
Solutions should be optimal
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
*
*
*
@kunzmilan *
* *
* What do you mean by polynomial of the graph ?
*
*
*
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
/2007/11/28/finding-the-longest-palindromic-substring-in-linear-time/
_dufus
On Aug 31, 6:01 pm, ankur aggarwal ankur.mast@gmail.com wrote:
@abhijeet
dryrun on this
abbaabba
On Mon, Aug 31, 2009 at 5:45 PM, Abhijeet Kumar
abhijeet.k.s...@gmail.comwrote:
u can push
I KNow a sol for given a rand_5() function which generates *0* to 5
and we have to find rand_7() for *0* to 7
could not think about it...
On Mon, Sep 7, 2009 at 9:26 PM, ankur aggarwal ankur.mast@gmail.comwrote:
Given a random number generator that generates numbers in the range 1 to
5
Given a random number generator that generates numbers in the range 1 to
5, how can u create a random number generator to generate numbers in the
range 1 to 7. (remember that the generated random numbers should follow a
uniform distribution in the corresponding range)
@dufus
wat is your complexity ??
On Sat, Sep 5, 2009 at 8:17 PM, Dufus rahul.dev.si...@gmail.com wrote:
In that case I would sacrifice a little bit on time complexity and
instead of storing I would recompute the values.
_dufus
On Sep 5, 5:10 pm, ankur aggarwal ankur.mast@gmail.com
google question : find triangle in a graph Given an undirected graph,
design a O(V+E) algo to detect whether there is a triangle in the graph ot
not.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
You have N balls having one of K colors. Arrange them into groups of same
colors. e.g.
RRGRG
can be arranged as
RRRGG (Answer)
GGRRR
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
o(n) is the best sol known to me..
On Sun, Sep 6, 2009 at 1:54 PM, Pramod Negi negi.1...@gmail.com wrote:
i guess sorting will do the work.
any other constraint??
On Sun, Sep 6, 2009 at 9:52 AM, p0r$h 1987.shis...@gmail.com wrote:
Given an array of integers A[N], find the maximum value
@vishwanathan
i think this is same as external sort..
this is the same i was thinking..
external sort in *mark allen wiese*
On Fri, Sep 4, 2009 at 8:59 PM, viswanath ramakrishnan
srviswanat...@gmail.com wrote:
Q.3: Given a set of 1 Trillion integers on hard disk, find the
smallest 1
*find the posiible sums using brute force.then apply this algo
this is the main problem ..
how to do efficiently ??
*
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group,
://lyle.smu.edu/%7Esaad/courses/cse3358/ps5/problemset5sol.pdf
Then using it we can find the kth smallest element in O(nk) time.
_dufus
On Sep 4, 10:03 pm, ankur aggarwal ankur.mast@gmail.com wrote:
Find nth smallest inO(n) Given two arrays of length n in sorted order
X[n] Y[n].
Now make
@all
i got a sol this from my friend ..
Sort chunks of 1Million numbers. There will be 10^6 (1-million) set of 1
million numbers in 1 trillion numbers.
Now initialize a min-heap of size 1 million with first element of each set.
Keep removing the minimum element (1 million times) and replacing
@nayan
u can stop reading ..
but i still does not get the sol ...
On Sat, Sep 5, 2009 at 7:35 PM, Nayn nayanish.hi...@gmail.com wrote:
Guys, this is going in totally different direction.
Solution given by Shishir (using Max-Heap) works perfectly. If anybody
has any better solution please
Find nth smallest inO(n) Given two arrays of length n in sorted order
X[n] Y[n].
Now make another array Z[n^2]={such that z belongs to X+Y}.
AS all possible sum of x+y is there in Z. You have to give the nth smallest
no of Z in O(n) time.
Space complexity : No bound on it. But try to optimize it
Write an algorithm two divide two extremely large numbers, which cannot be
stored in an int, long int, float, double etc. Find the remainder and
quotient .
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm
1 or 2
depends if diagonal sqaure are considered to be same as adjacent
On Wed, Sep 2, 2009 at 8:28 PM, Nagendra Kumar nagendra@gmail.comwrote:
Can anyone recheck and rephrase the question becuase i think it would
be always '0'
On Wed, Sep 2, 2009 at 10:40 AM,
@nitin
wat is the complexity ??
can it be done linear ??
On Mon, Aug 31, 2009 at 6:07 PM, nitin mathur
nitinkumar.mat...@gmail.comwrote:
We can use the concept of longest common substring. For that use following
steps:
1) take the original string say A.
2) make a copy of it say B.
3)
* Q.3: Given a set of 1 Trillion integers on hard disk, find the smallest 1
million of them. You can fit at most 1 million integers in memory at a time.
State the fastest solution you can think of.
--~--~-~--~~~---~--~~
You received this message because you are
On Tue, Sep 1, 2009 at 6:04 PM, ankur aggarwal ankur.mast@gmail.comwrote:
@shishir
i could *not *understand
cann u give an example..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group
1 - 100 of 132 matches
Mail list logo