wats eligibility n package?
On Thu, Sep 22, 2011 at 12:26 AM, sagar pareek sagarpar...@gmail.comwrote:
nit allahabad
On Thu, Sep 22, 2011 at 12:20 AM, arpit rajpurohit
arpit.rajpuro...@gmail.com wrote:
which college may i know?
On Wed, Sep 21, 2011 at 11:29 PM, sagar pareek
i found a question of ms earlier but know i not able to find
it.plz post link or thread
i/p::a3b2c4:
o/p:aaabb
i/p:aaabbc
o/p:a3b2c1
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
starting from right find first digit less then right most digit,if no any
digit is less,then move to next right most and compair when found
exchange those no,
now sort the no.s up to that index of the given no which is exchanged:
Ex:
43987723893239876
first required sequence:
plz post the written test n interview question...thnx in advance
On Thu, Sep 22, 2011 at 8:59 AM, saurabh sah.saurab...@gmail.com wrote:
I sincerely thank this group as i got selected in Microsoft IDC only
because
of this group .
It was a wonderful experience for me at the interviews
congrats :) and share ur experiences
On Sep 22, 11:28 am, rahul sharma rahul23111...@gmail.com wrote:
plz post the written test n interview question...thnx in advance
On Thu, Sep 22, 2011 at 8:59 AM, saurabh sah.saurab...@gmail.com wrote:
I sincerely thank this group as i got selected
@kartik : to some extent ur code is giving the right answer... btw
somehow check tis
let for example the no be 759854
then the next biggest no is 794558
btw ur program is giving 795854 which is undoubtedly wrong
the code would give more appropriate result if u sort the numbers from
Congrats !!!1
--
Regards
Suraj Fale
+91-9766103115
--
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
Congrats dude...
On 22 September 2011 07:29, saurabh sah.saurab...@gmail.com wrote:
I sincerely thank this group as i got selected in Microsoft IDC only
because
of this group .
It was a wonderful experience for me at the interviews because the
some of questions were closely related to the
congrats dude
On Thu, Sep 22, 2011 at 12:46 PM, Suraj Fale surajfa...@gmail.com wrote:
Congrats !!!1
--
Regards
Suraj Fale
+91-9766103115
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
@Ratan:
i think the next largest here would be 784559
On Thu, Sep 22, 2011 at 12:39 PM, Ratan success.rata...@gmail.com wrote:
@kartik : to some extent ur code is giving the right answer... btw
somehow check tis
let for example the no be 759854
then the next biggest no is 794558
btw ur
for interview ques 1 ..
fink ak 's position using normal binary search in original list ..log
n
postion of a1 in corrupted list is n-k+1 .. O(1)
eg : original : 0 1 2 3 4
corrupted : 3 4 0 1 2
n=5, k=3 , hence the ans 2...correct me if m wrong
@ anup .. can u explain solution through
thanx Balaji:)
On Thu, Sep 22, 2011 at 6:07 AM, Balaji balaji.subraman...@gmail.comwrote:
Hi Anil,
#a is a preprocessor operator to convert the argument specified as string
or enclosing in double quotes. so, after macro expansion, the printf
statement would become
printf(%d\n,*432); =
@dheeraj ... ya u r ryt thnxs for the correction
On Thu, Sep 22, 2011 at 1:30 PM, Dheeraj Sharma
dheerajsharma1...@gmail.com wrote:
@Ratan:
i think the next largest here would be 784559
On Thu, Sep 22, 2011 at 12:39 PM, Ratan success.rata...@gmail.com wrote:
@kartik : to some extent ur
#includeiostream
#includeconio.h
#includestring.h
#define swap(a,b,c) (c)=(a),(a)=(b),(b)=(c)
using namespace std;
int main()
{
char str[100],t;
cinstr;
int len=strlen(str);
int i,x,boo=1;
for(i=len-1;i0boo;i--)
{
for(x=i-1;x=0boo;x--)
{
for 2nd one
#includeiostream
#includeconio.h
using namespace std;
int main()
{
char str[100];
cinstr;
char ch=str[0];
int count=0,i=0;
while(str[i])
{
if(str[i]==ch)
count++;
else
{
for 1st
#includeiostream
#includeconio.h
#includestring.h
using namespace std;
int main()
{
char str[100];
cinstr;
int len=strlen(str);
int i=1;
while(ilen)
{
int x=str[i]-48;
while(x--)
coutstr[i-1];
i+=2;
@ratan suggest some efficient 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.
in nlog(n)
#includeiostream
#includeconio.h
#includestring.h
#define swap(a,b,c) (c)=(a),(a)=(b),(b)=(c)
using namespace std;
int t;
void quicksort(char arr[],int left,int right)
{
if(leftright)
{
int piv=right;
int i=left,j=left;
Keep a pointer ont the rightmost digit. Keep moving right until you find the
number in increasing number. As soon as this breaks. stop. Swap the digit at
the current position with the smallest digit, but larger than the current
position digit, sort the array to the right of the current position in
@deeraj : for i/p 7585 u'r code is giving 7855 ..
On Thu, Sep 22, 2011 at 6:54 AM, algo geek geeka...@gmail.com wrote:
Keep a pointer ont the rightmost digit. Keep moving right until you find
the number in increasing number. As soon as this breaks. stop. Swap the
digit at the current position
@algo geek:
there is some error in your logic...
consider a number 759845
according to ur logic the number greater than this will be 784559
but it should be 759854
.
On Thu, Sep 22, 2011 at 4:24 PM, algo geek geeka...@gmail.com wrote:
Keep a pointer ont the rightmost digit. Keep
the following pseudocode may work:
for(i=l;i=0;i--)
{
if(a[i-1]a[i])
{
swap(a[i-1],a[i]);
sort(a,i,l);
swap(a[i-1],a[l]);
break;
}
}
here sort is a function that sort the array from index i to l.
On Thu, Sep 22, 2011 at 4:38 PM, bharatkumar bagana
@kartik:
i thnk u r searching for string...that may have characters..in the 2d matrix
..NO MATTER WHERE THEY ARE..
On Wed, Sep 21, 2011 at 7:10 PM, kartik sachan kartik.sac...@gmail.comwrote:
i think i can solve this in O(n^2)
here is code http://ideone.com/Gk69A
# includestdio.h#
my logic: if wrong then plz tell...
start from rightmost digit and search towards left a digit less than this...
if found ... just swap...u got the answer... if no small digit found then
select second rightmost digit and follow the same process...and so on...
for ex: 759354
rightmost
inorder traversal will do the job... just make sure to create links...
On Thu, Sep 22, 2011 at 1:48 AM, Gene gene.ress...@gmail.com wrote:
#include stdio.h
typedef struct node_s {
int data;
struct node_s *left, *right;
} NODE;
// Convert BST to a sorted list connected by -right
the answer should be 759435...
On Thu, Sep 22, 2011 at 4:45 PM, Yogesh Yadav medu...@gmail.com wrote:
my logic: if wrong then plz tell...
start from rightmost digit and search towards left a digit less than this...
if found ... just swap...u got the answer... if no small digit found then
@ratan: thanks for correction little correction in my logic...
start from rightmost digit and search towards left a digit less than this...
if found ... just swap...now after swapping save the index with which you
are swapping ...and after that sort the array in ascending order...u got the
It can be used for Call back Functions
--Mayuresh S. Gandhewar
On Sep 22, 9:29 am, anshu mishra anshumishra6...@gmail.com wrote:
as function object also
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
int main()
{
int a=256;
char *p=a;
*++p=2;
printf(%d,a);
return(0);
}
--
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
@yogesh nice algo...
it is not even required to sort the left out array, just reverse it :)
On Thu, Sep 22, 2011 at 5:05 PM, Yogesh Yadav medu...@gmail.com wrote:
@ratan: thanks for correction little correction in my logic...
start from rightmost digit and search towards left a digit
around 11.5 LPA gross
Regards,
Adi Srikanth.
Mob No 9887233349
Personal Pages: adisrikanth.co.nr
On Thu, Sep 22, 2011 at 11:55 AM, rahul sharma rahul23111...@gmail.comwrote:
wats eligibility n package?
On Thu, Sep 22, 2011 at 12:26 AM, sagar pareek sagarpar...@gmail.comwrote:
nit
Ans. 512
...
On Thu, Sep 22, 2011 at 5:38 PM, Rohit Upadhyaya mailtoroh...@gmail.comwrote:
int main()
{
int a=256;
char *p=a;
*++p=2;
printf(%d,a);
return(0);
}
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
suppose adress of a = 0x12;
0x12 has
0x13 has 0001
so p = 0x12;
p++ = 0x13;
now modifying the value pointed p by will modify the only 0x13 bcoz it is
char type pointer and its value wiil be 0010
so finally 0x12 to 0x15 will have 512
--
You received this message because you are
512
Because:
a will have the binary value of 256.
a is an integer, so it will be stored over 4 bytes like this:
a
0001
byte1 byte2 byte3 byte4
now a char pointer with point to one byte., and here the first byte.
p
\/
0001
byte1 byte2 byte3 byte4
incrementing p
isn't that simply because if little indian endian way of storing bytes in
memory
initial -- 0001 0..
finally-- 0010 0..
On Sep 22, 2011 5:38 PM, Rohit Upadhyaya mailtoroh...@gmail.com wrote:
int main()
{
int a=256;
char *p=a;
*++p=2;
printf(%d,a);
congrats dude
hope u will be well connected with this group and help others to
achieve their goals
On Sep 22, 8:29 am, saurabh sah.saurab...@gmail.com wrote:
I sincerely thank this group as i got selected in Microsoft IDC only
because
of this group .
It was a wonderful experience for me at
n=n+1
n++
++n
which of the three is better ??
Sahil Garg
Computer Engg. DCE
--
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
number will be sored in 2'scomplement form .as 4=100 so its 1's comlement
form will be 011 and adding 1 to it will result in 011+1=100.so -4 will be
printed
On Wed, Sep 21, 2011 at 10:23 AM, kartik sachan kartik.sac...@gmail.comwrote:
@ravi i think ur concepts is correct the no is stored in
Congrats buddy.
Can you please post the interview questions here. It helps.
Thanks,
Mani
On Thu, Sep 22, 2011 at 6:22 PM, abhishek abhishek.ma...@gmail.com wrote:
congrats dude
hope u will be well connected with this group and help others to
achieve their goals
On Sep 22, 8:29 am,
hey.. plz post your experience??
Sahil Garg
Computer Engg. DCE
On Wed, Aug 3, 2011 at 11:54 PM, Deepak deepakthegi...@gmail.com wrote:
Can anyone pls post Paypal written questions and important subjects or
topics to prepare for written as well as for tech interview?? Thanks
in advance...
hey plz post ur experience??
Sahil Garg
Computer Engg. DCE
On Mon, Aug 8, 2011 at 8:43 PM, siva viknesh sivavikne...@gmail.com wrote:
not sure i m also gonna attend wit u only if u r from anna univ :P
On Aug 6, 7:44 pm, swetha rahul swetharahu...@gmail.com wrote:
Thanks Siva... Is it
prefix operator is better.the compiler does not have to maintain the
copy of the variable as in the postfix operator ..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
thanx to all
I have shared my interview experience at
http://msidcinterview.blogspot.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
thanx to all
@sanjay I have shared my interview experience at
http://msidcinterview.blogspot.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,
@bharat...so i thnk 7585 shud hav 7855 as ans..!!
On Thu, Sep 22, 2011 at 5:42 PM, Arpit Sood soodfi...@gmail.com wrote:
@yogesh nice algo...
it is not even required to sort the left out array, just reverse it :)
On Thu, Sep 22, 2011 at 5:05 PM, Yogesh Yadav medu...@gmail.com wrote:
@dheeraj i didn't get what u want to say explain me with the help of example
--
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
Saurabh : Thank u very much :)
Sanju
:)
On Thu, Sep 22, 2011 at 6:15 AM, saurabh sah.saurab...@gmail.com wrote:
thanx to all
@sanjay I have shared my interview experience at
http://msidcinterview.blogspot.com/
--
You received this message because you are subscribed to the Google Groups
No modern compiler will see these as different. Use the one you find
prettiest.
On Sep 22, 8:54 am, Sahil Garg garg.sahi...@gmail.com wrote:
n=n+1
n++
++n
which of the three is better ??
Sahil Garg
Computer Engg. DCE
--
You received this message because you are subscribed to the
If the value of the expression is not being used, ++n is preferred.
Most coding standards used by big companies require the prefix
operator to be used unless the pre-incremented value is required.
Don
On Sep 22, 7:54 am, Sahil Garg garg.sahi...@gmail.com wrote:
n=n+1
n++
++n
which of the
12.5
On Thu, Sep 22, 2011 at 5:49 PM, Adi Srikanth adisriika...@gmail.comwrote:
around 11.5 LPA gross
Regards,
Adi Srikanth.
Mob No 9887233349
Personal Pages: adisrikanth.co.nr
On Thu, Sep 22, 2011 at 11:55 AM, rahul sharma rahul23111...@gmail.comwrote:
wats eligibility n package?
@balaji +1 :)
On Thu, Sep 22, 2011 at 2:01 PM, Anil Arya anilarya...@gmail.com wrote:
thanx Balaji:)
On Thu, Sep 22, 2011 at 6:07 AM, Balaji balaji.subraman...@gmail.comwrote:
Hi Anil,
#a is a preprocessor operator to convert the argument specified as string
or enclosing in double
Can anyone tell me some suggestions to prepare for Pep exam...?
--
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
Depends on compiler architecture , and how they
use instruction set architecture ( Increment Op) of underlining machine
On Thu, Sep 22, 2011 at 7:21 AM, Don dondod...@gmail.com wrote:
If the value of the expression is not being used, ++n is preferred.
Most coding standards used by big
depends on the requirement of the code...
On Thu, Sep 22, 2011 at 11:00 AM, DIPANKAR DUTTA dutta.dipanka...@gmail.com
wrote:
Depends on compiler architecture , and how they
use instruction set architecture ( Increment Op) of underlining machine
On Thu, Sep 22, 2011 at 7:21 AM, Don
awesome :)
On Thu, Sep 22, 2011 at 7:55 PM, amrit harry dabbcomput...@gmail.comwrote:
@balaji +1 :)
On Thu, Sep 22, 2011 at 2:01 PM, Anil Arya anilarya...@gmail.com wrote:
thanx Balaji:)
On Thu, Sep 22, 2011 at 6:07 AM, Balaji balaji.subraman...@gmail.comwrote:
Hi Anil,
#a is a
how we can remove error ?
#includeiostream
using namespace std;
class time
{
int m;
int h;
public:
void set(int,int);
void sum(time,time,time);
void display();
};
void time::set(int x,int y)
{
m=x;
h=y;
}
void time::sum(time t1,time t2,time t3)
{
m=t1.m+t2.m+t3.m;
h=t1.h+t2.h+t3.h;
}
void
Give us some help. What is the error? Syntax error? Logic error?
Runtime error?
On Sep 22, 10:47 am, Rajesh Kumar testalgori...@gmail.com wrote:
how we can remove error ?
#includeiostream
using namespace std;
class time
{
int m;
int h;
public:
void set(int,int);
void
#includeiostream.h
class time
{
int m;
int h;
public:
void set(int,int);
void sum(time,time,time);
void display();
};
void time::set(int x,int y)
{
m=x;
h=y;
}
void time::sum(time t1,time t2,time t3)
{
m=t1.m+t2.m+t3.m;
h=t1.h+t2.h+t3.h;
}
void time::display(void)
{
coutminute==mendl;
not working by changes provide by you
On Thu, Sep 22, 2011 at 9:42 PM, payal gupta gpt.pa...@gmail.com wrote:
#includeiostream.h
class time
{
int m;
int h;
public:
void set(int,int);
void sum(time,time,time);
void display();
};
void time::set(int x,int y)
{
m=x;
h=y;
}
void
plz help 4 me..
Is thr any1 knw how to write the code in trust
calculation?...
On Thu, Sep 22, 2011 at 9:57 PM, Rajesh Kumar testalgori...@gmail.comwrote:
not working by changes provide by you
On Thu, Sep 22, 2011 at 9:42 PM, payal gupta gpt.pa...@gmail.com wrote:
Interview Questions and Experiences(Jeeva):
This is the most easiest interview I’ve seen compared to
microsoft,amazon,directi and morgan stanley. They’ve just asked basics
in all.
Technical interview 1:
First he asked about the subjects I’m studying this semester(I
couldn’t remenber
How will u detect if a queue is circular or not??
--
Kind Regards
Ishan Aggarwal
[image: Aricent Group]
Presidency Tower-A, M.G.Road,Sector-14
Gurgaon,Haryana.122015 INDIA
Phone : +91-9654602663
ishan2.aggar...@aricent.com puneet.ar...@aricent.com
--
You received this message because you are
first round was mixture of c , cpp , very few general aps and few
subjective ques
print semicolon without using semicolon anywhere in program
2 trains in opposite dir...wat time they ll meet...
On Sep 22, 9:36 pm, siva viknesh sivavikne...@gmail.com wrote:
Interview Questions and
queue represnted as array or linked list ?
On Thu, Sep 22, 2011 at 10:08 PM, Ishan Aggarwal
ishan.aggarwal.1...@gmail.com wrote:
How will u detect if a queue is circular or not??
--
Kind Regards
Ishan Aggarwal
[image: Aricent Group]
Presidency Tower-A, M.G.Road,Sector-14
In both the cases... what would be the condition?
On Thu, Sep 22, 2011 at 10:19 PM, sukran dhawan sukrandha...@gmail.comwrote:
queue represnted as array or linked list ?
On Thu, Sep 22, 2011 at 10:08 PM, Ishan Aggarwal
ishan.aggarwal.1...@gmail.com wrote:
How will u detect if a queue is
got 45 on linux
than tried with fflush(stdout) and got 9 which is correct . so I guess that
both child and parent process getting the same buffer and thus resulting in
more number of hello
correct answer is 9 as already mentioned
On Sep 21, 2011 7:57 PM, sush57 sushaant...@gmail.com wrote:
Hi
I have a doubt in functioning of realloc. Can we use realloc to shrink
the memory already allocated ? If yes, will it also free the left over
memory or programmer has to do it ? Also, while reallocating if it has
to move to some other location does the earlier location gets freed or
is it
congrats brother!!
On Thu, Sep 22, 2011 at 6:42 PM, saurabh sah.saurab...@gmail.com wrote:
thanx to all
I have shared my interview experience at
http://msidcinterview.blogspot.com/
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
use hair and tortoise rule for lists
i don think we can do it for arrays
On Thu, Sep 22, 2011 at 10:22 PM, Ishan Aggarwal
ishan.aggarwal.1...@gmail.com wrote:
In both the cases... what would be the condition?
On Thu, Sep 22, 2011 at 10:19 PM, sukran dhawan sukrandha...@gmail.comwrote:
congrats
On Thu, Sep 22, 2011 at 10:33 PM, Prakash D cegprak...@gmail.com wrote:
congrats brother!!
On Thu, Sep 22, 2011 at 6:42 PM, saurabh sah.saurab...@gmail.com wrote:
thanx to all
I have shared my interview experience at
http://msidcinterview.blogspot.com/
ta
--
You received
time is a keyword in c/cpp, change time to any other string in ur code nd it
will work.
On Thu, Sep 22, 2011 at 12:27 PM, Rajesh Kumar testalgori...@gmail.comwrote:
not working by changes provide by you
On Thu, Sep 22, 2011 at 9:42 PM, payal gupta gpt.pa...@gmail.com wrote:
Realloc will resize a block of memory larger or smaller. If it
requires that the block be moved, it will copy the contents of the old
memory into the new location and free the old memory.
Don
On Sep 22, 12:01 pm, Ankuj Gupta ankuj2...@gmail.com wrote:
Hi
I have a doubt in functioning of
@rahul
+1
On Thu, Sep 22, 2011 at 11:20 PM, rahul vatsa vatsa.ra...@gmail.com wrote:
time is a keyword in c/cpp, change time to any other string in ur code nd
it will work.
On Thu, Sep 22, 2011 at 12:27 PM, Rajesh Kumar testalgori...@gmail.comwrote:
not working by changes provide by you
thanx Rahul
On Thu, Sep 22, 2011 at 11:54 PM, abhinav gupta abhinav@gmail.comwrote:
@rahul
+1
On Thu, Sep 22, 2011 at 11:20 PM, rahul vatsa vatsa.ra...@gmail.comwrote:
time is a keyword in c/cpp, change time to any other string in ur code nd
it will work.
On Thu, Sep 22, 2011 at
eg : original : 0 1 2 3 4
corrupted : 3 4 0 1 2
this can be done as below..
compare the middle element with first and the last element..
if middle first
chk for first half
else
chk for second half
above eg.
middle = 0
first = 3
last = 2
as 03
consider 3 4 0
middle = 4
first =
Hi Frnds
Can anybody suggest me some questions typically asked on Graphs .
Couldnt find much in the internet
If some one can share link or few questions on Graphs it will be really
helpful
Thanks in Advance
Ankur
--
You received this message because you are subscribed to the Google Groups
(1) What is the efficient approach to generate permutations of a given
sequence of numbers (may contain duplicates) in lexicographic order
e.g. i/p: 5,1,6,1
o/p:
1 1 5 6
1 1 6 5
1 5 1 6
1 5 6 1
1 6 1 5
1 6 5 1
5 1 1 6
5 1 6 1
5 6 1 1
6 1 1 5
6 1 5 1
6 5 1 1
what is the time complexity of ur
thnx siva..
Sahil Garg
Computer Engineering
Delhi College of Engineering
On Thu, Sep 22, 2011 at 10:10 PM, siva viknesh sivavikne...@gmail.comwrote:
first round was mixture of c , cpp , very few general aps and few
subjective ques
print semicolon without using semicolon anywhere in
11.5 fr our college
they will hve online test .. 3 coding question and u need to attempnt any
two ..25mcq's .. mcq;s wer mostly frm sql ..
Q- Given a linked list find whether the linked list is palindrome or not. I
gave him solution by modifying the linked list then i gave solution using
extra
those three question they ASKD me in interview nt in coding round n they are
very particular abt coding
On Fri, Sep 23, 2011 at 1:53 AM, aditya kumar
aditya.kumar130...@gmail.comwrote:
11.5 fr our college
they will hve online test .. 3 coding question and u need to attempnt any
two ..25mcq's
Start by making a copy of the input array containing the sequence of
numbers. Sort the array. We'll call the copy A[n].
permute(int *a, int n, int k, int p=0)
{
if (p == k) output(a);
else
{
int tmp = a[p];
for(int i = p; i n; ++i)
{
a[p] = a[i];
Start by making a copy of the input array containing the sequence of
numbers. Sort the array. We'll call the copy A[n].
permute(int *a, int n, int p=0)
{
if (p == n) output(a);
else
{
int tmp = a[p];
for(int i = p; i n; ++i)
{
a[p] = a[i];
permute(a,n,p+1,k-1);
Start by making a copy of the input array containing the sequence of
numbers. Sort the array. We'll call the copy A[n].
permute(int *a, int n, int p=0)
{
if (p == n) output(a);
else
{
int tmp = a[p];
for(int i = p; i n; ++i)
{
a[p] = a[i];
a[i] = tmp;
Given an undirected graph in which each edge has a capacity, find the
maximum capacity from node A to node B.
Given a directed graph where each edge has a cost, find the lowest
cost path from node A to node B.
Find the minimal spanning tree of a weighted, connected graph.
On Sep 22, 2:03 pm,
Isn't it simply finding the next permutation of a number???
On Thu, Sep 22, 2011 at 7:01 PM, Dheeraj Sharma dheerajsharma1...@gmail.com
wrote:
@bharat...so i thnk 7585 shud hav 7855 as ans..!!
On Thu, Sep 22, 2011 at 5:42 PM, Arpit Sood soodfi...@gmail.com wrote:
@yogesh nice algo...
it
Thanks Don :)
On Fri, Sep 23, 2011 at 2:51 AM, Don dondod...@gmail.com wrote:
Given an undirected graph in which each edge has a capacity, find the
maximum capacity from node A to node B.
Given a directed graph where each edge has a cost, find the lowest
cost path from node A to node B.
I have seen code and output but I think it should be 7965 am i right? if you
are looking for first largest
On Thu, Sep 22, 2011 at 12:46 AM, Anil Arya anilarya...@gmail.com wrote:
http://ideone.com/pmil8
On Thu, Sep 22, 2011 at 12:46 AM, Anil Arya anilarya...@gmail.com wrote:
@kartik
Is
@kartik.,...where are u searching..that ..the next character should be
present..only around the 8 possible locations around that character
On Thu, Sep 22, 2011 at 6:34 AM, kartik sachan kartik.sac...@gmail.comwrote:
@dheeraj i didn't get what u want to say explain me with the help of
example
can anybody tell me the pattern of amdocs written test and interview qus.
its urgent so plz
--
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
congrats dude
On Thu, Sep 22, 2011 at 10:51 PM, sukran dhawan sukrandha...@gmail.comwrote:
congrats
On Thu, Sep 22, 2011 at 10:33 PM, Prakash D cegprak...@gmail.com wrote:
congrats brother!!
On Thu, Sep 22, 2011 at 6:42 PM, saurabh sah.saurab...@gmail.com wrote:
thanx to
@Yogesh Yadav
algo geek's approach is correct. With your number 759845. When you start
moving left from right most integer, you stop when the numbers are no longer
in increasing order, in this case you stop at first integer i.e, at 5 and
swap with 4. Which gives exactly same correct answer as you
91 matches
Mail list logo