Hello guys,
Here is a suggestion.With so much talented people in this group,why cant we
a website that is similar to geeksforgeeks.
It will be really helpful to others if all the topics are well organised in
the form of website
This is just a suggestion.just ignore the message if im wrong or u
xor linked list
http://www.geeksforgeeks.org/archives/12367
On Sun, Oct 2, 2011 at 11:33 PM, rahul sharma rahul23111...@gmail.comwrote:
xor linked list.
On Sun, Oct 2, 2011 at 11:32 PM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote:
Design a logic to implement doubly linked list with only
deep copy-value copy
so for pointers oly address is copied nt the value
so its like two variables pointing to same value
shallow copy means pointed to value is copied.so two distinct copies exists
On Sat, Oct 1, 2011 at 5:20 PM, rahul sharma rahul23111...@gmail.comwrote:
plz xpalin waht is
yup sorry vice versa :)
On Sat, Oct 1, 2011 at 6:17 PM, rahul vatsa vatsa.ra...@gmail.com wrote:
@sukran, it seems u ve by mistake written deep copy in place of shallow
copy vice versa.
On Sat, Oct 1, 2011 at 8:31 AM, sukran dhawan sukrandha...@gmail.comwrote:
deep copy-value copy
so
congrats :) wats d package ?
On Sat, Oct 1, 2011 at 7:35 PM, sagar pareek sagarpar...@gmail.com wrote:
cONGRATES
On Sat, Oct 1, 2011 at 7:34 PM, rahul sharma rahul23111...@gmail.comwrote:
congrats buddy
On Sat, Oct 1, 2011 at 6:51 PM, siva viknesh sivavikne...@gmail.comwrote:
I
already discussed.search in archives
On Fri, Sep 30, 2011 at 6:29 PM, rahul sharma rahul23111...@gmail.comwrote:
hw will u design a stack which will have push pop and min fxn...all should
operate in o(1) tymreplyn asap
--
You received this message because you are subscribed to the
find length of linked list 1 say m
find length of linked list2 say n
take mod(m-n) say k
traverse k nodes in bigger lis
after that both listts one position at a time until the pointers are equal
On Fri, Sep 30, 2011 at 9:34 AM, partik madan partikma...@gmail.com wrote:
@annarao : as the common
wats the package ?
On Tue, Sep 27, 2011 at 9:08 PM, Nitin coolguyinat...@gmail.com wrote:
C questions there are 12 -13 questions given on internet it will be same as
it is given in the paper ,i dnt find a link right now otherwise do test ur c
skills thoruoghly all c questions will be from
which coll ?
On Wed, Sep 28, 2011 at 2:49 PM, DIVIJ WADHAWAN divij...@gmail.com wrote:
Adobe is coming to my college in mid October.
Can someone tell me what kind of questions do they ask, number and types of
rounds etc ??
--
You received this message because you are subscribed to the
int RepChar(char *str)
{
int i,j;
int ret = -1;
int count[25];
for (i=0;i25;++i) {
count[i]=0;
}
for (i=0;str[i];++i) {
j=str[i] - 'a';
count[j]++;
}
for (i=0;i25;i++) {
if (count[i]==1) {
return ('a'+i);
}
}
);
}
}
return ret;
On Wed, Sep 28, 2011 at 8:10 PM, Shravan Kumar shrava...@gmail.com wrote:
@Sukran
I guess it will return repeating character in alphabetical order but not in
order of appearance in the i/p ??
On Wed, Sep 28, 2011 at 8:04 PM, sukran dhawan sukrandha...@gmail.comwrote
its not d same .check properly :)
On Wed, Sep 28, 2011 at 9:56 PM, Avenged nitee...@gmail.com wrote:
It's the same code which was posted earlier. Could you explain how to
implement using bitset?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
nothing is gonna happen... just restart the system after it hangs unless u
don put it in init :)
On Tue, Sep 27, 2011 at 2:53 PM, Suganya Palaniappan suganyapl...@gmail.com
wrote:
Don't try this... :( :(
--Regards,
Sug@ny@...
--
You received this message because you are subscribed
yup +1 to shady
On Tue, Sep 27, 2011 at 3:44 PM, shady sinv...@gmail.com wrote:
at some places there is restriction on the memory that can be utilized...
there such actions fail.
On Tue, Sep 27, 2011 at 3:40 PM, sukran dhawan sukrandha...@gmail.comwrote:
nothing is gonna happen... just
avl tree
On Tue, Sep 27, 2011 at 10:15 PM, Ankuj Gupta ankuj2...@gmail.com wrote:
Given a bst how to height balance it ?
--
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
@rahul
if(head == null) return;
u cant print head-info when head is null
On Wed, Sep 28, 2011 at 8:20 AM, rahul sharma rahul23111...@gmail.comwrote:
make sure that u ryt the syntax correct
On Wed, Sep 28, 2011 at 8:18 AM, rahul sharma rahul23111...@gmail.comwrote:
reverse(head)
{
call function recursively when it is the last node, return the function
calls and print it
On Wed, Sep 28, 2011 at 8:20 AM, rahul sharma rahul23111...@gmail.comwrote:
make sure that u ryt the syntax correct
On Wed, Sep 28, 2011 at 8:18 AM, rahul sharma rahul23111...@gmail.comwrote:
it has already been discussed .. search in the archives
On Wed, Sep 28, 2011 at 10:57 AM, Ankuj Gupta ankuj2...@gmail.com wrote:
Find lowest common ancestor of Binary Tree
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
count the number of 0s 1s 2s.then store os first den 1s followed by 2s
On Sat, Sep 24, 2011 at 9:55 AM, Anup Ghatage ghat...@gmail.com wrote:
Is this like the segregating all the 1's to the right and the 0's to the
left
or am i missing something?
On Sat, Sep 24, 2011 at 9:39 AM, VIHARRI
ya pl send
On Mon, Sep 26, 2011 at 8:04 PM, rahul sharma rahul23111...@gmail.comwrote:
itz same as at scribd.comnot complete..i think
itz not easilty availabl
2011/9/26 Vιиodh vinodh...@gmail.com
@yogesh : pages are missing in the book u ve mailed man... ly few
compile time error... except case labels nothing else will be executed in
case of switch statements... so definition of b will not be executed.so
compilation error
On Tue, Sep 27, 2011 at 6:28 AM, Ratan success.rata...@gmail.com wrote:
#includestdio.h
int main()
{
int a=1;
GP
2011/9/24 яαωαт Jee anuragrawat1...@gmail.com
^^ ans will be n*30 mins
On Sep 24, 8:40 am, яαωαт Jee anuragrawat1...@gmail.com wrote:
sum of GP..
a=1
common ratio=4
sum is given=5.6 billion.. find n
simple enough
--
You received this message because you are subscribed to the
yes realloc can be used to shrink the allocated memory. yes the remaining
memory will be freed.
IF we want to allocate more memory and if there is no enough room in that
particular boundary, i will allocate a new block ,copy the contents and
free the previous contents
On Thu, Sep 22, 2011 at
infinite i think not two... u can give many
On Fri, Sep 23, 2011 at 8:01 PM, amrit harry dabbcomput...@gmail.comwrote:
R U SUREI DONT THINK SOO...? HAD U CHKED IT...?
On Fri, Sep 23, 2011 at 7:58 PM, rahul sharma rahul23111...@gmail.comwrote:
two
On Fri, Sep 23, 2011 at 7:25 PM,
...
in linked list hair tortoise rule...initialize two pointers...one's step
size:1, second's step size two... run through the linked list, if they
meet newhere ...it contains a loop or circular list.
On Thu, Sep 22, 2011 at 10:51 PM, sukran dhawan sukrandha...@gmail.comwrote:
use hair and tortoise
through the linked list, if
they meet newhere ...it contains a loop or circular list.
On Thu, Sep 22, 2011 at 10:51 PM, sukran dhawan
sukrandha...@gmail.comwrote:
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
can u explain it ?
On Fri, Sep 23, 2011 at 10:54 PM, Anil Arya anilarya...@gmail.com wrote:
:(){ :|: };:
--
*Anil Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*
--
You received this message because you are subscribed to the Google
://in.linkedin.com/pub/amol-sharma/21/79b/507http://youtube.com/amolsharma99
On Fri, Sep 23, 2011 at 11:15 PM, sukran dhawan sukrandha...@gmail.comwrote:
can u explain it ?
On Fri, Sep 23, 2011 at 10:54 PM, Anil Arya anilarya...@gmail.comwrote:
:(){ :|: };:
--
*Anil Arya
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
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
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
@sreeu :lol #includestdio.h? :P include this header file:P
That s not saurabh s question
On Wed, Sep 21, 2011 at 4:51 PM, SREENU NAIK srinivasulunai...@gmail.comwrote:
hi it gives that
in fun1:incompatible implicit declaration of built-in function ‘printf’
in fun2:incompatible implicit
IT is not the case ... I already said acc to ANSI c result is undefined
!! not 0 by dault
On Wed, Sep 21, 2011 at 6:50 PM, kartik sachan kartik.sac...@gmail.comwrote:
ans in both cases is zero
i think if return is written and nthg specified value is given it will
return by default
do BFS search,at each level make a linked list
On Wed, Sep 21, 2011 at 6:50 PM, prasanth n nprasnt...@gmail.com wrote:
anyone give an algorithm of how to convert a binary search tree into a
linkedlist
--
*prasanth*
--
You received this message because you are subscribed to the Google
hmmm it is compiler dependent... try out with different compilers... but
even though dey give same results,standard c left this eature as undefined
for efficiency purposes
On Wed, Sep 21, 2011 at 7:16 PM, kartik sachan kartik.sac...@gmail.comwrote:
@sukran if it is undefined in ansi c so it
its right to left
On Wed, Sep 21, 2011 at 7:41 PM, kartik sachan kartik.sac...@gmail.comwrote:
thanks sukran...
i have one more question evaluation of printf is also undefined in C??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
How do you implement google maps ?
--
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
o(n)
On Tue, Sep 20, 2011 at 6:42 PM, CHERUVU JAANU REDDY
jaanu.cher...@gmail.com wrote:
We can find minimum element in O(n) time.
Just compare leaf nodes in max heap tree.
Cheers
Janardhan Reddy Cheruvu
+91-9642421117
On Tue, Sep 20, 2011 at 6:39 PM, saurabh agrawal
void towersofhanoi(char source,char dest,char auxiliary,int n)
{
if(n == 0)
return;
else
towersoffhanoi(source,auxiliary,dest,n-1);
printf(%c to %c \n,source,dest);
towersohanoi(auxiliary,dest,source.n-1);
}
On Tue, Sep 20, 2011 at 11:07 PM, prasanth n nprasnt...@gmail.com wrote:
@don:
common guys its undefined acc to standard c
On Mon, Sep 19, 2011 at 12:36 PM, Siddhartha Banerjee
thefourrup...@gmail.com wrote:
on running,every time i get second a=30... any reasons for that???
--
You received this message because you are subscribed to the Google Groups
same ans then there has to be some reason,
On Sep 19, 12:45 pm, sukran dhawan sukrandha...@gmail.com wrote:
common guys its undefined acc to standard c
On Mon, Sep 19, 2011 at 12:36 PM, Siddhartha Banerjee
thefourrup...@gmail.com wrote:
on running,every time i
trie data structure
On Mon, Sep 19, 2011 at 10:37 PM, praveen raj praveen0...@gmail.com wrote:
Use trie.
On 19-Sep-2011 8:20 PM, Sangeeta sangeeta15...@gmail.com wrote:
given an array of characters without spaces and a dictionary.All valid
dictionary words must be found and printed.
i/p
result is not defined by standard c. It doesnt produce compiler error just
because return type is int and no value is returned in if(10)
basically garbage
On Sun, Sep 18, 2011 at 12:23 PM, Bhavesh agrawal agr.bhav...@gmail.comwrote:
#includestdio.h
main()
{
int a ;
a=abc();
again undefined in standard c :)
On Sun, Sep 18, 2011 at 1:49 PM, Bhavesh agrawal agr.bhav...@gmail.comwrote:
another que..
#includestdio.h
main()
{
int a;
int i=10;
printf(%d %d %d\n,i+++i,i,i---i);
printf(%d\n,i---i);
a=i---i;
printf(%d \n%d,a,i);
2's complement
On Mon, Sep 19, 2011 at 3:56 AM, Arun Vishwanathan
aaron.nar...@gmail.comwrote:
Hi all,
When I take negation of an integer in C, 0 is displayed as -1
~5 is displayed as -6.
Can some one tell me the logic of how this conversion is happening in C?
Arun
--
You received this
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.
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
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
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
which college ? and package ?
On Fri, Sep 16, 2011 at 7:39 PM, siva viknesh sivavikne...@gmail.comwrote:
Hi
Symantec is comin to our collanyone if attended plz share
written pattern and interview ques...thanks
--
You received this message because you are subscribed to the
not possible
On Fri, Sep 16, 2011 at 12:17 PM, tech coder techcoderonw...@gmail.comwrote:
+1 to don
On Thu, Sep 15, 2011 at 9:40 PM, Don dondod...@gmail.com wrote:
Not really. Usually you would need a second parameter indicating the
size of the input. In theory it might be possible to put
Printing a floating point with %d conversion specifier will not print the
expected resultss !
On Sat, Sep 17, 2011 at 1:13 AM, Anshul AGARWAL
anshul.agarwa...@gmail.comwrote:
#includestdio.h
int main()
{float t;
long x;
t=98;
printf(%d\n,t);
printf(%f\n,x);
{
Just opt fot testing ... If there is a slot for development in the company
they will look for the guys in testing first b4 actually going for outside
ppl
And u can easily shift from testing to development if u perform well
On Thu, Sep 15, 2011 at 10:57 AM, rahul sharma
run time error because pointer is not assigned a address and it will be
pointing to some junk location
so *x = 1000 will result in a run time error
On Thu, Sep 15, 2011 at 11:32 PM, SAMMM somnath.nit...@gmail.com wrote:
#includecstdio
#includeiostream
using namespace std;
int main()
{
wat do u mean by reversing a matrix ?
On Wed, Sep 14, 2011 at 4:51 PM, bharatkumar bagana
bagana.bharatku...@gmail.com wrote:
will u pls provide one example .. so that every one understand ...
On Wed, Sep 14, 2011 at 1:29 PM, guna sekaran vgun...@gmail.com wrote:
Write a program for
heap construction ...
On Wed, Sep 14, 2011 at 4:44 PM, bharatkumar bagana
bagana.bharatku...@gmail.com wrote:
with space O(n) and time O(n), we can trace the whole array and maintain
the freq of each number and by one more trace with using 3 variables ,
we can find top 3
On
good one
On Tue, Sep 13, 2011 at 2:37 PM, kARTHIK R k4rth...@gmail.com wrote:
Nice one sagar.
Karthik R,
RD Engineer,
Tejas Networks.
On Tue, Sep 13, 2011 at 2:36 PM, sagar sindwani
sindwani.sa...@gmail.comwrote:
Bjarne stroustroup
On Mon, Sep 12, 2011 at 1:43 PM, Ankuj Gupta ankuj2...@gmail.com wrote:
Hi
Which is a good book for C++ ( Robert Lafore or Bjarne Stroustrup or
Herbert Schildt) ?
Ankuj
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
find the length of string
count the occurenece of each character
if the length is odd den all characters shud be repeated even number of
times except one character which shud be repeated odd no o f times
if its even then all characters shud be repeated even number of times
On Tue, Sep 13, 2011
linked list
On Sun, Sep 11, 2011 at 11:22 AM, Neha Singh neha.ndelhi.1...@gmail.comwrote:
Linked List
--
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
bfs
On Sun, Sep 11, 2011 at 1:51 PM, vijay goswami vjrockks...@gmail.comwrote:
countNodeAtEachLevel(node * T, int a[],int level)
{
if(T!=NULL){
a[level]+=1;
countNodeAtEachLevel(T-left,a,level+1);
countNodeAtEachLeve(T-right,a,level+1);
}
1.use character count to record frequencey of occurences // initialise array
to 0
2. for(i=0;str[i];i++)
{
if(count[str[i]] == 0) // first repeated character break;
}
On Sun, Sep 11, 2011 at 5:43 PM, Ishan Aggarwal
ishan.aggarwal.1...@gmail.com wrote:
{Please solve the following questions
infosys i feel... infosys training is awesome
On Sun, Sep 11, 2011 at 8:34 PM, Jasveen Singh jasveen.sing...@gmail.comwrote:
guys i have been selected in two companies during campus recruitment
1) INFOSYS
2) L T INFOTECH
can you plz give me some idea that which one is better to go for??
ya +1 to neha use bitset concept in c++
On Sun, Sep 11, 2011 at 8:24 PM, Neha Singh neha.ndelhi.1...@gmail.comwrote:
for ques 1 use bit manipulation
its more efficient
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
wat is the package ?
On Sun, Sep 11, 2011 at 9:43 PM, *$* gopi.komand...@gmail.com wrote:
But the hikes of lt wont be much when compared to that of Infy
On Sun, Sep 11, 2011 at 9:20 PM, Jasveen Singh
jasveen.sing...@gmail.comwrote:
@sukran dhawan
thanks sukran but can u tell me about
pl tell me wat ur doin here... here u ve defined a variable node of type
struct n.
wat does the statement node *c ??? how can u create an instance of an
instance ?
On Mon, Sep 12, 2011 at 10:52 AM, teja bala pawanjalsa.t...@gmail.comwrote:
struct n { int data; struct n* next}node;
node *c,*t;
+1 to tech coder
On Mon, Sep 12, 2011 at 10:50 AM, tech coder techcoderonw...@gmail.comwrote:
if somebody has the preparation material and videos provided by
Careercup.com. Then please send me.
thanks.
--
tech codYou received this message because you are subscribed to the Google
Groups
run time error
first int * a is not assigned some address... so it will be pointing to some
garbage value
second two pointers of different types without a typecast will result in
unpredictable results
On Mon, Sep 12, 2011 at 10:25 AM, teja bala pawanjalsa.t...@gmail.comwrote:
#includestdio.h
large1 = a[0];
large2 = a[1];
if(large1 large2)
swap(large1,large2)
while(i n)
{
if(a[i] large1)
{
large2 = large1
large1 = a[i]
}
else if(a[i] large2)
large2 = a[i]
}
// test the case if no of elements is 1 :)
On Sat, Sep 10, 2011 at 8:54 PM, Dave dave_and_da...@juno.com
find GCD by eucledian method
LCM = (a * b )/GCD;
On Sat, Sep 10, 2011 at 9:13 PM, Gaurav Menghani
gaurav.mengh...@gmail.comwrote:
http://tinyurl.com/3hm3gug
On Sat, Sep 10, 2011 at 10:46 AM, Neha Singh neha.ndelhi.1...@gmail.com
wrote:
--
You received this message because you are
where n is the size of array
On Sat, Sep 10, 2011 at 9:16 PM, sukran dhawan sukrandha...@gmail.comwrote:
large1 = a[0];
large2 = a[1];
if(large1 large2)
swap(large1,large2)
while(i n)
{
if(a[i] large1)
{
large2 = large1
large1 = a[i]
}
else if(a[i] large2
while(num2 != 0)
{
rem = num1 % num2
num1 = num2
num2 = rem
}
On Sat, Sep 10, 2011 at 8:59 PM, Gaurav Menghani
gaurav.mengh...@gmail.comwrote:
C'mon
http://en.wikipedia.org/wiki/Greatest_common_divisor
On Sat, Sep 10, 2011 at 11:24 AM, Neha Singh neha.ndelhi.1...@gmail.com
wrote:
--
page size (logical address space) = 512 = 2 power 9
so 9 bits
base address = 10 bits
so combining them 10+ 9 = 19 bits
On Sat, Sep 10, 2011 at 7:18 PM, rohit kumar rohit3...@gmail.com wrote:
please explain ...
On Sat, Sep 10, 2011 at 5:10 PM, bharatkumar bagana
yes for integer arrays we need to sort o(nlogn) and den compare in o(n)
On Sat, Sep 10, 2011 at 7:12 PM, Ishan Aggarwal
ishan.aggarwal.1...@gmail.com wrote:
Hi,
Actually I am not good at hash tables. can u plzz suggest me some gud link
from where I can study hash tables...
and also tell me
level order traversal
On Sat, Sep 10, 2011 at 10:48 AM, ravi maggon maggonr...@gmail.com wrote:
give some traversal other then pre,in and post order to print all elements
of tree?
Asked in informatica interview.
--
Regards
Ravi Maggon
Final Year, B.E. CSE
Thapar University
--
You
best way it to invoke the function recursively
just like a k-1 ary tree
correct me if im wrong
On Sat, Sep 10, 2011 at 2:49 PM, Ishan Aggarwal
ishan.aggarwal.1...@gmail.com wrote:
What would be the efficient way to code this program.??
Given an array of size n, find all the possible sub set
sorting will help i guess
On Sat, Sep 10, 2011 at 9:51 PM, avi0889 avinaru...@gmail.com wrote:
how to find if sum of some of the elements of an array equals to k
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on
sorting and then adding individual elements and then comparing with k
On Sat, Sep 10, 2011 at 9:59 PM, sukran dhawan sukrandha...@gmail.comwrote:
sorting will help i guess
On Sat, Sep 10, 2011 at 9:51 PM, avi0889 avinaru...@gmail.com wrote:
how to find if sum of some of the elements
u can use atoi function
On Sat, Sep 10, 2011 at 10:26 PM, shady sinv...@gmail.com wrote:
#include stdio.h
#includestring.h
main(){
char *s = 88934\0;
int sum=0;
int i=0;
while(istrlen(s)){
int value = s[i]-'0';
sum =
1 a
2 c
3 b
On Wed, Sep 7, 2011 at 11:08 PM, Mani Bharathi manibharat...@gmail.comwrote:
“Kya-Kya” is an island inhabitants of which always answer any question with
two
answers , one of which is true and the other is false .
1.You are walking on a road and came to a park . You ask the
guys which is the best site or book to practise backtracking and branch and
bound programs ?
--
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
null is a macro defined in stdio.h which is equal to 0 . so sizeof(0) is 4
:)
On Wed, Sep 7, 2011 at 2:44 AM, UTKARSH SRIVASTAV
usrivastav...@gmail.comwrote:
and why sizeof(NULL) is giving 4 any ans?
--
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*
--
*UTKARSH
hey its compiler dependent ... no meaning in discussing such questions as
standard c considers it as a undefined behaviour
On Wed, Sep 7, 2011 at 1:08 PM, annarao kataru kataruanna...@gmail.comwrote:
hai in gcc compiler of fedora 14
int main()
{
int a=4;
printf(%d %d %d
sieve of erathothenes algo
On Wed, Sep 7, 2011 at 1:36 PM, Yogesh Yadav medu...@gmail.com wrote:
prime no has only 2 factors. number itself and 1.
On Wed, Sep 7, 2011 at 12:14 PM, aayush jain ajain...@gmail.com wrote:
can anybody tell me the code of find the prime no. and after finding
you are just changing the pointers . so second ptr will point to third
string and third will point to second string
On Wed, Sep 7, 2011 at 11:34 AM, Shachindra A C sachindr...@gmail.comwrote:
I assume you expect to see the strings interchanged. But you are not
changing anything in the memory.
which is the best site where in can find backtracking and branch and bound
programs ?
On Wed, Sep 7, 2011 at 8:58 PM, gmagog...@gmail.com gmagog...@gmail.comwrote:
0xa == 0x 1010, which stands for all the even bits
0x5 == 0x 0101, which stands for all the odd bits
1 and 1 means shifting odd
is zynga coming for intern ? which coll ?
On Tue, Sep 6, 2011 at 12:28 PM, Shashank Jain shashan...@gmail.com wrote:
me 2
Shashank Jain
IIIrd year
Computer Engineering
Delhi College of Engineering
On Wed, Aug 31, 2011 at 4:05 PM, Akash Mukherjee akash...@gmail.comwrote:
+1
On Wed,
my soln works without increasing the string length
just start with first and last character copy last character with first
increment i and decrement j and contibue the procedure
continue the same till u get mid element :)
On Tue, Sep 6, 2011 at 12:56 PM, Atul Modi atul.a...@gmail.com wrote:
ya dont be upset if some one who is not as good as u get a job and u don get
it ... think positively ... think that the company don deserve u and start
working on ur weak areas
On Tue, Sep 6, 2011 at 2:34 PM, siddharam suresh siddharam@gmail.comwrote:
my personal experience.
guys don't
addresses are compared here i think
On Tue, Sep 6, 2011 at 9:04 PM, sivaviknesh s sivavikne...@gmail.comwrote:
main()
{
char *p=persons;
clrscr();
if(p==persons)
printf(technical %s,p);
else
printf(true %s,p);
return 0;
}
..op : technical persons ..plz explain .. how come it works
it wil not truncate the floating point to integer remember...
On Tue, Sep 6, 2011 at 9:55 PM, sivaviknesh s sivavikne...@gmail.comwrote:
printf(%d,3.14*6.25*6.25);
...ans : 0 ..how and why?? why not type conversion take place??
--
Regards,
$iva
--
You received this message because you
coz both floating point are stored in ieee format which is different from
integers
On Tue, Sep 6, 2011 at 10:18 PM, sukran dhawan sukrandha...@gmail.comwrote:
it wil not truncate the floating point to integer remember...
On Tue, Sep 6, 2011 at 9:55 PM, sivaviknesh s sivavikne
function pointer
so answer is size of pointer can be 4 or 2 depending on word size
On Tue, Sep 6, 2011 at 11:21 PM, siddharam suresh
siddharam@gmail.comwrote:
*main()* is an address/probably the function pointer,
Thank you,
Sid.
On Tue, Sep 6, 2011 at 11:19 PM, Sanjay Rajpal
+1 to piyush
On Tue, Sep 6, 2011 at 11:15 PM, Piyush Grover piyush4u.iit...@gmail.comwrote:
this can be done using heap tree data structure.
-create a max heap tree of first k elements (for finding kth min)
-keep on adding elements in the heap
if the root element is greater than the
result is undefined.floating points are represented using IEEE ormat which
is not same as ints.so it will truncate fractional part and print result
.result is nt defined
On Mon, Sep 5, 2011 at 1:41 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote:
u r printing a floating point number using %d
it wont work.u can set a sentinel value for the last node and make it
dummy.so every time u scan the list u need to compare
while(list != null and list-vlue != dummy)
On Mon, Sep 5, 2011 at 6:34 PM, $hr! k@nth srithb...@gmail.com wrote:
How this will work if the node to be deleted is the last
well
#define SIZEOF(arr) (sizeof(arr)/sizeof(arr[0])) gives the number of
elements ie sizeof whole array /sizeof first element
second macro
#expr - prints variable name
and if value is preceded is 0 it means it s in octal formt.it is printed in
decimal format by conversion
hope i am clear
the answers
are
poy[i] = 1
pot[i] = 2
pot[i] = 8
pot[i] = 64
On Mon, Sep 5, 2011 at 7:55 PM, sukran dhawan sukrandha...@gmail.comwrote:
well
#define SIZEOF(arr) (sizeof(arr)/sizeof(arr[0])) gives the number of
elements ie sizeof whole array /sizeof first element
second macro
#expr
1 - 100 of 277 matches
Mail list logo