@sasi and Sulekhaits Head First Java...which explained these properties
to me. :)
On Thu, Mar 14, 2013 at 1:28 PM, sasi kumar wrote:
> @Manish Well Explained:)
> @sulekha Probably you have to read Head First java which is an awesome
> book that covers these topics with examples
&g
, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> sulekha metta
> B.E computer science
> osmania university
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> T
+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
With regards,
Manish kumar untwal
Indian Institute of Information Technology
Allahabad (2009-2013 batch)
--
You received this message because you are subscribed to the Googl
)
> MNNIT
> blog:geekinessthecoolway.blogspot.com
>
>
>
> On Tue, Dec 11, 2012 at 11:23 PM, manish untwal
> wrote:
>
>> i answered with the...system call too..but he said...do it in C
>> programming language only don't use...system call here!!
>>
>&
:geekinessthecoolway.blogspot.com
>
>
>
> On Tue, Dec 11, 2012 at 11:02 AM, amrit harry wrote:
>
>> 1st:
>>
>> freopen("filename","r",stdin);
>>
>> while(scanf("%s",str)!=-1)
>> {
>> printf("%s\n",str);
i think, i replied with the same answer and he was not convinced
On Tue, Dec 11, 2012 at 11:02 AM, amrit harry wrote:
> 1st:
>
> freopen("filename","r",stdin);
>
> while(scanf("%s",str)!=-1)
> {
> printf("%s\n",str);
> }
>
>
&
roup.
>>>> 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.
>>>>
>>>
>>> --
>>> 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 at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>> --
>>
>>
>>
>
> --
>
>
>
--
With regards,
Manish kumar untwal
Indian Institute of Information Technology
Allahabad (2009-2013 batch)
--
I gave this interview in August this year, two of the question i was not
able to answer properly
1) how to print the content of file in C without using the file pointer.
2) count the total number of permutation of a number in order O(n)
--
Four processes of 1gb,1.2gb,2gb,2gb are there and RAM available is 2gb. We
have a
time shared system. Which of the following is the most appropriate
scheduling algorithm?
a. all processes are loaded sequentially 1 by 1
b. load one process at a time and execute processes in RR fashion
c. load 1gb
Swapping two objects (not integers/chars),without using temp...?
my solution is using xor operation..is that right and ny other solutions ?
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To view this discussion on the web visit
https://grou
Q1. If we have infinite memory, then do we still be needing paging?
Q2. Given only 8bits registers, you have to find average of 4 bit registers
values without using any operation involving 16 bit calculations.
--
You received this message because you are subscribed to the Google Groups
"Algori
gt; insert(&tree,34);
> traverse(tree);
> bst2ll(&tree);
> printf("\n");
> traversell(tree);
> printf("\n");
> }
>
>
> should print : 30 34 40 45 50 60 65 70
> but printing: 30 34 40 45 50 60 70
>
>
> Thank you
> S
t; "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/BrQFNo1PKTIJ.
>
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr..
subscr...@googlegroups.com.
>>> > For more options, visit this group at
>>> > http://groups.google.com/group/algogeeks?hl=en.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Algori
"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 at
> http://groups.google.com/group/algogeeks?hl=en.
>
"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 at
> http://groups.google.com/group/algogeeks?hl=en.
>
--
W
20
Thank you,
Have a great day !!
* With Regards,
*
*
Manish Patidar.*
On Thu, Jul 26, 2012 at 11:11 PM, payal gupta wrote:
> ans.20
>
>
> On Thu, Jul 26, 2012 at 11:09 PM, Ali Ahmad Ansari <
> ali.ahamad.ans...@gmail.com> wrote:
t;>
>>
> --
> 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.
and we don't need the code!!
On Tue, Jul 24, 2012 at 10:30 PM, manish untwal wrote:
> I think the question is in the written round!!!
>
>
> On Tue, Jul 24, 2012 at 9:11 PM, algo bard wrote:
>
>> #include
>> #define RANGE_START 0
>> #define RANGE_END 100
&g
Regards
>>
>> Lomash Goyal
>>
>> *
>> *
>>
>>
>> --
>> 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.
ot;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 at
> http://groups.google.com/group/algogeeks?hl=en
o 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.
>
--
With Regards
Manish Patel
BTech
Comp
Need Help to prepare for SYNTEL interview.
plzz send me topics to cover.
Thank you in advance,
Have a great day !!
* With Regards,
*
*
Manish Patidar.*
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to
int median(int arr1[],int arr2[],int N)
{
if(N==2)
{
return ((max(arr1[0],arr1[1])+ min(arr2[0],arr2[1]))/2);
}
int mid=N/2;
if(arr1[mid]==arr2[mid])
return arr1[mid];
if(arr1[mid]>arr2[mid])
return median(arr1,arr2+N/2,N-N/2);
if(arr1[m
Does microsoft hire off-campus???..if yes, then what is their
process???..n what type of questions they ask???...what about
google???
actually i've gone through microsoft's collg hiring process.it was
closebut hard luck,anyway..so gonna try after 6 months.
--
You rece
@adi..
he gave a hint that space used should not b of order of range of numbers but
should depend on how many numbers are inserted...
eg..if range is say 1000...bt u entered only 5 nos ->8,100,202,600,989.
u can use space of order 5..and not 1000
--
You received this message because you are subs
@somnath...can u pls elaborate...
he was looking for an elaborate ans...
--
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
u have to perform following tasks in O(1) time
1.)insertion
2.)deletion
3.)searching
no range of input numbers is given
wat data structure will you use?
if u use hashing wat will be the key and value pairs?
--
You received this message because you are subscribed to the Google Groups
"Algorithm G
thanks man i got it .. :)
On Fri, Sep 30, 2011 at 12:17 AM, Don wrote:
> I think that it will fail if the value of the coins can be more than
> 50001.
> Don
>
> On Sep 29, 12:35 pm, manish patel wrote:
> > http://www.spoj.pl/problems/PIGBANK/
> >
> > pleas
around 999,999,999
or
the link to above pbm is
http://www.spoj.pl/problems/CZ_PROB2/
On Sep 19, 11:45 pm, Rahul wrote:
> how much big number are You tHINKING
> Rahul
>
> On Mon, Sep 19, 2011 at 2:40 PM, Manish Verma wrote:
> > does anybody know the fastest algo for prime
does anybody know the fastest algo for prime factorization of a
number???
--
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
algogeek
bt how to modify it for getting sum value= k?
--
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.c
Hey, anyone preparing for acm-icpc
what about discussing acm-icpc questions here
what say @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 t
@ashima..wat will b the complexity of ur algo?
--
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.
@bharatkumar..cn u pls share the algo
--
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
r u sure space used is O(n)?
--
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 opti
u have 2 find a continuous subarray...
--
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
given an unsorted array of +ve and -ve elements.find a subarray with sum= k
in O(n).
you can use some 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
i think hint is mentioned in the ques..there is an extra pointer..u can take
it as parent pointer..
On Wed, Aug 31, 2011 at 10:13 PM, Abhishek Yadav wrote:
> can we use loops or GOTO statements
>
> On Wed, Aug 31, 2011 at 10:03 PM, manish kapur > wrote:
>
>> Given a b
Given a binary Tree and a node pointer extra in a tree. print all the node
level by level. You cannot use any Stack ,recursion and queue.
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegro
@anup
check ur algo 4 dis..
0010
--
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.co
Input is a matrix of size n x m of 0s and 1s.
eg:
1 0 0 1
0 0 1 0
0 0 0 0
If a location has 1; make all the elements of that row and column = 1. eg
1 1 1 1
1 1 1 1
1 0 1 1
Solution should be with Time complexity = O(n*m) and O(1) extra space
--
You received this message because you are subscr
mplement a func node *(char *word){}
wich returns a link list of words dat are anagrams with the input word..if
no anagrams found return NULL and add that word to the link list
given structure of list as
struct node {
struct node *next;
char val[101];
};
--
You received this message because you
om.
>> 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.
>>
>>
>
>
> --
> Saurabh Singh
> B.Tech (Computer Science)
>
legroups.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.
>
--
With Regards
Manish Patel
BTech
Computer Science And Engineering
National Institute
mail 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.
>
--
With Regards
Manish Patel
BTech 3rd Year
Computer Science And
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.
>
--
With Regards
Manish Patel
BTech 3rd Year
Computer Science And Engineering
National Institute of Technology -A
actually here jumping of steps mean it can jump over 1 step at max. like if
it is at step no 1 he can jump to 3 as well as 2 but not to 4.
Soln is Fibonacci eqn.
t(n)=t(n-1)+t(n-2);
where t(1)=2 and t(2)=3
On Mon, Aug 15, 2011 at 6:06 PM, Anika Jain wrote:
> i m sorry i cant understand the quest
---
manish patel wants to stay in better touch using some of Google's coolest new
products.
If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-e026d3feed-141e1c7d4e-IcnixiONDyPSp9FJaVLNNJRPxVI
Y
nsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
--
Manish Kumar Sharma,
Undergraduate,
Computer Engg. Department.,
Netaji Subhas Institute of Technology,
New Delhi.
--
You received this message because you are su
suppose the array is arr[];
set index start and end at the starting and ending of the array.
sum=arr[start]+arr[end]
check if sumvalue
decrease end index by one
and repeat the process until starthttp://groups.google.com/group/algogeeks?hl=en.
@Akshata:
Whenever you increase any variable then it increases according to its type.
Here the address of array 'a' is being increased.( &a+1 ).
so the address of 'a' will temporarily increased to 20 bytes and then that
is assigned to ptr.
so ptr is now pointing to any value in the memory just aft
gt;> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Archita Monga
>
> --
> You received this message because you are subscribed to the Google
let's start from top right element(call p)
if(x=0)
{ if(arr[i][j]==x)
return 1;//found
else if(a[i][j]wrote:
>
>
> -- Forwarded message --
> From: sivaviknesh s
> Date: Mon, Jul 18, 2011 at 11:29 PM
> Subject: Fwd: MICROSOFT INTERNSHIP (Coding round)
> To: algogeeks@g
> 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.
>
--
With Regards
Manish Patel
BTech 2nd
answer is 3
--
Thanks and Regards,
Manish Pathak **
TimesJobs.com
--
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 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 at
ht
please send me this book to my email , thanks" manish.iitia...@gmail.com'
On Sat, Apr 30, 2011 at 6:07 AM, Venkat wrote:
> Hey how's ur interview?
> if u have the book pls mail me to " gvr.su...@gmail.com "
>
> On Apr 19, 6:19 am, nagajyothi gunti
> wrote:
> > Please send me too at nagajyothi
here
y= 1+ 3+4+4= 12
and x=5
here just follow rules of postfix and prefix operator
thanks
manish
--
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
roup, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorith
10 XOR 11 ---> 01
01 XOR 10 ---> 11(3)
So answer is 3.
Any query???
--
Thanks and Regards,
Manish Pathak **
TimesJobs.com
Mo. 9015687266
--
You received this message because you are subscribed to the Google G
#include
#include
#include
int fact(int n);
void main()
{
char a[20],st_char;
static int i,j,k,n,ctr,main_ctr;
printf("Enter the string : ");
//gets(a);
scanf("%s",a);
n=strlen(a);
if(n<=1)
{
printf("please enter a valid string ");
exit(0);
}
//label :
whi
Hi kamakshi
I think, kusum answer's is right, can u explain why A
not???
--
Thanks and Regards,
Manish Pathak **
TimesJobs.com
Mo. 9015687266
*http://manishpathak-mobile.blogspot.com/*
--
You received this message because you are subscribed to the Google G
'MNNIT ALLAHABAD
>>
>> The Law of Win says, "Let's not do it your way or my way; let's do it the
>> best way."
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" grou
ooglegroups.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.
>
>
--
Thanks and Regards,
Manish Pathak **
TimesJobs.com
manish.pat...@timesgr
group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geek
Given: An array of integers(may be both positive and negative), we
have to find out the minimum positive sum of array(not necessarily
continuous).
example:- {1,-5,7,10,-14,16,-17,20,21,22}
here answer is -5,-17,22 having sum=0;
--
You received this message because you are subscribed t
...
>
> > On Sat, Feb 5, 2011 at 7:24 PM, Manish Verma wrote:
>
> >> answer will depend on your compiler.
>
> >> On Feb 5, 1:02 am, jagannath prasad das wrote:
> >> > *#include
> >> > void main(void)
> >> > {
> >>
answer will depend on your compiler.
On Feb 5, 1:02 am, jagannath prasad das wrote:
> *#include
> void main(void)
> {
> int a=10,b;
> b=a++ + ++a;
> printf("%d,%d,%d,%d",b,a++,a,++a);
>
> }
>
> *what is the answer?how are the function parameters passed on the stack?
--
You received this mes
#include
void main()
{
int a[]={0,1,1,1,1,1,0,0,0,0,0,1},i=0;
static int o=0,e=0;//e for no. of 1's in array and o means no. of 0 in array
int l=sizeof(a)/4;
while(io) //if n0. of 1's greater than no. of 0's then e=o
e=o;
for(i=0;i<(e*2);i++)
{
a[i]=i%2;
}
for(i=e*2;ie)
a[i]=0;
else if(e>
) .
Repeat the above process till u will get first n pairs.
Complexity O(n).
Thanks
Manish
On Thu, Oct 14, 2010 at 3:24 PM, arun raghavendar wrote:
> Start merging A and B from the tail end for N elements, just like the way
> you would do it for a merge sort but with a different constraint
199 198 197
99 224 221 219 209 203 202 201 200 199
198 197 196
98 224 221 219 209 203 202 201 200 199
198 197 196
manish...
From: Varun Nagpal
To
ardrant as (n-2)x(n-3) would leave n-biggest
out? What is the criterion to chose the Ist quardrant?
manish...
From: topojoy biswas
To: algogeeks@googlegroups.com
Sent: Thu, 22 July, 2010 10:10:58 AM
Subject: Re: [algogeeks] a google question
im sry the L s
with largest values. The tricky part is that we need an O(n)
algorithm.
manish...
From: Ashish Goel
To: algogeeks@googlegroups.com
Sent: Sun, 18 July, 2010 6:31:08 PM
Subject: Re: [algogeeks] a google question
question please...
Best Regards
Ashish Goel
&
It doesn't work
A =>
92 87 81 72 70 61 53 22 18 17
B =>
79 78 74 68 64 62 57 34 29 24
C (GOLD) =>
171 170 166 166 165 161 160 160 159 156
D (TEST) =>
171 170 166 166 165 159 155 155 146 145
Result: FAILED!
manish...
From: Jite
@Umer: I guess the last node in the LL is _not_ pointing to the head
back. Rather, its pointing to one of the intermediate nodes. That way,
N2 or N2.next might not ever be _head_. See example: 1->2->3->4->5->3,
where the last node points to the 3rd node in LL.
On Mar 29, 9:21 pm, Umer Farooq wr
This does not look like a solution for the posted problem.
This fails the test case {2, 7, 6, 0, 100}, where the answer should
have been 4, for k=0 and j=4.
Manish
On Mar 20, 1:49 pm, saurabh gupta wrote:
> This may not be the optimal solution to
> " Given an array of integers A[N
How are you picking ni from [a...b] range (length 7) ?
From: avalon
To: Algorithm Geeks
Sent: Saturday, 19 September, 2009 2:16:47 PM
Subject: [algogeeks] Re: random number...
Forgive me first if i am wrong since i didn't read all the posting ...
Here is a w
There is an infinite tape running, churning out numbers. You are able to see
these numbers one by one, but not allowed to store all of them, but you should
be ready with k numbers whenever prompted, such that all have been selected
with equal probability. Say, when you were prompted, n numbers h
This one is better than what I suggested before. Doable in O(n)!
On Sep 13, 10:10 pm, Dave wrote:
> The following assumest that n >= 5. Find the 3 largest positive
> numbers and the two largest-in-magnitude negative numbers (i.e., the
> two smallest signed numbers).
>
> If there are not two neg
1. Sort the array (say arr) (O(nlgn)
2. Find the position of 0 in the array. The left of the array would be all -ve
and right of the array is all positive. Say zi is the position of zero, so
indices [0, zi) are all -ve and (zi, n-1] are all +ve. (O(lgn). If 0 is not
there in the array, we can st
How about the following,
No. of apples = N
No. of baskets = M
Capacity of baskets = [C1, C2, , Cm]
P = capacity utilization = N/(C1 + C2 + ... + Cm)
Apples in i'th basket = Ci*P
Of course (Ci*P) need not be integeral. Perhaps we can try rounding it to
nearest integer and see if their some
__
From: Dave
To: Algorithm Geeks
Sent: Wednesday, 9 September, 2009 2:42:26 AM
Subject: [algogeeks] Re: random number...
Manish, your first approach doesn't work. You will notice that b1, b2,
and b3 each are 0 2/5 of the time and 1 3/5 of the time, so the return
va
8, 2009 at 8:35 PM, manish bhatia wrote:
Assign 0 to K numbers to all K colors, such that color -> color_tag (a number
b/w [0,K-1]).
>code[k] = {0,2,..,k-1}
>foreach (permutation from all possible-permuations of code[])
> sort balls[] on the basis of code
Are we able to store the incoming characters?
On Tue, Sep 8, 2009 at 11:51 AM, Bharath wrote:
>Slightly modifying first question.
>
>Check whether a string is palindrome in single pass.
>
>Meaning an online algorithm is required, i.e. it must be able to read
>one character at a time from a stre
I can think of 2 appraches.
[1] Similar to something already suggested. Just adding my 2 cents.
1 to 7 digits can be represented by 3 bits. So going by that,
int rand_1_7() {
b1 = rand_1_5()*(7/5) > (7/2) ? 1 : 0;
b2 = rand_1_5()*(7/5) > (7/2) ? 1 : 0;
b3 = rand_1_5()*(7/5) > (7/2
how about finding all the connected-components and checking which all have 3
edges?
From: ankur aggarwal
To: "i...@mca_2007" ;
lets-talk-g...@googlegroups.com; algogeeks@googlegroups.com
Sent: Sunday, 6 September, 2009 2:58:40 PM
Subject: [algogeeks] find tri
Assign 0 to K numbers to all K colors, such that color -> color_tag (a number
b/w [0,K-1]).
code[k] = {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 aggarw
Could you please elaborate?
From: ankur aggarwal
To: algogeeks@googlegroups.com
Sent: Tuesday, 1 September, 2009 6:01:51 PM
Subject: [algogeeks] Re: Find longest palindrom in a give n string in O(N)
On Tue, Sep 1, 2009 at 2:24 PM, Nayn wrote:
>"Working w
How should a toposort help?
From: ankur aggarwal
To: algogeeks@googlegroups.com
Sent: Thursday, 27 August, 2009 9:15:47 AM
Subject: [algogeeks] Re: path from n1 to n2
@
>_dufus
>
>
>i also think dfs can solve this problem widout topological sort
>
>
A simple DFS should give you this (populating the path as we do the traversal).
Now only question is when we get a forward-edge, i.e. a convergence-point, we
have two options,
(Assuming that while coming back after hitting n2, we keep marking vertices
which have n2 in the fanout, similarly mark
Suppose nCp represents n!(n-p)!/p!
The product of the following should be the answer,
nC2 x (n-1)C2 x (n-2) x ... x 2C2
The above assumes that merger of company K1 with K2, gives rise to a new
company K12, and merger of K12 with K3, and K13 with K2 is different.
How does it sound?
list lastNWords contains last N words, first being the one encountered
most recently
// suppose following function gets called whenever a new word is encountered
void addNewWord(string newWord, map::iterator>& mp,
list& lastNWords)
{
lastNWords.push_front(newWord);
if(mp.find(newWord) !
Keep adding the digits till you are reduced to single digit. Then check if it
is 3, 6 or 9
From: richa gupta
To: programming-puzzles ; algogeeks
Sent: Friday, 14 August, 2009 1:15:13 PM
Subject: [algogeeks] Check divisibility by 3
can we check the divisibi
Well instead of using extra memory, we can in-place sort the arraay in
O(nlog(n)) and then do an iteration (O(n)) to find out the repeated number. But
the catch is that number is repeated 2^i times. That is the hint we should use
From: ankur aggarwal
To: alg
He meant alternate-spellings! Just like you get from MS-Word et. al.
From: Vikram Sridar
To: algogeeks@googlegroups.com
Sent: Friday, 31 July, 2009 7:03:54 PM
Subject: [algogeeks] Re: Spell Checker
Alternatives?? what way??
In terms of implementation or provi
and insert into queue.
3. Repeat steps one and two till queue is empty.
Please suggest the solution that can fit in loop of any level down.
--
With Best Regards...
---
Manish
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
).
>
>
> On Nov 17, 3:42 pm, geekko <[EMAIL PROTECTED]> wrote:
> > Suppose that you have an array of integers. Given a number X are there
> > any two numbers in the array in which their summation is equal to the
> > X? Can you find a solution in O(n)?
&
>
>
> Selecting a rectangle is O(log N * M) where M is the number of
> datapoints in the 'band'.
> Anyone know of anything better?
>
i think u can come up with an proof that we can make any algorithm that has
complexity less then O(log N * M)...if u have all point array sorted...
one more thing..
me some pointers please? TIA.
> >
> > What regular expression might that be? What's the connection between
> > the title of your post and the problem you are trying to solve?
> > Can you be a little more precise?
>
>
> >
>
--
With Best Regards...
-
1 - 100 of 107 matches
Mail list logo