This will show syntax error due to x==9 and otherwise since memory address
given at the declarAtion there fore x value will. Change at every
assignment , but i m not sure printf will give an error or not . Plz reply.
On 17-Sep-2011 1:13 AM, Anshul AGARWAL anshul.agarwa...@gmail.com wrote:
ans 7. - 15 km east and 12 km south of origin
On Sat, Sep 17, 2011 at 11:29 AM, Dheeraj Sharma
dheerajsharma1...@gmail.com wrote:
Ans 8. 62.5 % ???
On Sat, Sep 17, 2011 at 9:11 AM, VIHARRI viharri@gmail.com wrote:
1. Minimum no.of comparisons required to select the 2nd max element
x==9 is not an error...
it will be 1 when true and 0 when false...and both are executable
statements...
when we print float with %d then compiler prints 0...and when we print
integer with %f then compiler prints last assigned or printed float value to
any float variablehere it is assigned
x== 9 is not an error !!! it simply returns a non zero value if its true and
0 if its false
On Sat, Sep 17, 2011 at 11:39 AM, praveen raj praveen0...@gmail.com wrote:
This will show syntax error due to x==9 and otherwise since memory address
given at the declarAtion there fore x value will.
@yogesh :ya u right.
On Sat, Sep 17, 2011 at 11:58 AM, sukran dhawan sukrandha...@gmail.comwrote:
x== 9 is not an error !!! it simply returns a non zero value if its true
and 0 if its false
On Sat, Sep 17, 2011 at 11:39 AM, praveen raj praveen0...@gmail.comwrote:
This will show syntax
This will work in GCC but not in G++
int main()
{
int new=1;
return 0;
}
There can be many programs of C++ , that cannot be compiled through GCC bcz
C++ is OOP for which G++ is needed.
On Sat, Sep 17, 2011 at 1:50 AM, SAMMM somnath.nit...@gmail.com wrote:
You can try this also this will
For internship it was , Percentage , then GD followed by two PI. For
placements it is e-litmus followed by percentage ( may be gd as well ) then
interview.
On Sat, Sep 17, 2011 at 7:56 AM, gaurav bansal gbgaur...@gmail.com wrote:
is GD a part of a selection process or only personal interviews
@yogesh : but if in place of x=1 in above code, I write t=54. that means i
m assigning somevalue to a float variable.Then it should print 54
afterwards.
but its again printing 98. how does it go with ur concept.
Ashima
M.Sc.(Tech)Information Systems
4th year
BITS Pilani
Rajasthan
On Fri, Sep
@Ashima..
u r right...it is always printing first float variable value
On Sat, Sep 17, 2011 at 2:05 PM, Ashima . ashima.b...@gmail.com wrote:
@yogesh : but if in place of x=1 in above code, I write t=54. that means i
m assigning somevalue to a float variable.Then it should print 54
ans1: i think 2n but may be better solution is posible
Ashima
M.Sc.(Tech)Information Systems
4th year
BITS Pilani
Rajasthan
On Fri, Sep 16, 2011 at 11:19 PM, Dheeraj Sharma
dheerajsharma1...@gmail.com wrote:
ans 7. - 15 km east and 12 km south of origin
On Sat, Sep 17, 2011 at 11:29 AM,
#includestdio.h
int main()
{
int a=5;
printf(Size : %d\n,sizeof( a =15/2));
printf(A is %d.,a);
}
What will be the value of a now ? Plz explain.
Sanju
:)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
HELLO FRIENDS,,,
PLEASE give me advice THAT agar *computer branch(B.E. or MCA) ka koi
student hai and agar uski deloite consultancy mein hone ke chances
ho*,
as ye *dream company* hai...to aur *kisi campus
placement mein baithna us student
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 this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group,
4,5
statements inside sizeof() does not get executed...it will tell just size...
int a=3;
printf(%d,sizeof(a++));
here a++ will not be executed ...it will just tell size ...
Also, lets suppose it execute statements ...then sizeof(int),sizeof(node *)
...will always produce error because int
logic design, Flip flops
computer organisation,especially MMU.
data structure,
os
Thank you,
Sid.
On Fri, Sep 16, 2011 at 10:06 PM, harshit sethi hshoneyma...@gmail.comwrote:
somebody reply..
On Fri, Sep 16, 2011 at 8:53 PM, Harshit Sethi hshoneyma...@gmail.comwrote:
hi
ans 2:
http://www.qbyte.org/puzzles/p131s.html
Ashima
M.Sc.(Tech)Information Systems
4th year
BITS Pilani
Rajasthan
On Sat, Sep 17, 2011 at 1:46 AM, Ashima . ashima.b...@gmail.com wrote:
ans1: i think 2n but may be better solution is posible
Ashima
M.Sc.(Tech)Information Systems
4th year
Two registers A and B. Initial Contents of the registers are unknown.
Write a program to find MAXINT - The maximum positive unsigned integer
The instructions available are:
SHR reg1, op1
ADD reg1, op1
AND reg1, op1
NOT reg1.
Op1 may represent any number or register.
(Hint: The Shift operation is
http://www.spoj.pl/problems/POUR1/
hw the 2nd given test is correct.
2
3
4
first we fill 3 littre jar with water and put into 4 littre jar den
again fill 3 littre and pour it in 2 littre remaining water in jar is
1 littre put it into 4 littre and we can measure 4 littre of water den
why answer is
kadane s algo
On Sat, Sep 17, 2011 at 3:25 PM, 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
ans7:
my answer is coming to be as 12km west and 12 km south
Ashima
M.Sc.(Tech)Information Systems
4th year
BITS Pilani
Rajasthan
On Sat, Sep 17, 2011 at 3:57 AM, Ashima . ashima.b...@gmail.com wrote:
ans 2:
http://www.qbyte.org/puzzles/p131s.html
Ashima
M.Sc.(Tech)Information Systems
Ans 1. apply bubble sort. outer loop should run just two times because in
2nd time the 2nd largest element will be at 2nd last position...
comparisons=(n-1)+(n-2)
On Sat, Sep 17, 2011 at 4:27 PM, Ashima . ashima.b...@gmail.com wrote:
ans 2:
http://www.qbyte.org/puzzles/p131s.html
Ashima
4 and 5. size of will check its first operand. so no evaluation takes
place...
On Sat, Sep 17, 2011 at 2:32 PM, abhinav gupta abhinav@gmail.comwrote:
Ans will be:4,5
On Sat, Sep 17, 2011 at 2:23 PM, Sanjay Rajpal srn...@gmail.com wrote:
#includestdio.h
int main()
{
int a=5;
get() function ?
On Thu, Sep 15, 2011 at 12:14 AM, rahul vatsa vatsa.ra...@gmail.com wrote:
ther is no get() function.
On Wed, Sep 14, 2011 at 1:55 PM, Puneet Gautam puneet.nsi...@gmail.comwrote:
I think there is no problem with the while statement, even if file is
not present , it will
ans 8:
it should be 40%
@dheeraj: if total is 100 percent and other person paid more than 1st
person.Than how can the 1st person's percentage be more than 50%?
Ashima
M.Sc.(Tech)Information Systems
4th year
BITS Pilani
Rajasthan
On Sat, Sep 17, 2011 at 4:20 AM, Yogesh Yadav medu...@gmail.com
@yogesh: we can get second max by comparing n elements ie O(n).
On Sat, Sep 17, 2011 at 4:59 PM, Ashima . ashima.b...@gmail.com wrote:
ans 8:
it should be 40%
@dheeraj: if total is 100 percent and other person paid more than 1st
person.Than how can the 1st person's percentage be more than
Ans 7
11 km west...14 km south
On Sat, Sep 17, 2011 at 4:59 PM, Ashima . ashima.b...@gmail.com wrote:
ans 8:
it should be 40%
@dheeraj: if total is 100 percent and other person paid more than 1st
person.Than how can the 1st person's percentage be more than 50%?
Ashima
@aditya:
comparing isn't complexity here... here it means no. of comparisons between
2 numbers...
On Sat, Sep 17, 2011 at 5:04 PM, aditya kumar
aditya.kumar130...@gmail.comwrote:
@yogesh: we can get second max by comparing n elements ie O(n).
On Sat, Sep 17, 2011 at 4:59 PM, Ashima .
ans 1
n+logn -2
(JU_CSE)
On Sat, Sep 17, 2011 at 5:04 PM, Yogesh Yadav medu...@gmail.com wrote:
Ans 7
11 km west...14 km south
On Sat, Sep 17, 2011 at 4:59 PM, Ashima . ashima.b...@gmail.com wrote:
ans 8:
it should be 40%
@dheeraj: if total is 100 percent and other person paid more than
i guess kadane's algo doesnt tell u abt the subarray element instead it
tells abt max sum of subarray . to get the element of subarray store the
end_offset whenever your max_sum changes .
On Sat, Sep 17, 2011 at 4:47 PM, sukran dhawan sukrandha...@gmail.comwrote:
kadane s algo
On Sat, Sep
see here the basic operation is comparision so we can express comaprision in
terms of order of O(n). newazz we still require n-1 comparisions to find
second max .
On Sat, Sep 17, 2011 at 5:06 PM, Yogesh Yadav medu...@gmail.com wrote:
@aditya:
comparing isn't complexity here... here it means no.
no gd
On Sat, Sep 17, 2011 at 1:51 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote:
For internship it was , Percentage , then GD followed by two PI. For
placements it is e-litmus followed by percentage ( may be gd as well ) then
interview.
On Sat, Sep 17, 2011 at 7:56 AM, gaurav bansal
@ashima...its asking just for pens..and that of alam..so wat i still
think..is 62.5%
On Sat, Sep 17, 2011 at 5:09 PM, aditya kumar
aditya.kumar130...@gmail.comwrote:
see here the basic operation is comparision so we can express comaprision
in terms of order of O(n). newazz we still require n-1
yeah it will be 62.5%
On Sat, Sep 17, 2011 at 5:14 PM, Dheeraj Sharma dheerajsharma1...@gmail.com
wrote:
@ashima...its asking just for pens..and that of alam..so wat i still
think..is 62.5%
On Sat, Sep 17, 2011 at 5:09 PM, aditya kumar
aditya.kumar130...@gmail.com wrote:
see here the
12 west and 10 south.. i thnk..is the correct one..
On Sat, Sep 17, 2011 at 5:22 PM, Yogesh Yadav medu...@gmail.com wrote:
yeah it will be 62.5%
On Sat, Sep 17, 2011 at 5:14 PM, Dheeraj Sharma
dheerajsharma1...@gmail.com wrote:
@ashima...its asking just for pens..and that of alam..so
If you go for delloitte, its pretty tough to switch back to pure coding
companies like yahoo etc. One friends of mine is facing same problems after
working 3 years in delloitte. So be clear and very careful about chosing
your career. Or try going for Goldman Sachs.
On Sat, Sep 17, 2011 at 2:43
Memory management has following things..
1.Relocation
To maintain the free pages and when a page is to be swapped, we have to add
that page into free page list ..
For this ,if we maintain a bool array which is equal to # pages in RAM,it
gives whether it is free or not ..
2.Protection
If ours is
Do post ur queries only in english...there are members from all over
India , even abroad...u may lose answers
On Sep 17, 2:13 pm, vivek goel vivek.thapar2...@gmail.com wrote:
HELLO FRIENDS,,,
PLEASE give me advice THAT agar *computer branch(B.E. or MCA) ka koi
student hai and
12 west ...12 south
On Sat, Sep 17, 2011 at 5:24 PM, Dheeraj Sharma dheerajsharma1...@gmail.com
wrote:
12 west and 10 south.. i thnk..is the correct one..
On Sat, Sep 17, 2011 at 5:22 PM, Yogesh Yadav medu...@gmail.com wrote:
yeah it will be 62.5%
On Sat, Sep 17, 2011 at 5:14 PM,
hii,i have interview of c-dot and i happened to know that they ask
Networking in the interview.
I don't know anything about networking.
so plzz suggest a good book and give me a link if possible that can
give me rough idea about it ,i have only one day to spare for that.
Plzz help...
Thanks in
@karthick:
as per u'r code... for ex: total is i/p---o/p will be 'l' not 'o' since 'l'
comes before to 'o' ...
On Thu, Sep 15, 2011 at 10:55 PM, kartik sachan kartik.sac...@gmail.comwrote:
soluntion for 1ST question is :http://ideone.com/LSOj6
# includecstdio# includecstringchar
1 frozen
2 steven Vol 1
--
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,
@don:
will u pls explain why divided by 5 is used
On Fri, Sep 16, 2011 at 3:44 PM, prasanth n nprasnt...@gmail.com wrote:
@Don:
thanks a lot
On Sat, Sep 17, 2011 at 12:28 AM, Don dondod...@gmail.com wrote:
The algorithm is to count them, looping over the number of quarters
and dimes.
Hi guys ,
Got an interesting link to share :
http://www.youtube.com/watch?v=dAyDi1aa40Efeature=share
It talks about *Maths Problem: Connect the towns solution (Motorway Problem)
. * the solution finding by soap bubble is unique :)
--
thanks
--mac
--
You received this message because you
@ aditya kumar:
can you give the algorithm about how to get the sub matrix?? i know how to
get the max sum from an array..but how to do it to find the sub matrix with
max sum??
On Sat, Sep 17, 2011 at 5:07 PM, aditya kumar
aditya.kumar130...@gmail.comwrote:
i guess kadane's algo doesnt tell u
Two registers A and B. Initial Contents of the registers are unknown.
Write a program to find MAXINT - The maximum positive unsigned integer
The instructions available are:
SHR reg1, op1
ADD reg1, op1
AND reg1, op1
NOT reg1.
Op1 may represent any number or register.
(Hint: The Shift operation is a
you have to write a program which tell about how many times it has run. ex:
if you run first time it will print 1.
if you run second time it will print 2.
like this.
this can easily done by File Handling but think other solution like IPC.
after booting your system, your program's output start
On Sat, Sep 17, 2011 at 8:58 AM, hary rathor harry.rat...@gmail.com wrote:
1 frozen
Hahahaha. It's not 'FROZEN', it is Forouzan :P
(http://books.google.com/books/about/Data_Communications_and_Networking.html?id=U3Gcf65Pu9IC)
2 steven Vol 1
--
You received this message because you are
take another matrix of same size, calculate sum at each element
if a[][] is the matrix,SM[][] stores sum till that point
SM[0,i] = a[0][i]
SM[i,0] = a[i][0]
SM[i][j] = SM[i][j-1]+SM[i-1][j]-SM[i-1][j-1]+a[i][j]; i,j=1 to n-1
track max value as u does this.
surender
On Sat, Sep 17, 2011 at 6:58
you have to print the list of all the files in a directory and all
its sub directories?
--
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
What should be the answer to above questions...?
On Sat, Sep 17, 2011 at 5:01 AM, bharatkumar bagana
bagana.bharatku...@gmail.com wrote:
Memory management has following things..
1.Relocation
To maintain the free pages and when a page is to be swapped, we have to add
that page into free page
if possible code plz
--
Regards,
$iva
--
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
hii I think this code will work
#includestdio.h
#includestring.h
void largestsum(int a[],int n)
{
int s=0,e=0,ls=0,max=0,j,i,sum=0;
for(i=0;in;i++)
{
sum+=a[i];
if(summax)
{
max=sum;
e=i;
s=ls;
}
if(sum0)
thank u siva
On Fri, Sep 16, 2011 at 11:40 AM, sivaviknesh s sivavikne...@gmail.comwrote:
-- Forwarded message --
From: sivaviknesh s sivavikne...@gmail.com
Date: Fri, Sep 9, 2011 at 12:23 PM
Subject: Fwd: Interview question in Thoughtworks
To: Pritpal Singh
@prasanth I know this solution...Try giving with constraints
specified ...
only following operations are available...
SHR reg1, op1
ADD reg1, op1
AND reg1, op1
NOT reg1.
On Sep 17, 6:46 pm, prasanth n nprasnt...@gmail.com wrote:
let a and b be the two numbers
int temp,result;
temp=a-b;
@sinjanspecial:
i think your code is for an 1 D matrix..but i have to find for a 2D matrix..
On Sat, Sep 17, 2011 at 7:33 PM, sinjanspecial sinjanspec...@gmail.comwrote:
hii I think this code will work
#includestdio.h
#includestring.h
void largestsum(int a[],int n)
{
int
@Amrit: You only have 2 and 3 litre jars. You are trying to get 4
litres into one of them. There is no 4 litre jar, nor any other vessel
into which you can capture the 4 litres.
Dave
On Sep 17, 6:15 am, amrit harry dabbcomput...@gmail.com wrote:
http://www.spoj.pl/problems/POUR1/
hw the 2nd
Best book is kurose and ross
On Sat, Sep 17, 2011 at 7:08 PM, Gaurav Menghani
gaurav.mengh...@gmail.comwrote:
On Sat, Sep 17, 2011 at 8:58 AM, hary rathor harry.rat...@gmail.com
wrote:
1 frozen
Hahahaha. It's not 'FROZEN', it is Forouzan :P
(
hey abhishek.,
is ur frnd now able to get job in pure coding company or
not?where is he now?
and wat's different in Goldman Sachs.
.
pl reply
but some body told me that it is possible to go in pure coding company
from
@dave +1
On Sat, Sep 17, 2011 at 8:10 PM, Dave dave_and_da...@juno.com wrote:
@Amrit: You only have 2 and 3 litre jars. You are trying to get 4
litres into one of them. There is no 4 litre jar, nor any other vessel
into which you can capture the 4 litres.
Dave
On Sep 17, 6:15 am, amrit
HELLO FRIENDS,,,
PLEASE give me advice THAT if there is a student of *computer
branch(B.E. or MCA) and suppose most probably he may be able to get job in
Deloitte during campus placements*, as it is a *dream
company* .then he or she would
people just dont read the question properly and post the answer
On 9/17/11, prasanth n nprasnt...@gmail.com wrote:
@sinjanspecial:
i think your code is for an 1 D matrix..but i have to find for a 2D matrix..
On Sat, Sep 17, 2011 at 7:33 PM, sinjanspecial
sinjanspec...@gmail.comwrote:
hii
actually the code is correct
line no 5 has been repeated again with type casting.thats it...
both the code gives the same answer 2 5
On Fri, Sep 16, 2011 at 11:58 PM, wellwisher p9047551...@gmail.com wrote:
but your programming is giving compilation error
http://ideone.com/sqsNn
the
Dont attend deloite
On Sat, Sep 17, 2011 at 8:25 PM, vivek goel vivek.thapar2...@gmail.comwrote:
HELLO FRIENDS,,,
PLEASE give me advice THAT if there is a student of *computer
branch(B.E. or MCA) and suppose most probably he may be able to get job in
Deloitte during campus
This is not a C puzzle. It depends on operating system.
On Sep 17, 3:46 pm, teja bala pawanjalsa.t...@gmail.com wrote:
you have to print the list of all the files in a directory and all
its sub directories?
--
You received this message because you are subscribed to the Google Groups
@Silva:
AND A,0 // sets register A to zero
NOT A // complements all bits of A
The result is that A is filled with 1-bits, giving MAXINT.
Dave
On Sep 17, 6:06 am, siva viknesh sivavikne...@gmail.com wrote:
Two registers A and B. Initial Contents of the registers
@Sivaviknesh: I already answered in another thread, but it is short,
so here goes again.
AND A,0 // sets register A to zero
NOT A// complements the bits of A
The result is that register A is filled with 1-bits, giving MAXINT.
Dave
On Sep 17, 8:33 am, sivaviknesh s
i tried it for Windows.
#includeiostream
using namespace std;
int main()
{
char ch;
int i=system(dir /s |more);
ch=getchar();
}
On Sep 17, 6:46 pm, teja bala pawanjalsa.t...@gmail.com wrote:
you have to print the list of all the files in a directory and all
its sub
@dave .. I think we should find maximum of 2 no.s (present in 2
registers)plz provide solution for this...correct me if i m wrong
On Sep 17, 8:50 pm, Dave dave_and_da...@juno.com wrote:
@Silva:
AND A,0 // sets register A to zero
NOT A // complements all bits
hi anyone at least provide code using file handling.i found this
ques from other site
On Sep 17, 6:35 pm, sivaviknesh s sivavikne...@gmail.com wrote:
you have to write a program which tell about how many times it has run. ex:
if you run first time it will print 1.
if you run second time
@Siva: The problem clearly states that we are to find MAXINT - The
maximum positive unsigned integer. It doesn't say that we are to find
the maximum of any particular integers. In particular, it says that
the initial contents of A and B are unknown, not that the initial
contents are two integers
thanks a lot dave for clarification :) but this is there any
possibility to find max of 2 no.s using those instructions
alone(assuming contents of registers are +ve ) ?
I found a solution finding difference of 2 no.s (SUB is required) and
checking for the whether a-b is +ve or -ve using '' and
@Siva: Note that in 2-s complement arithmetic, -b = ~b + 1.
So a - b = a + (-b) = a + (~b + 1) = (a + ~b) + 1.
Thus, a - b can be written as
NOT B
ADD A,B // reading this as add B to A, i.e., result is in A.
ADD A,1
Dave
On Sep 17, 11:15 am, siva viknesh sivavikne...@gmail.com wrote:
le lo bhai jo bhi mil rha hai...nahi to baad mein katne ka bahut
chance hota hai.
On Sep 17, 5:02 pm, siva viknesh sivavikne...@gmail.com wrote:
Do post ur queries only in english...there are members from all over
India , even abroad...u may lose answers
On Sep 17, 2:13 pm, vivek goel
External Sort : source code or any link ??
--
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.
thats a nice solution dave :)
On Sep 17, 9:26 pm, Dave dave_and_da...@juno.com wrote:
@Siva: Note that in 2-s complement arithmetic, -b = ~b + 1.
So a - b = a + (-b) = a + (~b + 1) = (a + ~b) + 1.
Thus, a - b can be written as
NOT B
ADD A,B // reading this as add B to A, i.e., result
@prasanth : sinjalspecial is correct bt his code works for 1D array . for 2D
array you can think of array of 1D array and then implement the same .
newazz here is one link :
http://tech-queries.blogspot.com/2010/05/find-max-sum-in-2d-array.html
On Sat, Sep 17, 2011 at 8:43 PM, tech coder
Write a method fill up an array of size n - and returns the array to the
caller - with the following conditions
1. the numbers shud be between 0 to n-1
2. no repeated numbers
3. the method should have a deterministic time to fill the arrays
4. arrays returned from the method should have
it's running..
http://ideone.com/XjGIo
wat is does is that through the system function u can run commands as
u do in command prompt.. nd dis is d command to show the files n all
as ur question asked.
try it on dev C++.
On Sep 17, 9:45 pm, teja bala pawanjalsa.t...@gmail.com wrote:
@ pooja
in
Is there any function or template is available in C++ STL for the Has
Function?
--
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/-/q5NgwJPaAFMJ.
To post to
=Take a function rand() which returns value between [0, 1) uniformly or use
function rand(n) = n*rand() which return value between 0- (n-1) using
uniform probability distribution.
=Now create a array A[0..n-1] = [0..n-1]
now rake an array R.
k = n;
for(i = 0; i n; i++){
a = rand(k);
Wow Don!
You did a perfect job explaining hash functions for C.
Thanks a lot.
--
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/-/bFBkFT_DytQJ.
To post to this
do they have sectional cutoff for e-litmus..??
Sahil Garg
Computer Engg. DCE
On Sat, Sep 17, 2011 at 5:12 PM, rahul sharma rahul23111...@gmail.comwrote:
no gd
On Sat, Sep 17, 2011 at 1:51 PM, Ankur Khurana
ankur.kkhur...@gmail.comwrote:
For internship it was , Percentage , then GD
You are given a binary tree in which each node contains a value. Design an
ALGORITHM to print all paths which sum up to that value. Note that it can be
any path in the tree - it does not have to start at the root.
--
*prasanth*
--
You received this message because you are subscribed to the
*
*
*#include fstream
#include iostream
using namespace std;
bool flag=false;
void check(int i)
{
int sum=0;
char n[5];
itoa(i,n,10);
for(int j=0;j5 n[j] != '\0';j++)
{
char p = n[j];
sum += atoi(p);
}
if(sum==3 || sum==6 || sum==9)
flag = true;
else if(sum9)
check(sum);
}
void main()
{
int i;
i'm trying out this problem www.spoj.pl/problems/ACODE
i'm getting TLE.. I donno y my recursion leads to tle
#includeiostream
#includemap
#includestdio.h
#includestring.h
using namespace std;
mapstring, long long ans;
mapstring, bool flags;
long long find(char *s, int len){
if(flags[s])
I think you're getting TLE because your solution calculate the same stuff
over and over again.
Look at this part:
else{
*ans[s]=find(s+1,len-1);*
if(s[0]'3's[1]'7')
*ans[s] = ans[s]+find(s+2,len-2);*
}
Calculating find(s+1,len-1) imply that
This is just a long shot, But if we are able to store and increment a
counter in a register, then as soon as a process gets a signal of the
context switch, and as soon as another process from the waiting queue gets
dequeued, we count the number of cpu cycles in between. Then multiply for
the freq
hey i'm also thinking n + logn -2.. but couldnt able to figure out
how??? can you please explain the logic
--
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
@anup : the time complexity will be very high ... O(n*M*M)...n=#characters
to be checked...M=size of the matrix ...
On Sat, Sep 17, 2011 at 8:30 AM, Anup Ghatage ghat...@gmail.com wrote:
As WgpShashank once pointed out.
Search the whole matrix for the first character instances, for each
abhishek kumar mailatabhishekgupta@... writes:
hey guys..Aricent is visiting to our college on 22nd. will you provide me the
pattern and sample papers..thanks in advance.
hi abhishek aricent is visiting our clg on sep 21st. will you get me some
sample papers some question u got in ur
Q3. 101 matches
..
On Sun, Sep 18, 2011 at 8:02 AM, VIHARRI viharri@gmail.com wrote:
hey i'm also thinking n + logn -2.. but couldnt able to figure out
how??? can you please explain the logic
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
create a tournament tree.in each round one value is eliminated to obtain in
the process the winner or the highest value in n-1 comparisons. Then check
the queue of the winner which contains log(n) entries of the values beaten
by the winner which implicitly will contain the runners up.Then log(n)-1
it doesn't matter what your background is if you are able to clear technical
interviews of google and facebook. about MS and yahoo, they may look into
your past... but in google, facebook if you are good with algorithms no one
can stop you.
If you dont want to code, then try looking for research
93 matches
Mail list logo