...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
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
,
Rahul Patil
--
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
email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
You received this message because you are subscribed
,
Rahul Patil
--
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
+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
@samm: Rather than adding numbers could we add squares(or cube) of numbers
which could also be done in linear time?
On Wed, Jan 4, 2012 at 10:56 AM, rahul patil
rahul.deshmukhpa...@gmail.comwrote:
@samm: Ur solution is great. It could be used to tell that arrays are not
similar, in linear time
, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
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
://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
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
from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
.
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 at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
You received this message
On Tue, Oct 18, 2011 at 6:31 PM, rahul patil
rahul.deshmukhpa...@gmail.comwrote:
Use recursion with the code as follows
sum array of sums, with horizontal levels, level 0 is for leftmost element
void add(node *root, int *sum, int level)
{
if(root-left
email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
...
On Fri, Oct 14, 2011 at 2:35 PM, rahul patil
rahul.deshmukhpa...@gmail.com wrote:
You can take advantage of a basic property of triagle that
sum of largest side of triangle sum of other two sides,
After sorting you could easily deside the range in which possible solution
could be found
://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
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
.
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 at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
You received
to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
On Tue, Jan 4, 2011 at 8:13 AM, rahul patil
rahul.deshmukhpa...@gmail.comwrote:
On Mon, Jan 3, 2011 at 6:08 PM, juver++ avpostni...@gmail.com wrote:
Tree structure already have parent node link. Even we reconstruct the tree
as linked list we are not allowed to achieve
Normal tree node
...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
.
--
Regards,
Rahul Patil
--
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
, 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.
--
Regards,
Rahul Patil
--
You
...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
, -3 , 2 , 105, 13
code will fail
sum[j] += A[ i]
product[j] *= A [ i]
}
for( k=0 to k= i )
if ( sum[k] == S and product[k] == P ) {
Answer is the sub array A[k to i ]
break
}
}
Kishen
On Tue, Oct 19, 2010 at 11:36 AM, abhishek singh
iiita2007...@gmail.comwrote:
@ Rahul patil
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
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
is 3 digit.
On Mon, Sep 20, 2010 at 10:50 AM, rahul patil
rahul.deshmukhpa...@gmail.com wrote:
A partial solution is , if you multiply first digits of two nos and
result is greater than 10 then surely result will be a+b digits
If not, according to me, u will need a complex logic to solve
/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
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
to this group, 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.
--
Regards,
Rahul
to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
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
, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
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
...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Rahul Patil
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
check out this solution.I think this works correct
will explain logic if u find it correct.
#include stdio.h
#define SIZE 4
int result[SIZE];
int final_cost = 10;
int curr_ans[SIZE];
void save_arr(int *result)
{
int i;
for (i=0 ;iSIZE ;i++) {
curr_ans[i] = result[i];
}
}
void
);
print_ans();
return 0;
}
On Sun, Aug 29, 2010 at 2:18 PM, jagadish jagadish1...@gmail.com wrote:
@Rahul Patil:
I ran your code on some basic test cases and i found it to be
correct!
Can you please explain the logic you used to arrive at the solution?
Thanks :-)
On Aug 29, 12:25 pm, rahul
Check out my solution. Hope u are looking for this,
Take a no 136 (base7 = 76 decimal ) convert to base 5 (ans shld be
301)
start from left side 1*7^2= 49/5^2 = 1 (rem 24)-
|
^
10
3*7 + 24 = 45 /5 = 19 (rem 0)
Is it required that sub array must be continuous.
On Aug 18, 12:34 pm, Amit Jaspal amitjaspal...@gmail.com wrote:
You have to return the length of the subsequence with longest length and sum
K . If there are multiple solutions report anyone.
On Wed, Aug 18, 2010 at 12:40 PM, srinivas reddy
do we know the range of nos in array? is it possible that negative
nos are in array?
On Aug 12, 6:50 pm, Dave dave_and_da...@juno.com wrote:
@ashish. The product will overflow for even moderate n, so instead,
form the sum and the sum of the squares of the numbers. If a and b are
the missing
is there any time complexity?
the also can be like this
char *res;
char *ptr1 =arr1;
char *ptr2 =arr2;
int count =0, n= len(arr1) ,m=len(arr2);
while(1){
while(*ptr1 *ptr2){
ptr2++;
count ++;
if( count == (n+m)/2 ){
can u give example?
is it like that for 3 , a no which is made of 1st ,2nd and 3rd digit
should be divisible by 3 or individual all three digits
must be divisible by 3?
A 2nd case seems impossible.
On Jul 30, 9:12 am, Shiv ... shivsinha2...@gmail.com wrote:
If space is not a restriction-
@ Gene
Your solution seems great and most appropriate one.
Just need to create threads in BST first.What will be time complexity
for that?
On Jul 25, 11:08 pm, Gene gene.ress...@gmail.com wrote:
You'd know how to do this if you had a sorted array A, right? Start a
pointer at each end. Call the
It is simple to convert BST to sorted doubly link list
Just do inorder_traverse and add node into the linklist.
It is like following.
linklist_node *head=NULL;
mod_in_order(tree_node *root){
tree_node *temp;
temp=root;
if (root is a leaf node)
1 convert the BST into a sorted doubly linklist.(increasing order) It
will take O(n) time.
2 Now find two nodes in a link list whose sum is k(given no)
to find sum in linklist. take two pointers ptr1= head ptr2=tail of
linlist.
now find sum of ptr1-data + ptr2- data
while(ptr1-data ptr2-
41 matches
Mail list logo