@Utkarsh: In Yogesh's code assigning a[1] to largest and second_largest in
the beginning, -VE case will be handled.
On Mon, Sep 19, 2011 at 12:10 PM, asdqwe wrote:
> @Yogesh:fails for negative numbers..
>
> (though I am also confused with the ques)
>
> On Sep 19, 10:38 am, Yogesh Yadav wrote:
Lots of guys already have shared interesting facts.
Here is a good saying - "Knowing that a bottle of COKE will burst like a
fountain if opened after shaking. Someone who tries that to validate it has
a Testing DNA"
Here are some more differences that can help you make choices :)
Developer:
@Ankit.
n= 1101
i=2 j=3
x = (2^j + 2^i) = 1100
x^n = 0001
Answer should be 1101.
On Wed, Sep 14, 2011 at 12:39 AM, Ankit Agarwal wrote:
> let x = 2^j + 2 ^i
> new number after swapping the digits is x XOR n
>
> eg n = 1101
> j = 6 i = 2
> x = 0100 0100
> new number =
http://stackoverflow.com/questions/6967853/dynamic-programming-can-interval-of-even-1s-and-0s-be-found-in-linear-time
On Sun, Sep 11, 2011 at 12:10 AM, Neha Singh wrote:
> Can't hv linear solution to this problem. The no. of intervals itself can
> be of the order of O(n^2)
>
> --
> You received t
Thanks Dave, Piyush, and Bittursk.
On Wed, Sep 7, 2011 at 2:48 PM, Dave wrote:
> @Sandy: It can be done in O(n) time with O(n) extra space by sorting
> the data with a radix sort and then scanning the array for the element
> you are seeking.
>
> Dave
>
> On Sep 7, 1
@Rahul - Can you explain the logic and complexity?
On Wed, Sep 7, 2011 at 11:06 PM, Rahul Thankachan wrote:
>
>
> On Sep 7, 12:43 pm, Sandy wrote:
> > You have an array in which every number is repeated odd number of times
> > except one. Write a function to find that one
You have an array in which every number is repeated odd number of times
except one. Write a function to find that one element in O(n) time.
--
*Sandeep Kumar,*
( Mobile +91-9866507368
*“I believe in smart work, Believe Me”*
--
You received this message because you are subscribed to the Goog
@SandeepGupta: That ways red will be 15.
On Tue, Sep 6, 2011 at 9:43 PM, sandeep gupta wrote:
> let the blue and green chameleon meet first.
> Result :
> 14 - red
> 14 - green
> 16 - blue
> now 14 times pair of red and green meet to make it all 44 blue
>
> On Sep 5, 11:44 pm, Don wrote:
> > Yes,
String constants (literals) are saved into the .data section of the program,
Here is the sample program to show that. if() is essentially comparing the
addresses of two pointers which is same.
int main()
{
char *p="persons";
char *q="persons";
char *r="persons";
char *s="persons";
printf("%x %x
What is the practical application of this expression?
On Tue, Sep 6, 2011 at 5:38 PM, Dave wrote:
> @Mohit: If n is a power of 2, then the macro returns x if x is a
> multiple of n or x rounded up to the next multiple of n if x is not a
> multiple of n. E.g., ROUNDUP(16,4) = 16 and ROUNDUP(17,4)
Java How To Program - Deitel & Deitel
On Tue, Sep 6, 2011 at 5:38 PM, htross wrote:
> guys i need to prepare for java aptitude so please refer some
> books..
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To pos
question : A programmer wants to test whether or not n given
conditions are all simultaneously true (e.g he may want to test
whether both x>0 and yhttp://groups.google.com/group/algogeeks?hl=en.
hey guys please help me to solve this
QUESTION : input a number C , an output all of the ways that a group
of ascending positive numbers can be summed to give C. for e.g if
C=6,the output should be
1+2+3
1+5
2+4
[solve using dynamic programming]
please tell me about this..
--
You received this
plz help
--
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 grou
Please see http://geeksforgeeks.org/?p=767 for well explained C
implementation of the same.
On Jun 23, 10:01 am, Ajinkya Kale wrote:
> Yeah c++ STL nextpermutation api will do it .. good solution Miroslav!
>
> On Tue, Jun 23, 2009 at 10:25 PM, Miroslav Balaz
> wrote:
>
>
>
> > It is also so eas
This is solved and very well explained at http://geeksforgeeks.org/?p=511
On Aug 17, 7:19 am, Abhijeet Kumar wrote:
> i think the code given above doesn't work ..
> so may be dat needs to be checked
> any better ideas??
>
>
>
> On Mon, Aug 17, 2009 at 7:20 PM, manish bhatia wrote:
> > Keep
16 matches
Mail list logo