Re: [algogeeks] Adobe question

2013-06-25 Thread Jagannath Prasad Das
Is this not similar to knapsack problem? On Fri, Jun 21, 2013 at 11:24 AM, Ravi Ranjan ravi.cool2...@gmail.comwrote: There is a Blank Paper Sheet, Given a list of characters and their sizes, for ex. A, P, O, N, Q with different font sizes and designs. Now we need to cut characters from given

[algogeeks] Casual: MS in US expenses

2013-06-25 Thread Jagannath Prasad Das
Folks, I suppose this is not the right blog to query about the aforementioned subject, but i am of opinion that i can get a comprehensive reply to my question. On an average how much money(approx) does it take somebody to do a MS in US(including tution,hostel and miscellaneous) ? I suppose it

Re: [algogeeks] Casual: MS in US expenses

2013-06-25 Thread Jagannath Prasad Das
Thanks Varun. Does it include everything(tution+hostel)? On Tue, Jun 25, 2013 at 4:50 PM, Varun Nagpal varun.nagp...@gmail.comwrote: Prepare to spend atleast 20 Lakhs On Tue, Jun 25, 2013 at 4:49 PM, Jagannath Prasad Das jpdasi...@gmail.com wrote: Folks, I suppose

Re: [algogeeks] c++ this pointer

2013-06-05 Thread Jagannath Prasad Das
I guess they are garbage values. On Fri, May 31, 2013 at 3:41 PM, shubham saini shubhamsain...@gmail.comwrote: #includeiostream using namespace std; class Test { private: int x; int y; public: Test(int x = 0, int y = 0) { this-x = x; this-y = y; } void setX(int a) { x = a; }

Re: [algogeeks] Pthread and Semaphore

2012-11-26 Thread Jagannath Prasad Das
On Mon, Nov 26, 2012 at 9:46 AM, Jagannath Prasad Das jpdasi...@gmail.com wrote: @Naveen: I didn't understand your point . Can you please throw more light on join operation On Sun, Nov 25, 2012 at 10:47 PM, vIGNESH v v.v.07121...@gmail.comwrote: You can use mutex instead of semaphores if you

Re: [algogeeks] Pthread and Semaphore

2012-11-25 Thread Jagannath Prasad Das
@Naveen: I didn't understand your point . Can you please throw more light on join operation On Sun, Nov 25, 2012 at 10:47 PM, vIGNESH v v.v.07121...@gmail.com wrote: You can use mutex instead of semaphores if you need to execute only one case at a time. FROM, V.VIGNESH. M.Sc Theoretical

Re: [algogeeks] Re: amazon ques

2011-12-27 Thread Jagannath Prasad Das
@shashank and @samm: Is the deletion and searching is o(1). I doubt On Sat, Oct 1, 2011 at 6:30 PM, SAMM somnath.nit...@gmail.com wrote: Yaa it will work , but in case of deletion don't u think array will not as efficient as linked list becoz array is Static we need to define the memory b4

Re: [algogeeks] Re: function overloading query

2011-11-22 Thread Jagannath Prasad Das
Run this one: #includestdio.h void fun(const char *p) { printf(const\n); } void fun(char *P) { printf(simple\n); } int main(void) { char str[] = funcheck; //const char str1[] = constcheck; fun(str); fun(str); } On Tue, Nov 22, 2011 at 7:13 PM, MJ mayurdj...@gmail.com wrote: Hi

Re: [algogeeks] Re: function overloading query

2011-11-22 Thread Jagannath Prasad Das
Prasad Das jpdasi...@gmail.comwrote: Run this one: #includestdio.h void fun(const char *p) { printf(const\n); } void fun(char *P) { printf(simple\n); } int main(void) { char str[] = funcheck; //const char str1[] = constcheck; fun(str); fun(str); } On Tue, Nov 22

Re: [algogeeks] Time Complexity

2011-11-19 Thread Jagannath Prasad Das
I think any traversal has o(n) complexity as we traverse all the nodes.There is no skipping of nodes.Very simple logic:) On Sun, Nov 20, 2011 at 9:57 AM, tech coder techcoderonw...@gmail.comwrote: @ sravanreddy001 complexity is O(N^2) whether tree is balanced or not doesn't matter For each

Re: [algogeeks] Facebook Online Question India

2011-11-10 Thread Jagannath Prasad Das
How many students they took and whats the offer? On Thu, Nov 10, 2011 at 8:03 AM, rahul sharma rahul23111...@gmail.comwrote: facebook visit DCE???wats package??? On Wed, Nov 9, 2011 at 9:22 PM, Decipher ankurseth...@gmail.com wrote: This question was asked by Facebook during their 2 hour

Re: [algogeeks] Re: heap memory

2011-11-07 Thread Jagannath Prasad Das
I think its same as the Virtual memory On Mon, Nov 7, 2011 at 4:22 PM, Gene gene.ress...@gmail.com wrote: I think you just said the same thing I did. I disagree. As I said, you get an approximation with wrappers. You can track the amount of memory actually in use by the client program. For

Re: [algogeeks] Finding Maximum subarray in a circle

2011-11-02 Thread Jagannath Prasad Das
seems to be a independent problemu can see maximum subarray problem On Tue, Nov 1, 2011 at 11:54 PM, atul007 atul.87fri...@gmail.com wrote: Assume that there are n numbers (some possibly negative) on a circle, and we wish to find the maximum contiguous sum along an arc of the circle.

Re: [algogeeks] DS QUESTION

2011-09-18 Thread Jagannath Prasad Das
@Amol:the answer u have given is for binary ..and thats catalan number...recursive solution On Sun, Sep 18, 2011 at 1:33 PM, Anup Ghatage ghat...@gmail.com wrote: (2n)! / ((n+1)! + (n)!) Where n is the number of nodes. The above mentioned formula is for the n'th Catalan number.

Re: [algogeeks] amazon

2011-08-25 Thread Jagannath Prasad Das
what do u folks think please reply On Mon, Aug 22, 2011 at 11:43 PM, Jagannath Prasad Das jpdasi...@gmail.comwrote: In formal arguments compiler comes to know about the type of its arguments. In the actual parameter compiler also knows what is the type of parameter passed. Actually

Re: [algogeeks] Adobe Interview - 20/08/2011

2011-08-22 Thread Jagannath Prasad Das
i think find max and min of all time-stamps respectively On Mon, Aug 22, 2011 at 12:44 PM, saurabh agrawal saurabh...@gmail.comwrote: How did u solved : 3) There is a list containing the checkin and checkout time of every person in a party . The checkin time is in ascending order while the

Re: [algogeeks] Adobe Interview - 20/08/2011

2011-08-22 Thread Jagannath Prasad Das
for the stick prob is the stick length required? On Mon, Aug 22, 2011 at 12:48 PM, Jagannath Prasad Das jpdasi...@gmail.comwrote: i think find max and min of all time-stamps respectively On Mon, Aug 22, 2011 at 12:44 PM, saurabh agrawal saurabh...@gmail.comwrote: How did u solved : 3

Re: [algogeeks] amazon

2011-08-22 Thread Jagannath Prasad Das
In formal arguments compiler comes to know about the type of its arguments. In the actual parameter compiler also knows what is the type of parameter passed. Actually the type conversion takes place when the function is called at the runtime during assignment of actual to formal argument. So when

Re: [algogeeks] c++

2011-08-21 Thread Jagannath Prasad Das
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 ;

Re: [algogeeks] Math Quiz

2011-08-21 Thread Jagannath Prasad Das
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

Re: [algogeeks] Re: another q on ds!

2011-08-21 Thread Jagannath Prasad Das
Since long time i am not able to implement a min-stack where in const space and const time ... Folks please help meif it is solved then answer is the last option On Sun, Aug 21, 2011 at 9:15 PM, Dumanshu duman...@gmail.com wrote: first option is correct. Because we are not

Re: [algogeeks] c++

2011-08-21 Thread Jagannath Prasad Das
folks during temporary object creation constructor is called right..but constructor is called here only 2 times.. According to me,either copy constructor and constructor should have been called 2 times both or constructor 4 times ..but its neither of them...paradox On Sun, Aug 21,

Re: [algogeeks] Re: Amazon question

2011-08-20 Thread Jagannath Prasad Das
Hi folks, I just thought since the range of the numbers is not known so can go this way; 1.We can find the max number in the array in o(n)=MAX say 2.Then (MAX(MAX+1))/2-sum(a[1n]) of given array=S=(a1+a2+.+an)-R 3.

Re: [algogeeks] Challenge

2011-08-20 Thread Jagannath Prasad Das
what does sorted row means??? is it 00011 0 1 0 where each row is sorted or among the rows also? On Sun, Aug 21, 2011 at 9:51 AM, Sanjay Rajpal srn...@gmail.com wrote: hey see this array is not sorted, I forgot to mention this in my first post, but cleared this in subsequent

Re: [algogeeks] C OUTPUT

2011-07-25 Thread Jagannath Prasad Das
depends on endianess of processor On Mon, Jul 25, 2011 at 12:22 PM, aditya kumar aditya.kumar130...@gmail.com wrote: thnks all :) @rajeev : u are right dats y *((char*)iPtr+2) will printf 0. On Mon, Jul 25, 2011 at 11:56 AM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Consider the binary

Re: [algogeeks] Re: posix threads

2011-05-30 Thread jagannath prasad das
@anshu:thats means you say that pthreads are either kernel -level or hybrid in nature @lalit:mapping dependsfor user-level kernel isn't aware of threads,m-m is for kernel-level ,m-n for hybrid kinda does anbody knows whether pthreads are user-level or

Re: [algogeeks] Amazon online test

2011-05-26 Thread jagannath prasad das
how to register for amazon ol exm .can you plz mention ? On Sun, Apr 24, 2011 at 6:46 PM, balaji a peshwa.bal...@gmail.com wrote: yeah i did.,...there were two section Section 1 - some aptitude question + predicting output of a given program + some conceptual question(mainly in OS) Section

Re: [algogeeks] Re: debugging contest

2011-03-23 Thread jagannath prasad das
ascii values da...not 9 On Wed, Mar 23, 2011 at 8:39 PM, saurabh singh saurab...@gmail.com wrote: @cegprakash Relax shut down your computer for some time and switch on your i-pod.:) On Wed, Mar 23, 2011 at 8:39 PM, saurabh singh saurab...@gmail.comwrote: @cegprakash Relax shut down

Re: [algogeeks] Re: Tough Problem of Probability ..Surely Will Stuck ..So Think More More

2011-03-02 Thread jagannath prasad das
@rajesgeeks:i think probability of sucess of 2nd game is 2(x^2(1-x))+x^2 becoz as explained below: 1.HH...so success in 2 shots no need of 3rd one 2.HFH 3.FHH where H-hit the hoop. F-failed to hit the hoop. On Wed, Mar 2, 2011 at 7:20 PM, rajessge...@yahoo.com rajessge...@yahoo.com

Re: [algogeeks] extendible hashing

2011-02-17 Thread jagannath prasad das
@ashish goel:can you plz give the link On Mon, Feb 14, 2011 at 9:00 AM, Ashish Goel ashg...@gmail.com wrote: check on code.google.com a very nice code there, that i had picked 1 yr back...you may like to find Best Regards Ashish Goel Think positive and find fuel in failure +919985813081

Re: [algogeeks] What is the error in the following function

2011-02-15 Thread jagannath prasad das
here start is pointing to string constant which is created in read-only memory which can't be changed.so modifying it in the for loop causes segmentation fault declare it as a array type On Tue, Feb 15, 2011 at 12:36 PM, rahul rahulr...@gmail.com wrote: char *start is const char *start, pointer

Re: [algogeeks] Re: question at K10

2011-02-15 Thread jagannath prasad das
void change() { #define i i=10,n } this will do.. On Tue, Feb 15, 2011 at 11:33 PM, Rel Guzman Apaza rgap...@gmail.comwrote: Nothing... 10 in base 5 = 5 in base 10. void change(){ printf(); //...? } 2011/2/15 Don dondod...@gmail.com A semicolon is valid in the middle of a

[algogeeks]

2011-02-13 Thread jagannath prasad das
1.Let the time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2. Which of the following is TRUE? (A) t1 t2 (B) t1 = t2 (C) t1 t2 (D) Nothing can be said about the relation between t1 and t2 2.Let P be a regular language

Re: [algogeeks] extendible hashing

2011-02-11 Thread jagannath prasad das
can u plz give the link or any source codes if possible.thanx in advance On Fri, Feb 11, 2011 at 6:35 AM, Gene gene.ress...@gmail.com wrote: If I remember correctly Berkeley DB uses an extensible hashing system or did at one time. This is not part of the OS API, but rather a library

Re: [algogeeks] extendible hashing

2011-02-11 Thread jagannath prasad das
how to access berkley DB any source On Fri, Feb 11, 2011 at 4:01 PM, jagannath prasad das jpdasi...@gmail.comwrote: can u plz give the link or any source codes if possible.thanx in advance On Fri, Feb 11, 2011 at 6:35 AM, Gene gene.ress...@gmail.com wrote: If I remember correctly

Re: [algogeeks] extendible hashing

2011-02-11 Thread jagannath prasad das
i wanted the source code not this..anyway thanks.. On Sat, Feb 12, 2011 at 1:46 AM, Gene gene.ress...@gmail.com wrote: This is a very lame question. Type Berkeley DB into Google. The 3rd listing is Berkeley DB downloads at Oracle:

Re: [algogeeks] array(amazon microsoft)

2011-02-07 Thread jagannath prasad das
u can merge first two rows and proceed two at time.then slowly merge 4 at a tym and so on.a recursive algo will do On Mon, Feb 7, 2011 at 6:25 PM, Ashish Goel ashg...@gmail.com wrote: yet to test... will download xcode to compile, not on linux or windows (: remote case of all both

Re: [algogeeks] Re: c programming question

2011-02-07 Thread jagannath prasad das
r printing frm left to right?? as in, u said- Now it try to display the value from left to right which makes a++ as 13, then a has 14 and ++a as 14 so it has to beacc. to ua++ as 13, thn a as 14 and thn ++a shd b 15 thn. On Mon, Feb 7, 2011 at 11:01 AM, jagannath prasad das

Re: [algogeeks] Re: c programming question

2011-02-06 Thread jagannath prasad das
@gmail.comwrote: i think juver has explained On Feb 5, 9:34 pm, jagannath prasad das jpdasi...@gmail.com wrote: @manish:can you explain with the example of a specific compiler... On Sat, Feb 5, 2011 at 10:02 PM, jagannath prasad das jpdasi...@gmail.comwrote: @ankit:ans is 22 13 14 14

Re: [algogeeks] Re: c programming question

2011-02-06 Thread jagannath prasad das
++a makes the value of a as 13, then a and then a++ which is post increment still makes a as 13) Now it try to display the value from left to right which makes a++ as 13, then a has 14 and ++a as 14 I hope it is clear. On Sun, Feb 6, 2011 at 8:40 PM, jagannath prasad das jpdasi...@gmail.comwrote

Re: [algogeeks] Re: c programming question

2011-02-06 Thread jagannath prasad das
, 2011 at 9:04 PM, jagannath prasad das jpdasi...@gmail.comwrote: @anand:while printing post fix gave 13 but rest two why 14 On Mon, Feb 7, 2011 at 10:28 AM, Anand anandut2...@gmail.com wrote: int a=10,b; b=a++ + ++a; (Till here I think it is clear the value of a is 12 and b = 22) printf

Re: [algogeeks] Re: Good question

2011-02-06 Thread jagannath prasad das
@rajiv:i guess obj is a pointer here On Mon, Feb 7, 2011 at 10:51 AM, Rajiv Podar rajeevpo...@gmail.com wrote: Hi Try following code Suppose we need to find size of variable *obj* int size = (char*)(obj +1 ) - (char*)(obj); * *Thanks Regards, Ricky On Mon, Feb 7, 2011 at

Re: [algogeeks] Re: C++ Riddle

2011-02-06 Thread jagannath prasad das
bit operation means what? On Mon, Feb 7, 2011 at 12:00 PM, Rajiv Podar rajeevpo...@gmail.com wrote: @Dave: ++ and -- are arithmetic operations. @Jalaj: I agree with the above solution Thanks Regards, Rajiv Podar On Mon, Feb 7, 2011 at 11:47 AM, jalaj jaiswal

Re: [algogeeks] Re: c programming question

2011-02-05 Thread jagannath prasad das
@ankit:ans is 22 13 14 14 in gcc compiler. On Sat, Feb 5, 2011 at 7:24 PM, Manish Verma monsieur@gmail.com wrote: answer will depend on your compiler. On Feb 5, 1:02 am, jagannath prasad das jpdasi...@gmail.com wrote: *#includestdio.h void main(void) { int a=10,b

[algogeeks] c programming question

2011-02-04 Thread jagannath prasad das
*#includestdio.h void main(void) { int a=10,b; b=a++ + ++a; printf(%d,%d,%d,%d,b,a++,a,++a); } *what is the answer?how are the function parameters passed on the stack? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group,

Re: [algogeeks] Brain Teaser

2010-11-11 Thread jagannath prasad das
4 8 3 7 2 6 1 5 On Thu, Nov 11, 2010 at 5:57 PM, sunny agrawal sunny816.i...@gmail.comwrote: @rohit 4 5 are diagonally adjacent . On Thu, Nov 11, 2010 at 5:09 PM, Rohit Singhal rsinghal.it...@gmail.comwrote: 1 5 2 6 - - - - - - 3 7 4 8 On Thu, Nov 11, 2010 at 3:16 PM,

Re: [algogeeks] Re: please explain the output

2010-11-07 Thread jagannath prasad das
answer is 17i got in gcc comp On Sun, Nov 7, 2010 at 7:23 PM, Piyush piyushra...@gmail.com wrote: C standard says that between two sequence points object's stored value can be modified only once ( by evaluation of expression), A sequence point occurs in following conditions: 1.