if you know the range then you can use something like count sort, but as
here nothing is mentioned you have to take at least O(nlogn) time as the
lower bound of comparision sort is O(nlogn)
On Sun, Jan 30, 2011 at 6:10 PM, bittu shashank7andr...@gmail.com wrote:
Sort the Doubly Linked List..In
I am proposing a solution for problem 2..
2.
Given a text file, implement a solution to find out if a pattern
similar to wild cards can be detected.
fort example find if a*b*cd*, or *win or *def* exists in the text.
Whatever be the pattern sort it must be regular expression. So in
principle,
Try to solve GATE question papers on data structures, tress DBMS and
OS. Also try to solve exploring C.
--
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
if you have n points to cut and a wooden log of lenght l,choose mid[l]
and choose a point which is closer to this l and do this for all
segments
On Jan 31, 10:14 am, ritu ritugarg.c...@gmail.com wrote:
You are given a wooden log of length n. It has n+1 grooves marked on
it from 0 to n. You are
std::cout ∞ std::endl;
taunt
--
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
algogeeks+unsubscr...@googlegroups.com.
For more
@Srikar
In your first approach you cant simply ignore the queries that are not
present in the heap because you have a stream of queries and you never know
if the query that you are about to ignore is going be received frequently or
not in future. Your approach is like find the top 100 queries
does this has to do with floating point representation of numbers {IEE 754}
{single precision }
then the number would be
like
like for 32 bit field
put 0 in the sign field
all 1 in biased exponent field{8}
and all zeros in the mantissa field{23}
Don't answer this problem , it's from codechef February challenge !
On Feb 2, 6:11 pm, tech rascal techrascal...@gmail.com wrote:
In a plane given n points (x1,y1) (x2,y2)(xn,yn), find the the
maximum number of collinear points.
plz tell me the best way to do that.
--
You received this
@above guy with cheers and all and snehal
the best way to prove wrong is by a test case , so ,
-1 -2 3 4
Ricky's solution will give the answer as 4 , while the answer is 7
@snehal .
[quote]if indices starting at 1
bothers you then take
P[i]= A[0] + A[1] + + A[i]
its one and the same
Dude!
There must be something wrong with your compilers!!
It isn't even accepting a hello world program. it's giving a compilation
error on that as well :-/
On Wed, Feb 2, 2011 at 9:49 PM, Umer Farooq the.um...@gmail.com wrote:
How am I suppose to provide inputs? Input file names??
On Wed,
How am I suppose to provide inputs? Input file names??
On Wed, Feb 2, 2011 at 1:25 PM, Nikhil Agarwal nikhil.bhoja...@gmail.comwrote:
On Tue, Feb 1, 2011 at 7:42 PM, Umer Farooq the.um...@gmail.com wrote:
Hello,
it's really nice to see such a world wide online programming competition
@Umer : can you send your code here?
--
Navin Agarwal
--
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
@algoose I see what you are saying. what do you propose? checking out your
link now...
On Thu, Feb 3, 2011 at 11:44 AM, Algoose chase harishp...@gmail.com wrote:
@Srikar
In your first approach you cant simply ignore the queries that are not
present in the heap because you have a stream of
@ above and the answer to your test case is not 7 its 4 only.. as we have to
find min sum...i think u r confusing between max sum and min sum..
On Thu, Feb 3, 2011 at 10:15 PM, snehal jain learner@gmail.com wrote:
oh sorry.. i saved the complete ans in my draft and posted half ( as i got
Hi Richi,
Thanks for finding the problem. I forgot to add one condition:
Please have a look on the following code. I hope this will solve the
problem.
int array[] = {-1,-2,3,4};
int length = 4;
int max = 0;
int current = 0;
for (int i = 0; i length; i++)
{
current += array[i];
if (current
@juver++
Is the sign you printed anywhere on keyboard ?
how can u use it ??
i got AC althoughis there any *ALTERNATIVE SOLUTION *
On Thu, Feb 3, 2011 at 8:26 PM, rahul rai raikra...@gmail.com wrote:
does this has to do with floating point representation of numbers
@ Snehal,
Yes you are right, I wrote function for finding max sub array. It can be
converted to find min sub array by just switching the comparison operator :)
On Fri, Feb 4, 2011 at 12:14 AM, snehal jain learner@gmail.com wrote:
@ Above
u r finding maximum sum subarray
whereas
@ rajiv
but there are conditions that sum should be positive and greater than
zero... so just reversing sign wont work..
On Fri, Feb 4, 2011 at 12:22 AM, Rajiv Podar rajeevpo...@gmail.com wrote:
@ Snehal,
Yes you are right, I wrote function for finding max sub array. It can be
converted to
Hi,
My approach:-
3 1 2 1 4 1 2 1 4 3 2
1) Find matching element from start and end.
here it willl be 3
2) Perfrom (#1) for sub array 1 2 1 4 1 2 1 4
here it will be 2 1 4 1 2
4 left out
3) Perfrom (#1) on 2 1 4 1 2
here it will be 1 4 1
4) Perform (#1) on 1 4 1
It is unicode I think.
--
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
algogeeks+unsubscr...@googlegroups.com.
For more options,
20 matches
Mail list logo