refer beej guide for networking
programming
and furozon for theory
On Sun, Aug 14, 2011 at 2:42 AM, codeur kcrazy...@gmail.com wrote:
hii we have not studied networking till now as a part of our
curriculum (its in 8th sem) but companies coming for placement do ask
questns based on
int main ()
{
printf(%d,1+2+5);
getch();
return 0;
}
what should it return and how..??
--
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/-/2H3Gg6hLEQ0J.
i got a warning in gcc and the output was garbage
On Sun, Aug 14, 2011 at 11:44 AM, Brijesh Upadhyay
brijeshupadhyay...@gmail.com wrote:
int main ()
{
printf(%d,1+2+5);
getch();
return 0;
}
what should it return and how..??
--
You received this message because you are
I think i got it... STRING always return address of S , which then get
summed with 1 and 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/-/kFrZUxzFTxsJ.
5 will represent address of 5 in heap. so adding 3 to 5 increment tht
address by 3 and print it on the screen
On Sun, Aug 14, 2011 at 11:44 AM, Brijesh Upadhyay
brijeshupadhyay...@gmail.com wrote:
int main ()
{
printf(%d,1+2+5);
getch();
return 0;
}
what should it return and
try out with Microsoft VC++
On Sun, Aug 14, 2011 at 11:47 AM, Brijesh Upadhyay
brijeshupadhyay...@gmail.com wrote:
I think i got it... STRING always return address of S , which then get
summed with 1 and 2.
--
You received this message because you are subscribed to the Google Groups
compiler dependent and will print some address
On Sun, Aug 14, 2011 at 11:48 AM, sukran dhawan sukrandha...@gmail.comwrote:
try out with Microsoft VC++
On Sun, Aug 14, 2011 at 11:47 AM, Brijesh Upadhyay
brijeshupadhyay...@gmail.com wrote:
I think i got it... STRING always return address
how does scanf takes the input ???
--
*Rajeshwar Patra,*
*MCA final year,*
*Nit Durgapur*
--
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
scanf takes input anything as well..but the output will be just a space
On Sun, Aug 14, 2011 at 1:08 PM, Rajeshwar Patra
rajeshwarpa...@gmail.comwrote:
how does scanf takes the input ???
--
*Rajeshwar Patra,*
*MCA final year,*
*Nit Durgapur*
--
You received this message because
I think the address of string 5 located will be added with 1 and 2...
On Sun, Aug 14, 2011 at 11:44 AM, Brijesh Upadhyay
brijeshupadhyay...@gmail.com wrote:
int main ()
{
printf(%d,1+2+5);
getch();
return 0;
}
what should it return and how..??
--
You received this message
can any one help me why am i getting runtime error in the program.
my program is
def call(a,b):
print(((pow(a,b))%10));
def main():
n=input();
for x in range(n):
import sys
a,b = map(long,sys.stdin.readline().split());
was the aptitude on c or c++???i mean did the aptitude contain
questions on classes and objects???
On Aug 14, 2:00 am, sagar pareek sagarpar...@gmail.com wrote:
sorry it is 3 hand written codes in 1 hour
On Sun, Aug 14, 2011 at 2:29 AM, sagar pareek sagarpar...@gmail.com wrote:
First
@ankur:tere code se wrong answer ayegafor n=4 there are 5 solutions...
therefore arr[2]should be 2,par teer code me its 1...
arr[1]=1
arr[2]=2;
now start from arr[3];
On Sun, Aug 14, 2011 at 9:57 AM, Ankur Khurana ankur.kkhur...@gmail.comwrote:
it's a simple dp , ned not be knapsack one.
---
pankaj kumar wants to stay in better touch using some of Google's coolest new
products.
If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-fec58d8386-f16dcef73c-qIhM6BVo3OJNdgYKy2viERCQNpE
You'll
arshad
u got my point or not?
On Sun, Aug 14, 2011 at 1:16 PM, Arshad Alam alam3...@gmail.com wrote:
program is running smooth but I have one confusion at line number 8.
why it is *while(s[i]!=0)* instead of *while(s[i]!='\0')*
1.#includestdio.h
2.#includeconio.h
3.void
no c
only C++
questions mainly were to get the o/p of program
On Sun, Aug 14, 2011 at 1:30 PM, htross htb...@gmail.com wrote:
was the aptitude on c or c++???i mean did the aptitude contain
questions on classes and objects???
On Aug 14, 2:00 am, sagar pareek sagarpar...@gmail.com wrote:
d destructor can be called explicitly but u *should never* do that...
reason: a destructor is caaled automatically when its scope endsthere is
no way of preventing its call.
so if u have called it explicitly also then u can be in a *serious
problem*if ur destructor deallocates
@ankur i think you are talking about cleanup handlers. these are the
functions which are executed when a thread terminates. but can you give any
hint how it can be accomplished using process control block.
On Sun, Aug 14, 2011 at 2:15 PM, Kamakshii Aggarwal
kamakshi...@gmail.comwrote:
The problem is because of \n in the prnintf statement. When new line is
there in first printf it flushes the standard buffer and so in child the
output of printf is not present in second program.
*Muthuraj R
IV th Year , ISE
PESIT , Bangalore*
On Sat, Aug 13, 2011 at 9:29 PM, Ankur Khurana
one more thing from networks should we study theory concepts or
programming constructs???should we study object oriented concepts???
On Aug 14, 2:04 pm, sagar pareek sagarpar...@gmail.com wrote:
no c
only C++
questions mainly were to get the o/p of program
On Sun, Aug 14, 2011 at
in networking give emphasis on protocols
like ARP, DHCP and all
On Sun, Aug 14, 2011 at 3:09 PM, htross htb...@gmail.com wrote:
one more thing from networks should we study theory concepts or
programming constructs???should we study object oriented concepts???
On Aug 14, 2:04 pm, sagar
@roy : yes , kind of , i didnt know the exact technical term for it. Not
exactly PCB but process can maintain a lookup table for all the shared
variable and there corresposing threads . or for every thread the shared
variable. or ,may be in the thread itself, you can have a linked list
pointer
Kamz: Maafi :P , did a silly mistake.
On Sun, Aug 14, 2011 at 2:12 PM, Kamakshii Aggarwal
kamakshi...@gmail.comwrote:
@ankur:tere code se wrong answer ayegafor n=4 there are 5 solutions...
therefore arr[2]should be 2,par teer code me its 1...
arr[1]=1
arr[2]=2;
now start from arr[3];
any O(nlogn) solution?
--
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/-/7Q8DHLIlbDoJ.
To post to this group, send email to algogeeks@googlegroups.com.
To
Hey neha whch colg r u in??
has atrenta visited ur colg??
If yes plz provide the details and some questions as well...its
visiting our campus soon...
On Aug 11, 12:47 pm, Neha Sharan neharick...@gmail.com wrote:
atrenta is coming in my campus..if anyone know the recruiting procedure or
have the
Hi everyone, does anyone know how to crack the MORGAN STANLEY written..
Pls helpThanks in advance!!!
--
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
isn't it a simple question of applying radix sort from most significant to
least signigicant digit and concatenating all the sorted numbers to get the
largest number..
On Sat, Aug 13, 2011 at 11:13 PM, Kunal Patil kp101...@gmail.com wrote:
Let me clarify.
Lets take example
53
147
@ Gaurav:
in ASCII code : '\0' is actually 0,
if you are confused with '0' and 0, first one the character and later one is
Remember that '0' is not 0 in ASCII, rather value of '0' is 48.
So they can be used in place of each other.
[ Just expanding what Sagar is trying to say]
On 14 August 2011
can anyone tell me about the format of the samsung(seso) placement paper.and
from where to prepare for this.
thanks in davance
--
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
I am afraid you are wrong Rahul Aravind:
the o/p won't be a space all the time.
the point to note is the format in which i/p is accepted,( the char *format
passed in scanf() )
i.e *\*%[^\]*\*
The i/p format should be abcd (marked as red in above for the ).
the string abcd will be considered
written test format-
part1.technical c:- and c++ questions;
part2:hardware ques-gates,multipleseretc
part3:aptitude quest
--
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
Samsung india Software operations is visiting our campus ... can u plz tell
about the recruitment process
--
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
came across this on other forum..
http://forums.sureshkumar.net/de-shaw-placement-papers/17885-deshaw-technical-questions.html
On 13 August 2011 23:32, sukran dhawan sukrandha...@gmail.com wrote:
MVIT ?
On Sat, Aug 13, 2011 at 9:02 PM, Dipankar Patro dip10c...@gmail.comwrote:
Which college?
@ankur: No its not radix sort...radix sort would give wrong answer
when the input contains heterogeneous numbered digits in the
array(even when going 4m msd to lsd)...
eg:
32,583,678,1,45,9
Radix sort would give:
9,583,678,45,32,1
whereas the answer has to be:
9,678,543,45,32,1
and hence
Can someone please mail good c++ materials. If you guys have test your c++
skills by kanetkar plz upload.
--
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
Please explain this ...
#includestdio.h
int main()
{
int *p[10];
printf(%d,sizeof(*p));
return 0;
}
Output is 4
For this program
#includestdio.h
int main()
{
int *p[10][20];
printf(%d,sizeof(*p));
return 0;
}
Output is 80 (10*20*sizeof(int))
--
You received this message because
what is the logic of your concept
On Aug 13, 5:01 pm, Kunal Patil kp101...@gmail.com wrote:
@rohit: Cast pointer to an integer into an int to get what you are
expecting.
for e.g.
printf(%d,(int)a[4]-(int)a[0]);
This will give 16.
--
You received this message because you are subscribed
in the first code the output is 4 bcoz *p means *p[0] that means p[0] that
is some address so for 32 bit machine its coming to be 4 bytes..
in the 2nd it is 80 as 20*sizeof(int *) and not as you mentioned..
On Sun, Aug 14, 2011 at 6:12 PM, rShetty rajeevr...@gmail.com wrote:
Please explain this
@rshetty
for the first code
u have array as : --_ _ _ _ _ _ _ _ _ _ ( _ denotes block of int)
so sizeof(*p) is ofcourse give you sze of int
now u have int *p[10][20];
which can be viewed as
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _
small correction in my above explanation
the %[^\] will accept the input till it doesn't encounter a
Missed the ^ (XOR) operation completely.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
the input should start with \ and end with \ . in between you can take any
string .
On Sun, Aug 14, 2011 at 6:35 PM, Poised~ dip10c...@gmail.com wrote:
small correction in my above explanation
the %[^\] will accept the input till it doesn't encounter a
Missed the ^ (XOR) operation
given two arrays : with all distinct elements but one element in common.
Find the common element in optimal time.
--
*MOHIT VERMA*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
@aditya i think the input should start with and also end with
On Sun, Aug 14, 2011 at 6:38 PM, aditya kumar
aditya.kumar130...@gmail.comwrote:
the input should start with \ and end with \ . in between you can take any
string .
On Sun, Aug 14, 2011 at 6:35 PM, Poised~ dip10c...@gmail.com
no, input should start and end with a
On Sun, Aug 14, 2011 at 6:38 PM, aditya kumar
aditya.kumar130...@gmail.comwrote:
the input should start with \ and end with \ . in between you can take any
string .
On Sun, Aug 14, 2011 at 6:35 PM, Poised~ dip10c...@gmail.com wrote:
small correction
meaning ? what is a common element ? example ???
On Sun, Aug 14, 2011 at 6:37 PM, mohit verma mohit89m...@gmail.com wrote:
given two arrays : with all distinct elements but one element in common.
Find the common element in optimal time.
--
example:
array 1 :: 1 2 3 4 5 6 7 8 9 10 15
array 2:: 23 34 56 13 15 57 432 348
On Sun, Aug 14, 2011 at 6:44 PM, shady sinv...@gmail.com wrote:
meaning ? what is a common element ? example ???
On Sun, Aug 14, 2011 at 6:37 PM, mohit verma mohit89m...@gmail.comwrote:
how about binary search of each element from array 1 on array 2?
overall complexity : O(nlogn)
On 14 August 2011 18:46, mohit verma mohit89m...@gmail.com wrote:
example:
array 1 :: 1 2 3 4 5 6 7 8 9 10 15
array 2:: 23 34 56 13 15 57 432 348
On Sun, Aug 14, 2011 at 6:44 PM, shady
Hashing
O(n+m)
On Sun, Aug 14, 2011 at 6:48 PM, Dipankar Patro dip10c...@gmail.com wrote:
how about binary search of each element from array 1 on array 2?
overall complexity : O(nlogn)
On 14 August 2011 18:46, mohit verma mohit89m...@gmail.com wrote:
example:
array 1 :: 1 2 3 4 5 6 7 8
@ Sagar:
What if extra space in not allowed?
I think then we have to use the binary search method...
On 14 August 2011 18:50, sagar pareek sagarpar...@gmail.com wrote:
Hashing
O(n+m)
On Sun, Aug 14, 2011 at 6:48 PM, Dipankar Patro dip10c...@gmail.comwrote:
how about binary search of each
@sagar suppose numbers are very large( 10^9) , how will you hash then ?
can you please state the hashing function in this case
On Sun, Aug 14, 2011 at 6:50 PM, sagar pareek sagarpar...@gmail.com wrote:
Hashing
O(n+m)
On Sun, Aug 14, 2011 at 6:48 PM, Dipankar Patro dip10c...@gmail.comwrote:
@anika and sagar : Thanks Got it.
On Sun, Aug 14, 2011 at 6:25 PM, sagar pareek sagarpar...@gmail.com wrote:
@rshetty
for the first code
u have array as : --_ _ _ _ _ _ _ _ _ _ ( _ denotes block of int)
so sizeof(*p) is ofcourse give you sze of int
now u have int *p[10][20];
which
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
Class by default is private
and struct by default is public.
On Sun, Aug 14, 2011 at 7:13 PM, programming love
love.for.programm...@gmail.com wrote:
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
why will 678 come after 583 ?
okay ., sort from least to most significant digit. append imaginary 0's at
the end of the numbers with varying length to make them of same length
On Sun, Aug 14, 2011 at 5:54 PM, Puneet Gautam puneet.nsi...@gmail.comwrote:
@ankur: No its not radix sort...radix
no one to help ??
On Sat, Aug 13, 2011 at 10:48 PM, Prakash D cegprak...@gmail.com wrote:
k lets assume that there are 10 kinds of item in the shop
price[]={10,20,30,40,50,60,70,80,90,100}
quantity[]={5,5,5,5,5,5,5,5,5,5}
say no.of items having some free discounts : 5
say p,q,r denotes
Suppose you have a large file with lots of words. How would you find the
unique words and their count?
What kind of data structure u will use? What will be the time complexity and
space complexity?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
@ raj : do dey ask questions based on gate even for software profile??and
wat is multiple seretc???
On Sun, Aug 14, 2011 at 5:08 PM, raj singh ankurkaku...@gmail.com wrote:
written test format-
part1.technical c:- and c++ questions;
part2:hardware ques-gates,multipleseretc
part3:aptitude
My doubt: If we use hashing, then how do we map a string. I am using C.
--
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/-/aURuTmAx6jEJ.
To post to this group,
i feel binary search idea is the best
guys i am having problem in finding out complexity...here is my
solution to the above problem...whats the complexity...
sort the 2 arraysa and b
l=0,i=0,flag=0;
while(a[i]b[0]) // to start comparing from the value that is
slightly greater than the
thank u aditi..
sindhu
Student of B. Tech. IV Year
--
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
doesnt matter Order will be (nlogn)
where n is max(elements in first set, elements in 2nd set)
PS : dont submit codes from next time
On Sun, Aug 14, 2011 at 7:43 PM, Nikhil Veliath nve...@gmail.com wrote:
i feel binary search idea is the best
guys i am having problem in finding out
accelrated c++
On 8/14/11, programming love love.for.programm...@gmail.com wrote:
Can someone please mail good c++ materials. If you guys have test your c++
skills by kanetkar plz upload.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
I was asked to find out the no of rows given n . i.e. how we say 4 rows for
10 ???
On 14 Aug 2011 10:54, sagar pareek sagarpar...@gmail.com wrote:
here is sudo code
take two variables
int max=1;
int count=1;
int i,total_no_of_rows;
while(total_no_of_rows--)
{
for(i=0;icount;i++)
{
Dave has given you the formula
Rahul
On Sun, Aug 14, 2011 at 7:49 PM, muruga vel murugavidya1...@gmail.comwrote:
I was asked to find out the no of rows given n . i.e. how we say 4 rows
for 10 ???
On 14 Aug 2011 10:54, sagar pareek sagarpar...@gmail.com wrote:
here is sudo code
take
How do you prevent a c++ class from being inherited??
--
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
An aptitude test of 1 hour containing 25 question of DI and 25 Puzzle reasoning
A technical test of half hour containing 20 question all on c
Followed by technical interview HR interview
On 8/14/11, parag khanna khanna.para...@gmail.com wrote:
Samsung india Software operations is visiting our
plz tell me that for this triangle.. if 12 is given then what to do?
On Sun, Aug 14, 2011 at 7:49 PM, muruga vel murugavidya1...@gmail.comwrote:
I was asked to find out the no of rows given n . i.e. how we say 4 rows
for 10 ???
On 14 Aug 2011 10:54, sagar pareek sagarpar...@gmail.com wrote:
8 times 12 is 96
96 + 1
is
97
take sqrt(97)
9.8488578017961047217462114149176
now 9.8488578017961047217462114149176 minus 1
EQUALS
8.8488578017961047217462114149176
Half IT
And Take The Ceiling of it = 5
On Sun, Aug 14, 2011 at 8:05 PM, Anika Jain anika.jai...@gmail.com wrote:
plz tell me
itz the same procedure as that of Samsung SEL
--
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
http://www.parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.8
On 14 August 2011 19:53, programming love love.for.programm...@gmail.comwrote:
How do you prevent a c++ class from being inherited??
--
You received this message because you are subscribed to the Google Groups
Algorithm
Sorry about the tree, didn't keep in mind about BST while drawing that.
But I think you all got the point that I was trying to point out.
On 13 August 2011 23:18, rajul jain rajuljain...@gmail.com wrote:
see WgpShashank second point carefully
it say successor is parent of left node
so
This is one question from Coreman
3rd Edition -
8-3-4 -- Sort n integers in the range 0 to n^3 -1 in O(n) time
Any ideas how to do this in O(n)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Check the c language implementation:
node* LeastCommonAncestor(const node* root, const int data1, const int
data2, int* const status){
static node* ans = NULL;
int l_st=0, r_st=0;
if(root==NULL) return;
if(root-left != NULL)
LeastCommonAncestor(root-left, data1, data2, l_st);
You have to make a package library which will do the calculation of
(a^b)mod(c), where a, b, c are very large size of 1 digits. (^- power).
Design a data structure for the numbers' storage and suggest what functions
will you be providing to user with them. Also mention the advantages of
using
HI Rohit,
Although i haven't checked test many cases also I am not saying
algo is wrong but DP will
always Gives us Optimal Solution, even for large data-set,but
Greedy Will Fail in That Case.I
was aware of the same Greedy Algo/Code That you posted but found
DP
if extra space is allowed .. can use counting sort
On Sun, Aug 14, 2011 at 8:38 PM, Ankur Garg ankurga...@gmail.com wrote:
This is one question from Coreman
3rd Edition -
8-3-4 -- Sort n integers in the range 0 to n^3 -1 in O(n) time
Any ideas how to do this in O(n)
--
You received
@all I Went Through Similar Question Some Times back,i hope piyesh used the
same idea, have a look @ Naive efficient Algorithm for doing the same.
http://shashank7s.blogspot.com/2011/06/wap-to-output-all-intervals-i-j-where.html
*
**Regards
Shashank Mani Computer Science Is Awesome So Why I
@aditi- yes ,they asked hardware question based on gates,multiplexer(not
multiple secret sorry for that mistake),counter etc from digital and it is
full section contain 8 to 9 question..
this company visited our collage and post offerd by them is software
developer...
section A- 8 to 9 simple
I came accross a problem where i need to hash strings..
What is the best way to hash strings??
--
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/-/LlcN35L2Su8J.
Guys, How about the below mentioned implementation?
The only assumptions is that nodes should exist in the tree. (will fail if
one node exists and another doesn't)
static Node LCA(Node root, int d1, int d2){
if(root==null)
return root;
if(root.left!=null ( root.left.data == d1 ||
fibonacci series...???
--
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,
The easiest one is to take the sum of their ASCII values.
On Sun, Aug 14, 2011 at 12:36 PM, rohit raman.u...@gmail.com wrote:
I came accross a problem where i need to hash strings..
What is the best way to hash strings??
--
You received this message because you are subscribed to the Google
google it
http://lmgtfy.com/?q=trie
On Sun, Aug 14, 2011 at 10:27 PM, rohit rajuljain...@gmail.com wrote:
Is anybody know good links for trie description and their usage?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
@Ankur: Use a radix sort with radix n. It will take 3 passes to sort
the 3 base-n digits, each of O(n), so the overall order will be O(n).
On Aug 14, 10:08 am, Ankur Garg ankurga...@gmail.com wrote:
This is one question from Coreman
3rd Edition -
8-3-4 -- Sort n integers in the range 0 to
In which college akamai coming?
-Monish
On Aug 11, 11:01 am, naveen ms naveenms...@gmail.com wrote:
hey can any1 help me out...how ll be the akamai recruiment
procedure...and if u have any akamai papers please upload it
with regards
naveen
--
You received this message because you are
@Gopi: Explain how a counting sort can be done without zeroing out an
array of size n^3, and then scanning it, or explain how to do these
operations in O(n).
Dave
On Aug 14, 10:52 am, *$* gopi.komand...@gmail.com wrote:
if extra space is allowed .. can use counting sort
On Sun, Aug 14,
Yes..i agree with Dave..Here is what i think.
As you have integers upto n^3 in your input, it would need [3*lg(n) + 1]
bits to represent each integer.
So take each group of r = ceil(lg(n)) bits at a time.
So this becomes number of bits needed to represent single digit.
Each digit thus can take 2^r
int main()
{
fork();
fork();
fork();
printf(Hello world!);
}
...this will print hello world 8 times...i.e . 2^n times
but...
int main()
{
fork();
fork();
fork();
fork()
printf(Hello world!);
}
http://ideone.com/TRKTE
..but this prints only 11 times
-- and for five forks 25 times...plz
@Rohit: Let T be an array of length 256 that contains a permutation of
the numbers between 0 and 255. Then to hash string s[],
h = 0;
for( i = 0 ; s[i] ; ++i )
h = T[h^s[i]]; // or h = T[h] ^ s[i];
You can choose a random permutation for T, or, if you have a small
known set of strings
http://faq.programmerworld.net/networking/unix-interview-questions-answers.html
refer 16 th ques in this site .. they ve told 2^n times..so only i asked
whether its compiler dependent ??
On Sun, Aug 14, 2011 at 11:12 PM, sivaviknesh s sivavikne...@gmail.comwrote:
int main()
{
fork();
search in group archive,
this question has been discussed very deeply
On 14 August 2011 23:14, sivaviknesh s sivavikne...@gmail.com wrote:
http://faq.programmerworld.net/networking/unix-interview-questions-answers.html
refer 16 th ques in this site .. they ve told 2^n times..so only i asked
Check out second run of same code: http://ideone.com/TK4qu. This time it
printed only 8 times.
The reason behind this is that, you are using a web based compiler and it
sends back the output as soon as main completes its execution. However
forked child are yet to complete.
--
You received
@Dave nice algo. Really like it.
So the whole complexity depends on the sorting.
On 14 August 2011 22:58, Dave dave_and_da...@juno.com wrote:
@Dipankar: If extra space is not allowed, I think the optimal solution
is to sort the two arrays, which takes O(max(m log m, n log n)). Then
the
can anyone tell me what is the job provided by infosys and tcs?
IF they do so much mass recruitment what kinda job the ppl get der?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
@ ghsjgl:
At each step(m), the no. ways is equal to the sum of ways till m-1 and ways
till m-2.
Look at it as you have reached at m either by taking one step from m-1 or
two steps from m-2.
I hope that answers your query.
On 14 August 2011 22:26, ghsjgl k ghsk...@gmail.com wrote:
fibonacci
*I GUESS THE example u have cited is a bit incomplete, as in you havent
included anything for the 3rd item . If you want to buy all items then some
provision for the 3rd item has to be made as well. Coreect me, if I am
wrong.*
On Sun, Aug 14, 2011 at 7:21 PM, Prakash D cegprak...@gmail.com wrote:
*My interpretation of the questions is that if number of strings are
provided, you need to hash them to an array. So, in that case you can
maintain an array of char pointers..and use some hash function such as some
arithmetic on the ascii value of first character of the string...and the
array
@ dipankar : if ur talking abt todays winshuttle ppr thn it ws mentioned
that its using x86 whch is little endian...
On Sun, Aug 14, 2011 at 11:41 PM, Dipankar Patro dip10c...@gmail.comwrote:
Hi all,
I have come across quite a few questions like
What is the way in which int m = 2 will be
do somebody tried the redirecting the output to file???
sometime results are unpredictable
Thank you,
Siddharam
On Sun, Aug 14, 2011 at 11:25 PM, Yasir yasir@gmail.com wrote:
Check out second run of same code: http://ideone.com/TK4qu. This time it
printed only 8 times.
The reason behind
@Dipankar: You are correct. The answer, like the answer to so many
questions, is It depends.
Dave
On Aug 14, 1:11 pm, Dipankar Patro dip10c...@gmail.com wrote:
Hi all,
I have come across quite a few questions like
What is the way in which int m = 2 will be stored in memory?
2 0 0 0 or 0 0
1 - 100 of 181 matches
Mail list logo