Does anyone have solutions for Let Us C by Yashwant Kanetkar ?
If yes, then please PM me.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Hi,
Does anyone wants to be moderator ? We want someone who is actively
participating in discussions and can frequently check the pending tasks for
moderation.
Shady
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from
Any proof for this ?
http://www.geeksforgeeks.org/sort-an-array-of-0s-1s-and-2s/
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
How did you directly arrive at that solution ? Can you please explain
On Thu, Feb 21, 2013 at 1:52 PM, Gaurav Rana gauravran...@gmail.com wrote:
(m+n)C(n)
On Thu, Feb 21, 2013 at 1:26 PM, shady sinv...@gmail.com wrote:
Given a matrix of size mXn, find the number of paths from the top left
Given a matrix of size mXn, find the number of paths from the top left cell
to the bottom right cell.
BFS is one way... any other approach ?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from this group and stop receiving
Given a number of time slots – start time and end time,“a b”, find any
specific time with the maximum number of overlapping.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from this group and stop receiving emails from it, send
less.
On Tue, Jan 29, 2013 at 12:13 AM, Carl Barton odysseus.ulys...@gmail.comwrote:
Because then it's not a random shuffle? If you randomly shuffle something
the order you currently have should be just as likely as any other
On 28 January 2013 12:29, shady sinv...@gmail.com wrote:
Why do we
Why do we use Fisher Yates
algorithmhttp://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm
when
in the worst case there is no shuffle at all ?
we can modify it by generating random number not inclusive of the element
that we are about to swap
--
You received this
How to check if polygon is simple based on given list of points ?
--
off bcoz its complex, hard than there are alternative lang like Java but
when and if people are involved in project which are core technology and
they are genuine engineer, than they cannot keep ourself off from this.
On Wed, Jan 2, 2013 at 12:51 PM, shady sinv...@gmail.com wrote
Why do we use pointers at all considering space as a factor other than
allocating memory dynamically does it have any other use ?
to store an integer
(int *) = 8 bytes, and while making it point to an integer location would
cost another 4 bytes, total = 12 bytes ... compared to directly
optimization of what ?
can you explain your answer ?
On Wed, Jan 2, 2013 at 10:31 AM, rahul rahulr...@gmail.com wrote:
Optimization.
On Wed, Jan 2, 2013 at 1:35 AM, shady sinv...@gmail.com wrote:
Why do we use pointers at all considering space as a factor other
than allocating memory
, with pointer lang is easy to learn and
code but in long run you will loose the charm of coding.
In above comment, I would assume we are considering the programming
languages and not the scripting languages.
On Wed, Jan 2, 2013 at 11:03 AM, shady sinv...@gmail.com wrote:
optimization of what
ya, it is correct, i misunderstood it..
any optimization on the same though ?
On Fri, Dec 28, 2012 at 9:55 AM, shady sinv...@gmail.com wrote:
@ritesh
umm, well here's a simple testcase to show the problem in the code..
isMatch(aa, a*)
On Thu, Dec 27, 2012 at 7:17 PM, Ritesh Mishra
How to extract the skyline from the rectangles ?
Given a set of rectangles with x coordinates and height, how to find the
skyline ?
--
:14 PM, Prem Krishna Chettri hprem...@gmail.com
wrote:
Well I can tell you Something about design pattern to solve this case..
What I mean is by using The State Machine Design Pattern, Anyone
can solve this. but Ofcourse it is complicated.
On Sun, Dec 23, 2012 at 11:01 PM, shady
@ritesh
umm, well here's a simple testcase to show the problem in the code..
isMatch(aa, a*)
On Thu, Dec 27, 2012 at 7:17 PM, Ritesh Mishra rforr...@gmail.com wrote:
@shady : either the string will be stored in heap or stack. thus accessing
address in heap or stack is not going to give u
Saurabh Singh
B.Tech (Computer Science)
MNNIT
blog:geekinessthecoolway.blogspot.com
On Sun, Dec 23, 2012 at 7:48 PM, shady sinv...@gmail.com wrote:
http://stackoverflow.com/questions/13144590/to-check-if-two-strings-match-with-alphabets-digits-and-special-characters
any solution
be represented by 2, 4
15 - (1, 2, 4, 8)
10 - (2, 8)
On Sat, Dec 22, 2012 at 1:59 PM, Dave dave_and_da...@juno.com wrote:
@Shady: I'm not sure what you mean by output N coins. With U.S. coins,
you can need up to 4 pennies, 1 nickel, 2 dimes, 1 quarter, and 1
half-dollar (or 4 pennies, 1 nickel
Given R and N, output N coins in the range from 1 to R such that average
number of coins needed to represent all the number in the range is
minimized.
Any idea ? hints ?
--
no more replies on this thread please.
On Fri, Nov 23, 2012 at 9:29 PM, Vivek Ramamoorthy vivekr...@gmail.comwrote:
Hi,
Amazon is hiring people for software development projects undergoing at
Blore, Hyd and Chennai divisions.There are openings for Software
Development Engineer, Software
assume there are no additional insertions, so we care about only accessing
an element.
On Sat, Nov 24, 2012 at 12:30 AM, Pralay Biswas
pralaybiswas2...@gmail.comwrote:
non synced data structure = not thread safe in most prog languages!
On Fri, Nov 23, 2012 at 9:00 AM, Atul Singh
which data structure among the follow has fastest sequential access ?
i) vector
ii) Singly linked list
iii) Doubly linked list
it won't be doubly linked list as it involves more pointer manipulations
than singly linked list...
--
Is Non-hamiltonian cycle problem not in NP ?
Since to verify it, we need to go through all possible paths which make it
exponential in nature.
Please support your claim with credible links. I found over web that at lot
of places it is written The Non-hamiltonian cycle problem is not known to
be
Hi,
We have to divide a set of numbers into two subsets such that their
difference is minimum (Balanced Partitioning Problem). Can anyone explain
the suggested solution ?
http://ace.delos.com/TESTDATA/JAN11.divgold.htm
--
I was interested in knowing if anyone had the experience of going through
any of the above mentioned companies interviews. What were the questions
asked and the format ?
--
yes, correct, both solutions are correct, but here there is a chance of
overflow.
On Mon, Nov 19, 2012 at 3:11 PM, shashi kant shashiski...@gmail.com wrote:
@RushirajPatel if you happen to have looked at the page ..3rd solution is
the XOR one which is may be a solution for 2 missing
Given an array of size n, which has all distinct elements between 1 to n
with one element repeating, which also implies that one element is missing.
How to find the repeating element without using extra space and linear time
complexity ?
Any way to do it with exor ? :P
--
Here the time complexity of the solution should be O(n * log(n))
http://www.geeksforgeeks.org/archives/21781
--
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
??so n*(n/2)=o(n^2)
On Mon, Nov 5, 2012 at 8:54 PM, shady sinv...@gmail.com wrote:
Here the time complexity of the solution should be O(n * log(n))
http://www.geeksforgeeks.org/archives/21781
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
Hi,
Can we check this by just doing an inorder traversal, and then checking if
it is in increasing order or not ?
--
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
When can we avoid doing statistical significance testing ?
--
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
i am talking about t-test, z-test.. which are done when dataset is not
big.. can we avoid them ? When are these tests not required ?
On Fri, Oct 5, 2012 at 8:55 PM, shady sinv...@gmail.com wrote:
When can we avoid doing statistical significance testing ?
--
You received
this is not a sequence point rule... there is only one way of evaluation
here.
correct me if wrong...
On Tue, Sep 25, 2012 at 11:26 PM, atul anand atul.87fri...@gmail.comwrote:
*i = i + i; // *this voilate sequence point rule
output is compiler dependent.
On Tue, Sep 25, 2012 at
Hi,
I wanted to know if Google is reading the mails sent by us. Because they
provide special services to companies when paid with good amounts. Was
reading on web, that policies have changed and they can read whatever they
want.
Shady
--
You received this message because you are subscribed
got the answer, they do.
On Wed, Aug 22, 2012 at 7:59 PM, shady sinv...@gmail.com wrote:
Hi,
I wanted to know if Google is reading the mails sent by us. Because they
provide special services to companies when paid with good amounts. Was
reading on web, that policies have changed and they can
you are not supposed to post code. Just post pseudo code to explain logic.
On Fri, Aug 17, 2012 at 12:05 PM, Sairam Ravu ravu...@gmail.com wrote:
#include iostream
#include map
#include stdlib.h
using namespace std;
int main()
{
int testcases;
cin testcases;
int
for n elements, space used - 2n
can we do better ?
On Thu, Aug 16, 2012 at 3:20 PM, atul anand atul.87fri...@gmail.com wrote:
input : 23 45
temp1 : 26 24 120
temp2 : 120 60 20 5
for given input ..take tow temp array.
temp1[i] = input[0] * input[1] * input[2] *
well we can do with just one array. Overwrite the answer directly on left[]
array.
On Thu, Aug 16, 2012 at 6:47 PM, mohit mohitsingh1...@gmail.com wrote:
here are the steps :
1) Construct a temporary array left[] such that left[i] contains product
of all elements on left of A[i] excluding
One nice question, many of you might have solved it... but still worth
sharing
Link http://www.spoj.pl/problems/ORDERS/
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
you can do it easily by counting the number that can be formed with 1 digit
= 26, then 2 digit = 26*26... similarly find the length of the answer and
then can find the number by searching using bsearch over the number of
different characters.
if someone can do it with base % method,, then it is
understood, thanks a lot everyone
On Wed, Aug 15, 2012 at 2:33 PM, gaurav yadav gauravyadav1...@gmail.comwrote:
@aman +1
--
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
Hey all,
I fail to understand this problem, can anyone tell what do we need to do ?
Sides of a hexagon is given, but we dont know the tile size.
http://codeforces.com/problemset/problem/216/A
Shady
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
not possible.
On Wed, Aug 15, 2012 at 2:26 AM, ragavenderan venkatesan
ragavende...@gmail.com wrote:
Given Xor of 3 numbers, How can we derive back those 3 numbers?
Can any one explain with an example?
Thanks
Ragavenderan
--
You received this message because you are subscribed to the
nope, doesnt work
even taking a simpler case like
a, b, aa, ab, ba, bb, aaa, aab, aba, abb...
using base 2 doesn't give correct results
On Mon, Aug 13, 2012 at 3:33 AM, vivek rungta vivekrungt...@gmail.comwrote:
its base 26 but little modification in code ...
@shiv - nice solution .
.
On Wed, Aug 15, 2012 at 2:34 AM, ragavenderan venkatesan
ragavende...@gmail.com wrote:
for 2 numbers?
On Tue, Aug 14, 2012 at 2:00 PM, shady sinv...@gmail.com wrote:
not possible.
On Wed, Aug 15, 2012 at 2:26 AM, ragavenderan venkatesan
ragavende...@gmail.com wrote:
Given Xor of 3
a small question, if matrix has 'r' rows and 'c' columns, how many
different rectangles can be there for this problem ?
Space Complexity = O( (r*r)*(c*c) )
On Sat, Aug 11, 2012 at 7:10 PM, Srividhya srisam261...@gmail.com wrote:
hi all:)
The coordinates of a rectangle will be specified. there
@venkat +1
On Sun, Aug 12, 2012 at 9:09 PM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote:
@Arun: This approach is constant time once the array is build for any
queries that follows. :) You know sum for all possible rectangles in the
given 2d array thats makes it better than computing sum for each
Hi,
Can anyone tell how to find local minima in an unsorted array ? Recommended
solution : O(log(n))
Shady.
--
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
i am not sure if it is possible to change the length of an already declared
array, so i think one might wanna use pointers instead. Allocate memory
dynamically.
On Thu, Jun 28, 2012 at 2:36 PM, deepikaanand swinyanand...@gmail.comwrote:
//Taken from careercup.com
Design the autocomplete
even i dont know how to code in LISP, but this might help
http://obereed.net/queens/algorithm.html
On Fri, Jun 29, 2012 at 5:45 AM, Victor Manuel Grijalva Altamirano
kavic1.mar...@gmail.com wrote:
Hi i need your help, i need to programm the problem eight queens in LISP.
I´m learning LISP, but
dont post codes, ask whether your algorithm is correct or not.
On Sun, Jun 24, 2012 at 8:29 PM, Hassan Monfared hmonfa...@gmail.comwrote:
use return (a/gcd(a,b)*b instead
On Sun, Jun 24, 2012 at 7:10 PM, Sourabh Singh
singhsourab...@gmail.comwrote:
please suggest something :
Problem
@hemesh, amol = correct solutions
ABCDEF another problem on SPOJ, incase people want to try.
On Sun, Jun 24, 2012 at 2:13 AM, Sourabh Singh singhsourab...@gmail.comwrote:
@ Amol Sharma
thanx got it..
yup, overlooked those case's :-) my bad..
On Sat, Jun 23, 2012 at 1:31 PM, Amol Sharma
http://groups.google.com/group/algogeeks/browse_thread/thread/c678b320891bbaa1/1646f2fe7d2c6879?hl=enlnk=gstq=Spoj+Domino+Tiling+#1646f2fe7d2c6879
http://groups.google.com/group/algogeeks/browse_thread/thread/c678b320891bbaa1/1646f2fe7d2c6879?hl=enlnk=gstq=Spoj+Domino+Tiling+#1646f2fe7d2c6879
by
bfs/dfs will work but will be complex.
First do a BFS from root node, and reach a corner(leaf node). This node
will always be the part of solution, so you will do another BFS from this
leaf node. For this you need to store for every node their parent and child
pointers.
@lucifier +1
On Sun, Mar
Hi,
i am using pow() function in C++ to calculate square of 99937, but to
my amazement it is giving one less than actual value. Since it returns
double, i am adding 10e-5 to get the correct value, but still no
improvement. Any idea ?
--
You received this message because you are subscribed
@don it is, actually i wanted to give a smaller example so wrote like that.
@arpit thanks, powl() solved the problem.
On Mon, Mar 26, 2012 at 7:00 PM, Don dondod...@gmail.com wrote:
Why use pow to compute a square when * is significantly faster?
Don
On Mar 26, 6:09 am, shady sinv
@gene
i think for 3 4 2 you need to start from left most element, and then make
substitutions one by one.
so it will be
3 4 2
2 4 3
2 3 4
@all i googled a bit, and found that O(n) solution is possible for it, any
idea ?
On Sun, Mar 25, 2012 at 1:59 PM, Kartik Sachan
what is the output for this ?
{ 1 ,6 ,8 ,3 ,5, 4, 2}
On Sat, Mar 24, 2012 at 7:31 PM, Navin Kumar navin.nit...@gmail.com wrote:
Given an array of integers, for each index i, you have to swap the value
at i with the first value smaller than A[ i ] that comes after index i.
An efficient
Inorder traversal is 163.
But they second tree is not subset. let me know if i got the question
wrong.
On Wed, Mar 21, 2012 at 10:27 AM, shady sinv...@gmail.com wrote:
@Sid +100
On Wed, Mar 21, 2012 at 10:20 AM, siddharam suresh
siddharam@gmail.com wrote:
get the inorder traversal
5
/\
3 4
is this subtree of
1
/ \
34
/ \
51
/ \
34
, shady sinv...@gmail.com wrote:
oops no 2 there
On Mon, Mar 19, 2012 at 9:36 PM, shady sinv...@gmail.com wrote:
if tree is like
1 / \ 2 3 / \ / \ 4 5 6 7
/ \
12 -8
then vertical sums are
12(1 + 5 + 6)
2
4
-6(2+-8)
3
7
12
On Mon, Mar 19, 2012 at 9:05 PM, rahul sharma
@Sid +100
On Wed, Mar 21, 2012 at 10:20 AM, siddharam suresh
siddharam@gmail.comwrote:
get the inorder traversal both tree (into strings) check weather one
string substring of other if yes then one tree is sub tree of other.
Thank you,
Sid.
phone:+91-8971070727,
+91-9916809982
On
@gene it does show your updated code.
@atul from the given input it seems different from Fibonacci encoding.
On Mon, Mar 19, 2012 at 5:32 PM, Gene gene.ress...@gmail.com wrote:
Thanks.
I noticed this too. If the n'th 1/0 digit is supposed to correspond
with the n'th fibonacci number, then
nice explanation aman and prashant
1(0) / \ 2(-1) 3(1) / \ / \ 4(-2) 5(0) 6(0) 7(2)
As you see this example, each node has an extra attribute(not necessary
though) which tells its distance from the root node. Take map and as you
traverse the tree in any order, add the count to the map value.
anything that can help people learn is always allowed. :)
On Sun, Mar 18, 2012 at 6:38 PM, Supraja Jayakumar suprajasank...@gmail.com
wrote:
Hi
Others are also welcome to comment on the code. If links are allowed in
algogeeks, I might send my wordpress blog link that explains this problem
sum..i wana know
only that..thnx...
On Mon, Mar 19, 2012 at 7:31 PM, shady sinv...@gmail.com wrote:
anything that can help people learn is always allowed. :)
On Sun, Mar 18, 2012 at 6:38 PM, Supraja Jayakumar
suprajasank...@gmail.com wrote:
Hi
Others are also welcome to comment
oops no 2 there
On Mon, Mar 19, 2012 at 9:36 PM, shady sinv...@gmail.com wrote:
if tree is like
1 / \ 2 3 / \ / \ 4 5 6 7
/ \
12 -8
then vertical sums are
12(1 + 5 + 6)
2
4
-6(2+-8)
3
7
12
On Mon, Mar 19, 2012 at 9:05 PM, rahul sharma rahul23111...@gmail.comwrote:
@supraja
keep a pointer and just write the count with the corresponding character on
the same character array.
On Mon, Mar 19, 2012 at 10:38 PM, ATul SIngh atulsingh7...@gmail.comwrote:
This was a MS question asked recently on Run length Decoding. I was
given
Input- a3b5c3d2
And the output should be
possible but with constraints on the range of the numbers
On Sun, Mar 18, 2012 at 8:45 PM, rafi rafiwie...@gmail.com wrote:
i don't think it's possible (almost sure)
On Mar 17, 3:41 pm, rahul sharma rahul23111...@gmail.com wrote:
guys do we have algo to remove duplicates in o(n) time and in
sorry, didn't get ?
On Sun, Mar 18, 2012 at 11:19 PM, Siddhartha Banerjee
thefourrup...@gmail.com wrote:
in a string... yes, because there are only 256 possible characters (or
65536, in case of unicode), so just create a boolean array of length 256
initialized to false and whenever a
i wanted to try the questions now, but can't submit, can you provide the
problems, and testdata ?
On Mon, Mar 12, 2012 at 10:41 PM, Kashyap Krishnakumar kashyap...@gmail.com
wrote:
Hi,
The online programming contest of ITRIX, the national level technical
symposium of the Department of
The function hash is the hash function the Linux kernel used in the dentry
cache. - quoted from the same paper, *SPEC SFS **is one example of dentry
hash function. Might wanna google to learn in detail, it has got of details
which i couldn't understand.*
On Fri, Mar 2, 2012 at 2:20 AM, aanchal
actually i wanted it for research purposes, one that i can download and
then use it
On Fri, Mar 2, 2012 at 8:17 PM, Dave dave_and_da...@juno.com wrote:
@Shady: This is pretty elementary. wikipedia.org lets you choose your
language. But even if you didn't know that, you can google spanish
anurag how did you reach that solution ?
can you elaborate...
On Wed, Feb 29, 2012 at 8:11 PM, Anurag atri anu.anurag@gmail.comwrote:
nth term : (n! + 2^n - n)
On Wed, Feb 29, 2012 at 11:05 AM, Vaibhav Mittal
vaibhavmitta...@gmail.com wrote:
Ntn else is provided..??
On Feb 28, 2012
congrats :)
keep participating and keep learning.
On Wed, Feb 29, 2012 at 9:19 AM, atul anand atul.87fri...@gmail.com wrote:
congo :)
On Wed, Feb 29, 2012 at 5:30 AM, Varun Nagpal varun.nagp...@gmail.comwrote:
cool
On Tue, Feb 28, 2012 at 9:22 PM, Ravi Ranjan
logic ?
On Tue, Feb 28, 2012 at 11:16 AM, srikanth reddy malipatel
srikk...@gmail.com wrote:
66,68,70
On Mon, Feb 27, 2012 at 6:54 PM, karthikeya s karthikeya.a...@gmail.com
wrote:
3, 39, 41, 43, 45, 49, 51, 53, 55, 64, ?, ?, ...
(These are successive numbers sharing a common property.
Problem link http://www.spoj.pl/ABACUS12/status/ABA12E/
--
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
than candidate sum
there is also need to take care of some cases when there are exactly k-1
sums less than candidate sum, but there is no contigious where sum =
candidate sum.
On Tue, Feb 21, 2012 at 11:02 PM, shady sinv...@gmail.com wrote:
Problem link http://www.spoj.pl/ABACUS12/status
there is also need to take care of some cases when there are exactly k-1
sums less than candidate sum, but there is no contigious where sum =
candidate sum.
On Tue, Feb 21, 2012 at 11:02 PM, shady sinv...@gmail.com wrote:
Problem link http://www.spoj.pl/ABACUS12/status/ABA12E/
--
You
;
iteration 5
sum[3 - 4] = 9 7
new g = 4 count += 4-4+1
final count = 8, so there are 8 sums less than 7
On Wed, Feb 22, 2012 at 12:16 AM, shady sinv...@gmail.com wrote:
didn't get you, how to check for subsequences which doesn't start from
the beginning ? can you explain for that same
output is compiler dependent.
search archives for more info.
On Sun, Feb 12, 2012 at 6:57 PM, Ratan success.rata...@gmail.com wrote:
int i=2,x;
x=(i++ + i++) * (i++ + ++i);
printf(%d,x);
o/p: 24
plzzz justify this output...
--
--
Ratan | 3rd Year | Information Technology | NIT
There are many, but the one i know how to code is fermat's primality test.
How to calculate all prime numbers between a given range efficiently i read
somewhere that we can do bit-masking to store whether a number is prime or
not, thus saving space ?
I generally use double prime sieve.
On Sat,
, shady sinv...@gmail.com wrote:
Hi All,
Anyway to implement this in a good mannerhttp://
www.spoj.pl/ARHN/problems/PRINCESS, solution is simple,
check for ones and then generate numbers is an increasing number...
so if a number n = 22(10110)
then for k = 1, ans = 2(10)
then for k = 2, ans
well i have used three recurrences :P formed them by following a
traditional approach
f[i] = f[i-1] + 2*g[i-1] + h[i-1] + f[i-2];
g[i] = f[i-1] + g[i-1];
h[i] = f[i-1] + h[i-2];
On Thu, Feb 9, 2012 at 7:19 PM, Kunal Patil kp101...@gmail.com wrote:
I am solving spoj
)
Shady
--
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, visit this group
hi,
how to read till end of file in c++ using cin ?
string str;
while(!cin.eof())
{
cin str;
cout str endl;
}
but it is not working correctly.
It is printing the last line twice. Can anyone tell why ?
--
You received this message because you are subscribed to the Google Groups
Hi, Any hints for this problem ?
Link http://www.codechef.com/problems/ORDERS/
--
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
roflmao, how is it possible, go and check your settings :P
Google Groups are perfect.
On Fri, Feb 3, 2012 at 7:22 PM, aditya bindal adityabindal1...@gmail.comwrote:
me as well, it is quite awkward now, pls look into it.
On Feb 2, 12:33 am, arpit.gupta arpitg1...@gmail.com wrote:
HI,
i am
http://www.geeksforgeeks.org/archives/13209
On Thu, Jan 26, 2012 at 10:33 AM, Sanjay Rajpal sanjay.raj...@live.inwrote:
Given an array of integers where each element represents the max number of
steps that can be made forward from that element. Write a function to
return the minimum number of
http://stackoverflow.com/questions/4311694/maximize-the-rectangular-area-under-histogram
it is described here.
On Mon, Jan 23, 2012 at 3:16 PM, Ashish Goel ashg...@gmail.com wrote:
someone said that the solutionhas been given using the stack, can someone
explain it, i did a lookup in my mail
On Tue, Jan 17, 2012 at 4:54 PM, Durgesh Kumar durgesh1...@gmail.comwrote:
#includestdio.h
int main()
{
int i=0;
printf(hello world \n);
i++;
fork();
printf(forking %d,i);
i++;
}
o/p :-
hello world
Can any1 explain this??
On 1/17/12,
answered by sunny. and output you mentioned is also wrong. search archives.
On Tue, Jan 17, 2012 at 5:31 PM, shady sinv...@gmail.com wrote:
On Tue, Jan 17, 2012 at 4:54 PM, Durgesh Kumar durgesh1...@gmail.comwrote:
#includestdio.h
int main()
{
int i=0;
printf(hello world
atul he is assigning the value later on.
i think format specifier . rounds up the number in last decimal place.
On Tue, Jan 17, 2012 at 11:53 AM, atul anand atul.87fri...@gmail.comwrote:
printf(%0.3lf %0.3lf\n,p,t);
its just printing at your convenience . you are not changing the value of
^^ true, sort the rows and then a K-way merge.
On Wed, Jan 11, 2012 at 1:00 PM, Sanjay Rajpal sanjay.raj...@live.inwrote:
I guess sort the array such that elements are sorted finally in such a way
that if we print them row by row, the result is a sorted array.
K-way merge can be useful.
*
, Jan 11, 2012 at 1:54 PM, Ankur Garg ankurga...@gmail.comwrote:
@Shady Rows are already sorted ...
On Wed, Jan 11, 2012 at 1:53 PM, shady sinv...@gmail.com wrote:
^^ true, sort the rows and then a K-way merge.
On Wed, Jan 11, 2012 at 1:00 PM, Sanjay Rajpal sanjay.raj...@live.in
wrote:
I
any idea on how to merge two sorted arrays of size m and size n in O(m+n)
time and without extra space ?
On Wed, Jan 11, 2012 at 3:22 PM, Dipit Grover dipitgro...@gmail.com wrote:
@ all k-way people : I dont get it how the complexity would be O(m*n) . I
just went through the algo and I feel
banned,
trying to cheat, aye ?
no more replies on this topic, until Wednesday
On Sun, Jan 8, 2012 at 10:16 AM, kumar rajat thebossku...@gmail.com wrote:
Hi
Can any1 suggest a algo for heaviest increasing subsequence of a given
array?
(HIS is the LIS when weights are included for each element
@sravanreddy i dont think that will work,
On Fri, Jan 6, 2012 at 9:01 PM, sravanreddy001 sravanreddy...@gmail.comwrote:
@dabbcomputers: looking at the worstcase, listing all points in the set
itself takes O(n) time,
just to speed up the time would be sort all the points(x,y) wrt x-values
as good as applying dijikstra's to find the shortest path from A to
all other vertices... and check which shortest paths are smaller than
R...
Basically it all depends on how the data is being represented..
@dabbcomputer
Correct me if i m wrong..
On Jan 6, 11:48 am, shady sinv...@gmail.com
1 - 100 of 390 matches
Mail list logo