Hey, can u pls explain the 1st statement.. 4*f(OED)=f(OBC) --- from
similarity ?
Y is it 4 times??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
Segregate the Odd and even nodes in the list by traversing in O(n). Then
print the resulting list in O(n). So no additional space required and
solution in O(n) time also :)
*Muthuraj R
IV th Year , ISE
PESIT , Bangalore*
On Fri, Aug 19, 2011 at 9:48 AM, priya ramesh
If a,b are not equal then this statement will always return true status as
a^b=true so true bit-wise or-ed with anyone will return true.
On Sun, Aug 21, 2011 at 10:38 AM, SHUBHAM BANSAL
shubham.bans...@gmail.comwrote:
((a^b) | ((ab)1))
sorry tht was bitwise or..by mistak i hd wrote logicl or
hey how is area of ECD = 6?
EC is not a diagonal so its not 6
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/rFxNlxmIHoUJ.
To post to this group, send email
only M is married.
On Sat, Aug 20, 2011 at 7:53 PM, Arun Vishwanathan
aaron.nar...@gmail.comwrote:
@DK:if L is married to M according to you finally , then what does the
third if then statement according to you mean when it is given that if L is
not married then M is married?
On Fri, Aug
hey got it!
the ans s 2 :)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/r4I_8-_6hy8J.
To post to this group, send email to algogeeks@googlegroups.com.
To
see array is sorted when all zeros occur before 1s in each row.
Now see ur input. My algo will work only for sorted array.
On 8/20/11, rashmi i rash...@gmail.com wrote:
will your solution work for:
0001
0010
0100
0110
1000
On Sun, Aug 21, 2011 at 10:29 AM, sachin sabbarwal
I think it will not be an error.
This is because X() will create a temporary object, and when the
object is returned in the function calling it, then default copy
constructor will do bitwise copy of data members in the calling
function.
Correct me if m wrong.
On 8/20/11, sachin sabbarwal
It will show error
On Sun, Aug 21, 2011 at 12:21 PM, Sanjay Rajpal srn...@gmail.com wrote:
I think it will not be an error.
This is because X() will create a temporary object, and when the
object is returned in the function calling it, then default copy
constructor will do bitwise copy of
But if you try making a copy constructor of your own and check whether it is
called or not.it does not.
On Sun, Aug 21, 2011 at 12:21 PM, Sanjay Rajpal srn...@gmail.com wrote:
I think it will not be an error.
This is because X() will create a temporary object, and when the
object is
if the cyclist would have left on time, then in those 20 minutes, he would
have covered 4miles at a speed of 12miles/h
so he would have been 1 mile before station whereas train would have been 5
miles before as it is on its normal time, so no change in its position.
then, when the cyclist covers
techendeavour is abt to visiting
so plz share some info.. abt written or interview.
--
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
u mean dutch algorithm ?
On Sun, Aug 21, 2011 at 11:31 AM, muthu raj muthura...@gmail.com wrote:
Segregate the Odd and even nodes in the list by traversing in O(n). Then
print the resulting list in O(n). So no additional space required and
solution in O(n) time also :)
*Muthuraj R
IV th
class base
{
public:
int bval;
base(){bval=0;}
};
class deri:public base
{
public:
int dval;
deri(){dval=1;}
};
void SomeFunc(base *arr,int size)
{
for(int i=0; isize; i++,arr++)
coutarr-bval;
@tushar:
thanks
On Sun, Aug 21, 2011 at 12:27 PM, Tushar Bindal tushicom...@gmail.comwrote:
if the cyclist would have left on time, then in those 20 minutes, he would
have covered 4miles at a speed of 12miles/h
so he would have been 1 mile before station whereas train would have been 5
The code is correct..return X will make a temporary object and for that a
constructor and corresponding destructor will be called and that object is
returned.
On Sun, Aug 21, 2011 at 12:24 PM, Puneet Chawla
puneetchawla...@gmail.comwrote:
It will show error
On Sun, Aug 21, 2011 at 12:21 PM,
because the pointer of base class will move by 2 bytes every time but the
size of derived class is 4 byte.
On Sun, Aug 21, 2011 at 12:31 PM, Puneet Chawla
puneetchawla...@gmail.comwrote:
class base
{
public:
int bval;
base(){bval=0;}
};
class
kkk...not sure
assume no number is greater than 1000(I mentioned There has to be some
additional constraints to make the problem solvable)
Now check 1st element if not the desired element keep multiplying with 2 the
previous range till either one of these condition is satisfied
*1.An exception
Wil u please explain in context of o/p.means how 1 whn SomeFunc(DeriArr,5);
stmt is executed how 0 and 1 will come..???
On Sun, Aug 21, 2011 at 12:40 PM, Naman Mahor naman.ma...@gmail.com wrote:
because the pointer of base class will move by 2 bytes every time but the
size of derived class is
#includeiostream
using namespace std;
class base
{
public:
int bval;
base(){bval=0;}
};
class deri:public base
{
public:
int dval;
deri(){dval=1;}
};
void SomeFunc(base *arr,int size)
{
for(int i=0;
dude u haven't used copy constructor properly .. check it out again ... you
are not copying actually ... thats it ...
On Sun, Aug 21, 2011 at 12:53 PM, Abhishek Yadav algowithabhis...@gmail.com
wrote:
Check this code: the thing i couldn't understand is when the object is
being returned
@Naman : Can you tell me why the value of dval is accessed via bval of base
class ? I got ur point but still confused about it.
Sanju
:)
On Sun, Aug 21, 2011 at 12:16 AM, Naman Mahor naman.ma...@gmail.com wrote:
#includeiostream
using namespace std;
class base
{
what are you trying to say?...can you please explain?
On Sun, Aug 21, 2011 at 1:35 PM, JAIDEV YADAV jaid...@gmail.com wrote:
try to use X b = a ; b.fun() ;
On Sun, Aug 21, 2011 at 1:33 PM, Abhishek Yadav
algowithabhis...@gmail.com wrote:
ok...may be i forgot , can you please tell me
while(a)
(
a=(a-1)
count++
)
counts number of 1s in number 'a'..
Loop can be breaken if count exceeds 16..
On 8/21/11, himanshu kansal himanshukansal...@gmail.com wrote:
problem: There is an array containing integers.
for every bit in the integer,you have to print a 1 if no of 1s
Similary as we are counting set bits count 0's nd cmpare nd set 1 if
coutn(1)count(0) for each integer in array
On Sun, Aug 21, 2011 at 1:44 PM, Sanjay Rajpal srn...@gmail.com wrote:
@Dheeraj : I think u should review the problem again.
What u have posted is a way to find no. of set bits in a
yeah i took it in the another way..i ll post it v soon
On 8/21/11, himanshu kansal himanshukansal...@gmail.com wrote:
problem: There is an array containing integers.
for every bit in the integer,you have to print a 1 if no of 1s
corresponding to that bit is more than no of 0s corresponding
can u elobarate on ur algo ? its a singly linked circular list .so its diff
to apply dutch method.
On Sun, Aug 21, 2011 at 11:31 AM, muthu raj muthura...@gmail.com wrote:
Segregate the Odd and even nodes in the list by traversing in O(n). Then
print the resulting list in O(n). So no additional
Pls have a look at this site...
sqlauthority.com
On 21-Aug-2011 11:44 AM, sachin sabbarwal algowithsac...@gmail.com
wrote:
plz suggest some link where i can get questions on sql queries to
practice.
thanks in advance!!
--
You received this message because you are subscribed to the Google
let n be the no.of integers in the array :
int i=1,a;
int zero,one;
for(int a=1;a=32;a++)
{
zero=0;
one=0;
for(int j=0;jn;j++)
{
if(a[j] i)
{
one++;
}
else
{
Hi,
I have a vectorint A or an array (for C guys) that contains the octal
representation of a number.
So the array can be something like: [1,5,7] or [7,7,5,6,3,4,2] etc
i.e no number in the array can be = 8.
Now given this array, I need to convert it its decimal representation.
The naive way
It would work i guess
On Aug 21, 1:49 pm, Sanjay Rajpal srn...@gmail.com wrote:
let n be the no.of integers in the array :
int i=1,a;
int zero,one;
for(int a=1;a=32;a++)
{
zero=0;
one=0;
for(int j=0;jn;j++)
{
if(a[j] i)
Can you explain me shortly how 5.375 is converted into normalised
form...How to find mantissa and Exponent in this case? Plz Explain
meVijay
On Sun, Aug 21, 2011 at 1:25 PM, Rahul Tiwari rahultiwari6...@gmail.comwrote:
On Sun, Aug 21, 2011 at 11:11 AM, Rahul Tiwari
This problem can be reduced if we are taking whole 32 bits...
Mean left most all 0's bits are also including
then if number is less than 65535 (2^16-1) then make it 0
as 16 bits are at least zero in this case
On Sun, Aug 21, 2011 at 2:19 PM, Sanjay Rajpal srn...@gmail.com wrote:
let n be
yeah bt..when we talk abt the complexity..we consider abt the worst case
On 8/21/11, himanshu kansal himanshukansal...@gmail.com wrote:
problem: There is an array containing integers.
for every bit in the integer,you have to print a 1 if no of 1s
corresponding to that bit is more than no
complexity nd all?
O(n^4) works?
On 8/21/11, prasanth n nprasnt...@gmail.com wrote:
given a matrix with +ve and -ve numbers, find the submatrix with maximum
sum??
--
*prasanth*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to
if we take two pointers..one ahead of another initially..then jump one
of the pointer twice..until it reaches the beginning(printing the
valu) n similar for the another pointer
does ptr-next-next means ha.f travelling the list?
On 8/21/11, muthu raj muthura...@gmail.com wrote:
Segregate the Odd
if we take two pointers..one ahead of another initially..then jump one
of the pointer twice..until it reaches the beginning(printing the
valu) n similar for the another pointer
does ptr-next-next means ha.f travelling the list?
On 8/21/11, muthu raj muthura...@gmail.com wrote:
Segregate the Odd
int num = 0;
for(int i=0;iA.size();i++){
num=num||(A[i]3*i);
}
printf(%d,num);
I think this will do.
On Sun, Aug 21, 2011 at 2:25 PM, sarvesh saran
aquarian.thun...@gmail.comwrote:
Hi,
I have a vectorint A or an array (for C guys) that contains the octal
representation of a number.
So
int num = 0;
for(int i=0;iA.size();i++){
num=num||(A[i]3*i);
}
printf(%d,num);
I think this will do. Given the number is with in the range of integer.
On Sun, Aug 21, 2011 at 3:40 PM, Nitin Nizhawan nitin.nizha...@gmail.comwrote:
int num = 0;
for(int i=0;iA.size();i++){
#includestdio.h
#define FUNC1(i) (i*(i-1))
#define FUNC2(i) (i==0?1:i*FUNC1(i-1))
main()
{
int i=8;
printf(\n%d,FUNC2(i));
}
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
@somya can you plz explain...what do software engineering concepts hae to do
with the gd round??
On Tue, Aug 16, 2011 at 7:47 PM, siva viknesh sivavikne...@gmail.comwrote:
hi can u plz tell me in which areas of aps did they concentrate .. i
mean the topics...work and time, probability ..like
FUNC2(i) = i==0?i*(i-1*(i-1-1))
8==0?1:8*(8-1*(8-1-1))
8==0?1:8*(8-6)
8==0?1:8*2
8==0?1:16
hence it will return 16
On Sun, Aug 21, 2011 at 11:40 AM, SuDhir mIsHra
sudhir08.mis...@gmail.comwrote:
#includestdio.h
#define FUNC1(i) (i*(i-1))
#define FUNC2(i) (i==0?1:i*FUNC1(i-1))
main()
{
8==0?1:8* (8-1*(8-1-1))
this will execute as 8*(8-1(8-2)) = 8*(8-1*6)8*(8-6)===8*2===16
On Sat, Aug 20, 2011 at 7:02 PM, SuDhir mIsHra sudhir08.mis...@gmail.comwrote:
#includestdio.h
#define FUNC1(i) (i*(i-1))
#define FUNC2(i) (i==0?1:i*FUNC1(i-1))
main()
{
int i=8;
+1 to sagar
Sanju
:)
On Sun, Aug 21, 2011 at 3:26 AM, sagar pareek sagarpar...@gmail.com wrote:
FUNC2(i) = i==0?i*(i-1*(i-1-1))
8==0?1:8*(8-1*(8-1-1))
8==0?1:8*(8-6)
8==0?1:8*2
8==0?1:16
hence it will return 16
On Sun, Aug 21, 2011 at 11:40 AM, SuDhir mIsHra
Hi Nitin,
thanks that makes sense. I will try that out.
I have another question. Is there a really fast way of converting a
hexadecimal string say 02F9A to its decimal representation in C++?
thanks,
Sarvesh
thanks,
Sarvesh
On Sun, Aug 21, 2011 at 3:41 PM, Nitin Nizhawan
FUNC2(8)
== 8==0? 1: 8 * FUNC1(8-1)
== 8==0? 1: 8*( 8-1* 8-1-1)
== 8 * (8-8-2)
== -16
but why 16??
On Sat, Aug 20, 2011 at 7:02 PM, SuDhir mIsHra sudhir08.mis...@gmail.comwrote:
#includestdio.h
#define FUNC1(i) (i*(i-1))
#define FUNC2(i) (i==0?1:i*FUNC1(i-1))
main()
{
int i=8;
got it
8==0? 1: 8*( 8 -1* 8-1-1)
== 8*( 8 - {1* 8-1-1})
== 8 * (8-6)
== 16
but why???
On Sun, Aug 21, 2011 at 4:03 PM, Prakash D cegprak...@gmail.com wrote:
== 8==0? 1: 8*( 8-1* 8-1-1)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
@prakash
before posting u should check what others already posted :D :D
On Sun, Aug 21, 2011 at 4:03 PM, Prakash D cegprak...@gmail.com wrote:
FUNC2(8)
== 8==0? 1: 8 * FUNC1(8-1)
== 8==0? 1: 8*( 8-1* 8-1-1)
== 8 * (8-8-2)
== -16
but why 16??
On Sat, Aug 20, 2011 at 7:02 PM, SuDhir
Hi your intention was logical OR or BITWISE OR ?
u did Logical.
Sanju
:)
On Sun, Aug 21, 2011 at 3:30 AM, sarvesh saran
aquarian.thun...@gmail.comwrote:
Hi Nitin,
thanks that makes sense. I will try that out.
I have another question. Is there a really fast way of converting a
:P.. no comments when i saw
On Sun, Aug 21, 2011 at 4:07 PM, sagar pareek sagarpar...@gmail.com wrote:
@prakash
before posting u should check what others already posted :D :D
On Sun, Aug 21, 2011 at 4:03 PM, Prakash D cegprak...@gmail.com wrote:
FUNC2(8)
== 8==0? 1: 8 * FUNC1(8-1)
==
FUNC1(i) (i*(i-1))=so put i-1 as it is on i=so (i-1*(i-1-1)) and i=8
so(8-1*(8-1-1))=(8-1(6))=2 and mul bu 8=16
On Sun, Aug 21, 2011 at 4:03 PM, Prakash D cegprak...@gmail.com wrote:
FUNC2(8)
== 8==0? 1: 8 * FUNC1(8-1)
== 8==0? 1: 8*( 8-1* 8-1-1)
== 8 * (8-8-2)
== -16
but why 16??
A[i]3*i
why is it needed to convert from base 8 to base 10??
On Sun, Aug 21, 2011 at 4:07 PM, Sanjay Rajpal srn...@gmail.com wrote:
Hi your intention was logical OR or BITWISE OR ?
u did Logical.
Sanju
:)
On Sun, Aug 21, 2011 at 3:30 AM, sarvesh saran aquarian.thun...@gmail.com
Hi Prakash,
I'll paste the exact description of the problem:
A non-empty array A of N elements contains octal representation of a
non-negative integer K, i.e. each element of A belongs to the interval [0;
7] (both ends included).
Write a function that returns the number of bits set to 1 in the
doesn it work like below ?
func2(8)= 8 * func1(7)
func1(7)= 7*6
so i=8*7*6???
On Sun, Aug 21, 2011 at 3:58 PM, Sanjay Rajpal srn...@gmail.com wrote:
+1 to sagar
Sanju
:)
On Sun, Aug 21, 2011 at 3:26 AM, sagar pareek sagarpar...@gmail.comwrote:
FUNC2(i) = i==0?i*(i-1*(i-1-1))
Nopes, its a funda of PRE-PROCESSOR directives.
Look before the object code is generated for the program, all the occurences
of the MACROs are replaced with their expansions as such as in the
definition.
So what u r doing is completely wrong.
For more info on MACROs, refer any text book of C.
is 336 the answer??
On Aug 21, 11:10 am, SuDhir mIsHra sudhir08.mis...@gmail.com wrote:
#includestdio.h
#define FUNC1(i) (i*(i-1))
#define FUNC2(i) (i==0?1:i*FUNC1(i-1))
main()
{
int i=8;
printf(\n%d,FUNC2(i));
}
--
You received this message because you are
16
8*(8-1*(8-1-1))
Sanju
:)
On Sun, Aug 21, 2011 at 4:10 AM, Anjul Sharma annurocks1...@gmail.comwrote:
is 336 the answer??
On Aug 21, 11:10 am, SuDhir mIsHra sudhir08.mis...@gmail.com wrote:
#includestdio.h
#define FUNC1(i) (i*(i-1))
#define FUNC2(i) (i==0?1:i*FUNC1(i-1))
main()
Arey yaar just see the my post...
i explained it step by step :)
On Sun, Aug 21, 2011 at 4:43 PM, Sanjay Rajpal srn...@gmail.com wrote:
16
8*(8-1*(8-1-1))
Sanju
:)
On Sun, Aug 21, 2011 at 4:10 AM, Anjul Sharma annurocks1...@gmail.comwrote:
is 336 the answer??
On Aug 21, 11:10 am,
check this link..
http://en.wikipedia.org/wiki/Single_precision_floating-point_format
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/OTIkO_pXQMgJ.
To post
like user interface design etc
On Sat, Aug 20, 2011 at 10:06 AM, Udit Gupta uditgupta...@gmail.com wrote:
@somya can you plz explain...what do software engineering concepts hae to
do with the gd round??
On Tue, Aug 16, 2011 at 7:47 PM, siva viknesh sivavikne...@gmail.comwrote:
hi can u
consider the last two cases
N married L not married
L not married M married
so now tak M and N
compare it with first case
M married N not married
therfore,only m married
On Sun, Aug 21, 2011 at 1:06 PM, Tushar Bindal tushicom...@gmail.comwrote:
@arun
if L is not married, then M must be
@Abhishek:nice algo dude..
On Sat, Aug 20, 2011 at 12:56 PM, Abhishek Yadav algowithabhis...@gmail.com
wrote:
Hey i tried it now and got to another solution
O(log n) solution:
1. try searching for the number , if found,return the node, otherwise, you
will ultimately reach a leaf node say
+1 to 16.
whats the confusion here?
On 21 August 2011 16:44, sagar pareek sagarpar...@gmail.com wrote:
Arey yaar just see the my post...
i explained it step by step :)
On Sun, Aug 21, 2011 at 4:43 PM, Sanjay Rajpal srn...@gmail.com wrote:
16
8*(8-1*(8-1-1))
Sanju
:)
On Sun, Aug
Copy constructor should have been called two times!!1
On Sun, Aug 21, 2011 at 1:38 PM, Abhishek Yadav
algowithabhis...@gmail.comwrote:
what are you trying to say?...can you please explain?h
On Sun, Aug 21, 2011 at 1:35 PM, JAIDEV YADAV jaid...@gmail.com wrote:
try to use X b = a ;
Thank u very much Abhishek for this link, Now I got it ...But also u
explain me in following..
5.375 is represents 0100 1010 1100 means 4 0 A C 0
0 0 0in Hex now how it prints 00 00 AC 40 means can it accepts fm right to
left or L to R I m little
it is not an error.
check this code: I compiled it
#includeiostream
using namespace std;
class X
{
public:
X()
{
}
};
main(){
}
X fun()
{
return X();
}
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Compiler is little endian so as u have typecasted it to char pointer then
0100 1010 1100 means 4 0 A C 0 0 0 0 it will show
o/p byte by byte from LSB.
On Sun, Aug 21, 2011 at 5:47 PM, Vijay Khandar vijaykhand...@gmail.comwrote:
Thank u very much Abhishek for this link,
forgot to mention last byte 00 then 2nd last 00 and so on AC then 40
On Sun, Aug 21, 2011 at 6:00 PM, Puneet Chawla puneetchawla...@gmail.comwrote:
Compiler is little endian so as u have typecasted it to char pointer then
0100 1010 1100 means 4 0 A C 0 0 0 0 it will
I was thinking the same ..byte by byte from R to L thank u very
muchNow i have got it..On Sun, Aug 21, 2011 at 6:01 PM,
Puneet Chawla puneetchawla...@gmail.com wrote:
forgot to mention last byte 00 then 2nd last 00 and so on AC then 40
On Sun, Aug 21, 2011 at 6:00 PM,
Thanks puneet ...
On Sun, Aug 21, 2011 at 6:01 PM, Puneet Chawla puneetchawla...@gmail.comwrote:
forgot to mention last byte 00 then 2nd last 00 and so on AC then 40
On Sun, Aug 21, 2011 at 6:00 PM, Puneet Chawla
puneetchawla...@gmail.comwrote:
Compiler is little endian so as
thnks all . yeah sure will post the questions :)
On Sat, Aug 20, 2011 at 4:29 PM, Akash Mukherjee akash...@gmail.com wrote:
@aditya - basic os networking, ds - esp trees(esp bsts) algo
if needed, refer cracking the coding interview. do post the questions asked
once its over :)
On Sat,
A(OED)=1/4 A(OCB) from similarity area relationship
A(OED)+A(ODC)=6;
A(ODC)+A(OCB)=12;
solve them
A(OED)=2 sq units
On Sun, Aug 21, 2011 at 12:06 PM, Greeshma greeshma.0...@gmail.com wrote:
hey got it!
the ans s 2 :)
--
You received this message because you are subscribed to the Google
A data structure is required for storing a set of integers such that each of
the following operations can be done in (log n) time, where n is the number
of elements in the set. Deletion of the smallest element Insertion of an
element if it is not already present in the set Which of the following
Hint: It is a dp of the form f(n+3) = a*f(n+2) + b*f(n+1) + c*f(n)
Figure a, b, c urself..
VM
NSIT, Dwarka
3rd year, COE
On , Amol Sharma amolsharm...@gmail.com wrote:
Plz help me in solving a simple problem on spoj
http://www.spoj.pl/problems/MAIN113/
i am not able to conclude a general
so which is the right option??
--
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
heap is true but i am not getting y we can't use a balanced binary tree
searching for the smallest is logn(leftmost node), then deleting it is logn
so, should it be both??
thanx :)
On Sun, Aug 21, 2011 at 6:54 PM, sukran dhawan sukrandha...@gmail.comwrote:
its heap
On Sun, Aug 21, 2011 at
Can anyone give me an example of big-endian compiler..???
--
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
hi all,
has Directi visited any of your campus?? if yes then can you share some
details...
Regards,
Navneet Kumar
--
Department of Information Technology,
Indian Institute of Information Technology and Management Gwalior, MP, INDIA
Contact no.:+91-9977935740
--
You received this message
can anyone suggest good link to review Algos and OS concepts
--
thanks
--mac
--
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
Does any one have any idea about the placement procedure of Success
Factors? The kind of questions that they ask in the written test and/
or interview?
Please reply..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
geeksforgeeks.org
careercup.com
On Aug 21, 7:13 pm, MAC macatad...@gmail.com wrote:
can anyone suggest good link to review Algos and OS concepts
--
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
No idea how to solve the problem except the brute force O(n3) approach.I am
looking for a better solution than this. Because of O(1) complexity you
cannot copy and sort the input.
A zero-indexed array A consisting of N integers is given. A triplet (P, Q,
R) is triangular if and
A[P] + A[Q]
Simply sort the array and check for a[i]+a[i+1] a[i+2] for i=0 to n-3.
Sanju
:)
On Sun, Aug 21, 2011 at 7:28 AM, sarvesh saran
aquarian.thun...@gmail.comwrote:
No idea how to solve the problem except the brute force O(n3) approach.I
am looking for a better solution than this. Because of
Hi Sanjay,
*Because of O(1) complexity you cannot copy and sort the input array.
*thanks,
Sarvesh*
*
On Sun, Aug 21, 2011 at 8:00 PM, Sanjay Rajpal srn...@gmail.com wrote:
Simply sort the array and check for a[i]+a[i+1] a[i+2] for i=0 to n-3.
Sanju
:)
On Sun, Aug 21, 2011 at 7:28 AM,
By O(1) we mean that we can use variables, can't use something that equals
size of the i/p array.
Use Quick sort, sorting is done in-place which O(n log n) in time, and O(1)
in space.
Sanju
:)
On Sun, Aug 21, 2011 at 7:31 AM, sarvesh saran
aquarian.thun...@gmail.comwrote:
Hi Sanjay,
Hi Sanjay,
The input is a constant vector. So it cannot be modified. Space requirement
is O(1) so it cannot be copied.
thanks,
Sarvesh
On Sun, Aug 21, 2011 at 8:04 PM, Sanjay Rajpal srn...@gmail.com wrote:
By O(1) we mean that we can use variables, can't use something that equals
size of the
http://www.ideone.com/kRaMj
I found this in the algogeeks forum only. Can anyone explain how value of i
is still 0, but *p shows 2 although their addresses are the same.
--
Nikhil Gupta
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
Hi Sanjay
I think i forgot to mention that in my original post..so sorry about that.
It is a constant array and should not be modified.
thanks,
Sarvesh
On Sun, Aug 21, 2011 at 8:08 PM, sarvesh saran
aquarian.thun...@gmail.comwrote:
Hi Sanjay,
The input is a constant vector. So it cannot
thanks .. any os specific ??
--mac
On Sun, Aug 21, 2011 at 7:57 PM, Navneet navneetn...@gmail.com wrote:
geeksforgeeks.org
careercup.com
On Aug 21, 7:13 pm, MAC macatad...@gmail.com wrote:
can anyone suggest good link to review Algos and OS concepts
--
thanks
--mac
--
You
can somebody please explain this ?
On Sun, Aug 21, 2011 at 8:08 PM, Nikhil Gupta nikhilgupta2...@gmail.comwrote:
http://www.ideone.com/kRaMj
I found this in the algogeeks forum only. Can anyone explain how value of i
is still 0, but *p shows 2 although their addresses are the same.
--
Hi,
I have posted this in stackoverflow. So you may choose to join here as well
(this question was asked in an adobe written test)
http://stackoverflow.com/questions/7138874/find-triangular-triplet-in-an-array
thanks,
Sarvesh
On Sun, Aug 21, 2011 at 8:09 PM, sarvesh saran
But on dev c it is showing o/p as 2 2 ..
I too have a doubt,a similar question was asked in atrenta's written paper.
On Sun, Aug 21, 2011 at 8:14 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote:
can somebody please explain this ?
On Sun, Aug 21, 2011 at 8:08 PM, Nikhil Gupta
if u r saying i/p array can't be modified and complexity O(n logn)time and
O(1) space, then i dont there exists any way to do that.
if complexity is not the matter, then brute force way of three nested loops
is the solution O(n^3) since here the original array will not be modified.
Sanju
:)
after sorting the array, check if the sum of first two elements in sorted
array is third element, if it is true, then all the conditions will hold,
otherwise proceed with 2nd,3rd and 4th element.
keep doing till u find a triplet, there u break out of the loop.
Sanju
:)
On Sun, Aug 21, 2011 at
Its both. Both can perform the operations in a maximum of O(logn) time.
On Sun, Aug 21, 2011 at 7:13 PM, priya ramesh
love.for.programm...@gmail.com wrote:
i have the same doubt :)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
thanks a lot sanjay! will try that immediately.
I have another problem to solve. It has a rather long description? Can I
send you an email for it instead?
thanks,
Sarvesh
On Sun, Aug 21, 2011 at 8:59 PM, Sanjay Rajpal srn...@gmail.com wrote:
after sorting the array, check if the sum of first
Has Fiorano come 4 recruitment anywhere...?Plz tell me abt the written test
and interview process...thanks in advance
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
first option is correct. Because we are not allowed to use any extra
space.
On Aug 21, 6:36 pm, priya ramesh love.for.programm...@gmail.com
wrote:
A Most efficient data structure is designed to optimize the following
operations. Pop, Push, Min. The best possible time-complexities with no
extra
which college?
On Sun, Aug 21, 2011 at 8:56 PM, rashmi i rash...@gmail.com wrote:
Hey, SAP is visiting our college. Any idea about the pattern of the campus
selection process? As in type of questions asked? Thanks
--
R@$!-!
DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.
--
You
We can't use a heap. Balanced BST is correct because Deletion of the
smallest element Insertion of an
element if it is not already present in the set - for this we need
to search for the element and searching in heap is O(n).
On Aug 21, 6:16 pm, priya ramesh love.for.programm...@gmail.com
wrote:
1 - 100 of 224 matches
Mail list logo