Re: [algogeeks] Re: C o/p gud one try

2011-04-03 Thread DIPANKAR DUTTA
printf() is not so much strong in type conversion...it does not able to
perform correct type conversion...:)

On Thu, Mar 31, 2011 at 1:24 PM, sourabh jakhar wrote:

> these kind of question are compiler dependent
>
>
> if you are preparing for interview than these kind of questions are not
> asked
>
>
> On Tue, Mar 29, 2011 at 10:42 PM, kunal srivastav <
> kunal.shrivas...@gmail.com> wrote:
>
>> refer let us c by YK fr these type of ques
>>
>>
>> On Tue, Mar 29, 2011 at 10:07 PM, ArPiT BhAtNaGaR <
>> arpitbhatnagarm...@gmail.com> wrote:
>>
>>> please do answer geeks me waiting
>>>
>>>
>>> On Mon, Mar 28, 2011 at 11:14 PM, ArPiT BhAtNaGaR <
>>> arpitbhatnagarm...@gmail.com> wrote:
>>>
 #include
 main()
 {
 long x;
 float t;
 scanf("%f",&t);
 printf("%d\n",t);
 x=90;
 printf("%f\n",x);
 {
 x=1;
 printf("%f\n",x);
 {
 x=30;
 printf("%f\n",x);
 }
 printf("%f\n",x);
 }
 x==9;
 printf("%f\n",x);

 }

 o/p on gcc compiler
 20.3   (i/p given)
 -1073741824
 20.299988
 20.299988
 20.299988
 20.299988
 20.299988

 plz explain the o/p

 --
 Arpit Bhatnagar
 (MNIT JAIPUR)


>>>
>>>
>>> --
>>> Arpit Bhatnagar
>>> (MNIT JAIPUR)
>>>
>>>  --
>>> 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
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> thezeitgeistmovement.com
>>
>>  --
>> 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
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> SOURABH JAKHAR,(CSE)(3 year)
> ROOM NO 167 ,
> TILAK,HOSTEL
> 'MNNIT ALLAHABAD
>
> The Law of Win says, "Let's not do it your way or my way; let's do it the
> best way."
>
>  --
> 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
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
DIPANKAR DUTTA
M-TECH,Computer Science & Engg.
E&C Dept,IIT ROORKEE
Uttarakhand , India – 247667
---
website:http://people.iitr.ernet.in/shp/09535009/Website/index.html
ph no-09045809987
Lab: 286454
email:dipan...@iitr.ernet.in

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] How to Implement a HashMap

2011-04-03 Thread hammett
And amortization of growing the table when N reaches the capacity.

On Sun, Apr 3, 2011 at 7:46 AM, vaibhav agrawal  wrote:
> For implementing a HashMap, I believe following things need to be
> determined:
>
> 1. Good Hashing Function
> 2. Allocation of an array of pointers containing the structure of the key
> and values to be stored. The size of array could be determined, based on the
> number of key/value pairs to be stored, and how much memory is available or
> how fast we want the HashMap to work.
>
> Working:
> 1. Storage:
> Any key/value pair need to be stored, the key would be passed to the hash
> function to get the index of the array where the key/value pair need to be
> stored. If already a key/value is stored there, then a chain would be
> created.
>
> 2. Look-up:
> Any key which need to be looked upon, the key would be passed to the hash
> function to get the index of the array where the key/value pair is stored.
> The chain stored at that index, would be then looked sequentially to find
> out the value. If none of the node contains the key, then key is not present
> in HashMap.
>
> Thanks,
> Vaibhav
>
>
> On Sun, Apr 3, 2011 at 6:52 PM, rAun007  wrote:
>>
>> Hi Geeks,
>>
>> I was trying to find a good approach to implement a Hash Map of your
>> own  but got confused by searching the answer on the net.
>>
>> It would be very much appreciated if we can discuss different
>> approaches and the best way to implement the same.
>>
>>
>> Regards,
>>
>> Raunak
>>
>> --
>> 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
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
> --
> 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
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Cheers,
hammett
http://hammett.castleproject.org/

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Constructor and Destructor

2011-04-03 Thread MANNU
Write a program to create an array of strings. Read and display the strings
using constructor and destructor. Do not use member function.

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re:

2011-04-03 Thread Raunak Agrawal
lol :P



On Sun, Apr 3, 2011 at 9:32 PM, Carl Barton wrote:

> Haha
>
>
> On 3 April 2011 15:28, Arpit Sood  wrote:
>
>> assignment problem ? haha
>>
>>
>> On Sun, Apr 3, 2011 at 7:16 PM, Dr. Deepak Garg wrote:
>>
>>> Beta, puchna hi tha, to mujhse puchte!
>>> Anyways, you will get the solution in tomorrow's lecture @1pm.
>>> I have gone through your profile. See me in my cabin after the class.
>>> Make sure that you attend tomorrow's lecture. For now, study dynamic
>>> programming..
>>>
>>> On Apr 3, 6:03 pm, SANDEEP AAMIN  wrote:
>>> > hey guys please help me to solve this
>>> >
>>> > QUESTION :  input a number C , an output all of the ways that a group
>>> > of ascending positive numbers can be summed to give C. for e.g if
>>> > C=6,the output should be
>>> > 1+2+3
>>> > 1+5
>>> > 2+4
>>> > [solve using dynamic programming]
>>> >
>>> > please tell me about this..
>>>
>>> --
>>> 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
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>>
>>
>>
>> --
>> Regards,
>> Arpit Sood
>>
>>  --
>> 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
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> 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
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: How to Implement a HashMap

2011-04-03 Thread rAun007
Hi Vaibhav,

I perfectly understood your point but my question is:

Which data structure will you use to implement the HashMap if you have
to implement ur own HashMap.



On Apr 3, 7:46 pm, vaibhav agrawal  wrote:
> For implementing a HashMap, I believe following things need to be
> determined:
>
> 1. Good Hashing Function
> 2. Allocation of an array of pointers containing the structure of the key
> and values to be stored. The size of array could be determined, based on the
> number of key/value pairs to be stored, and how much memory is available or
> how fast we want the HashMap to work.
>
> Working:
> 1. Storage:
> Any key/value pair need to be stored, the key would be passed to the hash
> function to get the index of the array where the key/value pair need to be
> stored. If already a key/value is stored there, then a chain would be
> created.
>
> 2. Look-up:
> Any key which need to be looked upon, the key would be passed to the hash
> function to get the index of the array where the key/value pair is stored.
> The chain stored at that index, would be then looked sequentially to find
> out the value. If none of the node contains the key, then key is not present
> in HashMap.
>
> Thanks,
> Vaibhav
>
>
>
>
>
>
>
> On Sun, Apr 3, 2011 at 6:52 PM, rAun007  wrote:
> > Hi Geeks,
>
> > I was trying to find a good approach to implement a Hash Map of your
> > own  but got confused by searching the answer on the net.
>
> > It would be very much appreciated if we can discuss different
> > approaches and the best way to implement the same.
>
> > Regards,
>
> > Raunak
>
> > --
> > 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
> >http://groups.google.com/group/algogeeks?hl=en.

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re:

2011-04-03 Thread Carl Barton
Haha

On 3 April 2011 15:28, Arpit Sood  wrote:

> assignment problem ? haha
>
>
> On Sun, Apr 3, 2011 at 7:16 PM, Dr. Deepak Garg wrote:
>
>> Beta, puchna hi tha, to mujhse puchte!
>> Anyways, you will get the solution in tomorrow's lecture @1pm.
>> I have gone through your profile. See me in my cabin after the class.
>> Make sure that you attend tomorrow's lecture. For now, study dynamic
>> programming..
>>
>> On Apr 3, 6:03 pm, SANDEEP AAMIN  wrote:
>> > hey guys please help me to solve this
>> >
>> > QUESTION :  input a number C , an output all of the ways that a group
>> > of ascending positive numbers can be summed to give C. for e.g if
>> > C=6,the output should be
>> > 1+2+3
>> > 1+5
>> > 2+4
>> > [solve using dynamic programming]
>> >
>> > please tell me about this..
>>
>> --
>> 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
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>
>
> --
> Regards,
> Arpit Sood
>
>  --
> 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
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] DP sorting

2011-04-03 Thread Rahul Singal
Hey Samba,
Check this solution
dp[i][j]= cost required to get the sorted sequence from index i to index j

dp[i][j]= min(dp[i+1][j] + (i-j)*indexof(i) in the sequence ,dp[i][j-1] +
(i-j) *indexof(j) insequence)

Since the current state depends on only previous 2 states so you can
optimize space to O(n) .

Thanks
Rahul

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] How to Implement a HashMap

2011-04-03 Thread vaibhav agrawal
For implementing a HashMap, I believe following things need to be
determined:

1. Good Hashing Function
2. Allocation of an array of pointers containing the structure of the key
and values to be stored. The size of array could be determined, based on the
number of key/value pairs to be stored, and how much memory is available or
how fast we want the HashMap to work.

Working:
1. Storage:
Any key/value pair need to be stored, the key would be passed to the hash
function to get the index of the array where the key/value pair need to be
stored. If already a key/value is stored there, then a chain would be
created.

2. Look-up:
Any key which need to be looked upon, the key would be passed to the hash
function to get the index of the array where the key/value pair is stored.
The chain stored at that index, would be then looked sequentially to find
out the value. If none of the node contains the key, then key is not present
in HashMap.

Thanks,
Vaibhav


On Sun, Apr 3, 2011 at 6:52 PM, rAun007  wrote:

> Hi Geeks,
>
> I was trying to find a good approach to implement a Hash Map of your
> own  but got confused by searching the answer on the net.
>
> It would be very much appreciated if we can discuss different
> approaches and the best way to implement the same.
>
>
> Regards,
>
> Raunak
>
> --
> 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
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] CFP with Extended Deadline of Apr. 10: The 2011 International Conference on Computer Graphics and Virtual Reality (CGVR'11), USA, July 18-21, 2011

2011-04-03 Thread A. M. G. Solo
Dear Colleagues:
Please share the announcement below with those who may be interested.
Thank you, Organizing Committee

 
 CALL  FOR  PAPERS
 ===
  Extended Paper Submission Deadline:  April 10, 2011
 
    CGVR'11
 The 2011 International Conference on Computer Graphics
  and Virtual Reality
 
   July 18-21, 2011, Las Vegas, USA
    http://www.world-academy-of-science.org/
 ===  
 
You are invited to submit a full paper for consideration. All
accepted papers will be published in the CGVR conference
proceedings (in printed book form; later, the proceedings will
also be accessible online). Those interested in proposing
workshops/sessions, should refer to the relevant sections that
appear below.
 
SCOPE: Topics of interest include, but are not limited to, the following:
 
O  Computer animation
O  Software tools for computer graphics
O  Rendering methods
O  Compression methods
O  Computational geometry
O  Fractal geometry and applications
O  Sound rendering technologies
O  Color and texture
O  Modeling techniques
O  Visualization
O  Surface modeling
O  Web 3D and applications
O  Machine architectures/engines for graphics and VR
O  Modeling of natural scenes and phenomena
O  Computer art and entertainment (including games)
O  Shadows, translucency and visibility
O  e-Learning applications and computer graphics
O  Illumination and reflection techniques
O  Interactive digital media
O  3D reconstruction
O  Curves and meshes
O  Visual computing and graphics
O  Image data structures for computer graphics
O  Graphics algorithms and applications
O  Case studies and emerging technologies
---
O  Virtual environments
O  Virtual and augmented reality
O  Virtual humans and artificial life
O  Real-time collision detection algorithms
O  Immersive virtual reality
O  Virtual reality, visualization, and education
O  Interactive techniques
O  Learning and assessment based on virtual reality approaches
O  Virtual laboratories
O  Virtual reality tools/languages (X3D, Kinect, VRML, Java3D, OpenGL, ...)
O  Real-time rendering for VR
O  Emerging display technologies
O  Virtual reality techniques for behavioral and cognitive assessment
O  Simulation and virtual reality
O  Software tools for virtual reality
O  Human-computer interfaces
O  Multimodal display systems
O  Integration of virtual reality and multimedia
O  Haptic devices and techniques
O  Virtual reality and emerging applications
 
 
USEFUL WEB LINKS:
To see the DBLP list of accepted papers of CGVR 2009, go to:
http://www.informatik.uni-trier.de/~ley/db/conf/cgvr/cgvr2009.html
The DBLP list of accepted papers of CGVR 2010 will soon appear at:
http://www.informatik.uni-trier.de/~ley/db/conf/cgvr/cgvr2010.html
CGVR 2011 URL: 
http://www.world-academy-of-science.org/worldcomp11/ws/conferences/cgvr11
 
 
IMPORTANT DATES:
 
April 10, 2011: Submission of papers (about 5 to 7 pages)
April 25-30, 2011:  Notification of acceptance (+/- 6 days)
May 7, 2011:    Final papers + Copyright/Consent + Registration
July 18-21, 2011:   The 2011 International Conference on Computer
    Graphics and Virtual Reality (CGVR'11)
 
 
ACADEMIC CO-SPONSORS:
 
Currently being prepared - The Academic sponsors of the last offering
of CGVR (2010) included research labs and centers affiliated
with (a partial list): University of California, Berkeley; University
of Southern California; University of Texas at Austin; Harvard
University, Cambridge, Massachusetts; Georgia Institute of Technology,
Georgia; Emory University, Georgia; University of Minnesota;
University of Iowa; University of North Dakota; NDSU-CIIT Green
Computing & Comm. Lab.; University of Siegen, Germany; UMIT, Austria;
SECLAB (University of Naples Federico II + University of Naples
Parthenope + Second University of Naples, Italy); National Institute
for Health Research; World Academy of Biomedical Sciences and
Technologies; Russian Academy of Sciences, Russia; International
Society of Intelligent Biological Medicine (ISIBM); The International
Council on Medical and Care Compunetics; Eastern Virginia Medical
School & the American College of Surgeons, USA.
 
 
SUBMISSION OF PAPERS:
 
Prospective authors are invited to submit their papers by uploading
them to the evaluation web site at:  http://world-comp.org
Submissions must be uploaded by April 10, 2011 and they must be
in either MS doc (but not docx) or pdf formats (about 5 to 7
pages - single space, font size of 10 to 12). All reasonable
typesetting formats are acceptable (later, the authors of accepted
papers will be asked to follow a particular typesetting format to
prepare their final papers for publication.) Papers must not have
been previously published or currently submitted for publication
elsewhere.
The first page of the paper should include: title of th

Re: [algogeeks] Re:

2011-04-03 Thread Arpit Sood
assignment problem ? haha

On Sun, Apr 3, 2011 at 7:16 PM, Dr. Deepak Garg  wrote:

> Beta, puchna hi tha, to mujhse puchte!
> Anyways, you will get the solution in tomorrow's lecture @1pm.
> I have gone through your profile. See me in my cabin after the class.
> Make sure that you attend tomorrow's lecture. For now, study dynamic
> programming..
>
> On Apr 3, 6:03 pm, SANDEEP AAMIN  wrote:
> > hey guys please help me to solve this
> >
> > QUESTION :  input a number C , an output all of the ways that a group
> > of ascending positive numbers can be summed to give C. for e.g if
> > C=6,the output should be
> > 1+2+3
> > 1+5
> > 2+4
> > [solve using dynamic programming]
> >
> > please tell me about this..
>
> --
> 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
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Regards,
Arpit Sood

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] STUDENT SHOULD READ THIS AND PLEASE FORWARD THIS WE ARE STUDENTS LIKE YOU TOO

2011-04-03 Thread ArPiT BhAtNaGaR
MNIT JAIPUR PRESENTS YOU

KAMPUSATTACK.COM 


Biggest Social Platform For Students by Students



   -

   Enjoy Spiced up Social Networking With Hot Features!
   -

   Get Connected To Constillation Of Young Brains Like You!
   -

   Access & share useful collection of Ebooks,Notes, Ppt's,Codes,Programs.
   etc..



   -

   Find Lot Of Humor & Fun Inside!
   -

   Chat With Spicy Kampus Messenger with new people , Play Amazing Games.



*! STAND OUT FROM CROWD !*



   With Our Useful Resources You Will Never Be Same As Rest Of Crowd



   -

   GD 's With Pro's & Con's.
   -

   INTERVIEW preprations by personal experience of people.
   -

   PLACEMENT PAPERS
   -

   *College Previous Papers*
   -

   *Info About Latest **Technologies & Gadgets.*
   -

   *Project Ideas & help.*
   -

   *INTERNSHIP & TRANING GUIDANCE.*





   *! BE CONNECTED AND UPDATED!*


   -

   *Connect With Your Pal's , Senior's & Alumni's.*
   -

   *Exchange Idea's With People Across Kampuses.*




*! EXCLUSIVE EXPERT ZONE !*



   -

   STEP OUT from other's with our *INDUSTRIAL GUINDANCE* from Adobe ,
   Microsoft, NTPC, BPCL ,Accenture.
   -

   Field Experts & Career Consultant Inside.


Register Today!

*WWW.KAMPUSATTACK.COM* 


-- 
-- 
Arpit Bhatnagar
(MNIT JAIPUR)

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re:

2011-04-03 Thread LALIT SHARMA
:P

On Sun, Apr 3, 2011 at 9:46 AM, Dr. Deepak Garg  wrote:

> Beta, puchna hi tha, to mujhse puchte!
> Anyways, you will get the solution in tomorrow's lecture @1pm.
> I have gone through your profile. See me in my cabin after the class.
> Make sure that you attend tomorrow's lecture. For now, study dynamic
> programming..
>
> On Apr 3, 6:03 pm, SANDEEP AAMIN  wrote:
> > hey guys please help me to solve this
> >
> > QUESTION :  input a number C , an output all of the ways that a group
> > of ascending positive numbers can be summed to give C. for e.g if
> > C=6,the output should be
> > 1+2+3
> > 1+5
> > 2+4
> > [solve using dynamic programming]
> >
> > please tell me about this..
>
> --
> 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
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Lalit Kishore Sharma,

IIIT Allahabad (Amethi Capmus),
6th Sem.

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re:

2011-04-03 Thread Dr. Deepak Garg
Beta, puchna hi tha, to mujhse puchte!
Anyways, you will get the solution in tomorrow's lecture @1pm.
I have gone through your profile. See me in my cabin after the class.
Make sure that you attend tomorrow's lecture. For now, study dynamic
programming..

On Apr 3, 6:03 pm, SANDEEP AAMIN  wrote:
> hey guys please help me to solve this
>
> QUESTION :  input a number C , an output all of the ways that a group
> of ascending positive numbers can be summed to give C. for e.g if
> C=6,the output should be
> 1+2+3
> 1+5
> 2+4
> [solve using dynamic programming]
>
> please tell me about this..

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] How to Implement a HashMap

2011-04-03 Thread rAun007
Hi Geeks,

I was trying to find a good approach to implement a Hash Map of your
own  but got confused by searching the answer on the net.

It would be very much appreciated if we can discuss different
approaches and the best way to implement the same.


Regards,

Raunak

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] graphs

2011-04-03 Thread SANDEEP AAMIN
>
>
> QUESTION :  input a number C , an output all of the ways that a group
> of ascending positive numbers can be summed to give C. for e.g if
> C=6,the output should be
> 1+2+3
> 1+5
> 2+4
> [solve using dynamic programming]
>
> please tell me about this..d
>

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks]

2011-04-03 Thread SANDEEP AAMIN
hey guys please help me to solve this

QUESTION :  input a number C , an output all of the ways that a group
of ascending positive numbers can be summed to give C. for e.g if
C=6,the output should be
1+2+3
1+5
2+4
[solve using dynamic programming]

please tell me about this..

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Microcontroller LED project

2011-04-03 Thread SANDEEP AAMIN
hey guys please help me to solve this

QUESTION :  input a number C , an output all of the ways that a group
of ascending positive numbers can be summed to give C. for e.g if
C=6,the output should be
1+2+3
1+5
2+4
[solve using dynamic programming]

please tell me about this..

On Sun, Apr 3, 2011 at 5:29 PM, bittu  wrote:

> In Hurray
>  but after seeing ur post,i can tell you, you make code in Assembly
> Lang. , u can use 8085 Microprocessor & 51 micro-controller
>  its very simple to code to display using assembly80 using 8085 ,i
> have done may programs in collage using 8085  assembly & don't
> remember now,,hope it will help u..u have do some practice of 8085
> assembly
>
>
> Thanks & Regards
> Shashank Mani
> CSE,BIT Mesra
>
> --
> 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
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks]

2011-04-03 Thread SANDEEP AAMIN
question : A programmer wants to test whether or not n given
conditions are all simultaneously true (e.g he may want to test
whether both x>0 and yhttp://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Microcontroller LED project

2011-04-03 Thread bittu
In Hurray
 but after seeing ur post,i can tell you, you make code in Assembly
Lang. , u can use 8085 Microprocessor & 51 micro-controller
 its very simple to code to display using assembly80 using 8085 ,i
have done may programs in collage using 8085  assembly & don't
remember now,,hope it will help u..u have do some practice of 8085
assembly


Thanks & Regards
Shashank Mani
CSE,BIT Mesra

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] DP sorting

2011-04-03 Thread ankit sambyal
Hey guys help me solve the following DP problem:

An N-element permutation is an N-element sequence of distinct numbers from
the set {1, 2, ...,n}. For example the sequence 2,1,4,5,3 is a 5-element
permutation. P is an N-element permutation. Your task is to sort P in
ascending order. But because it is very simple, I have a new rule for you.
You have two sequences P and Q. P is an N-element permutation and Q is
initially empty and formed by sorting P (i.e. finally Q = 1, 2, 3,... , N).
You have to implement N steps to sort P. In the i-th step, P has N-i+1
remaining elements, Q has i-1 elements and you have to choose some x-th
element (from the N-i+1 available elements) of P and put it to the left or
to the right of Q. The cost of this step is equal to *x * i*. The total cost
is the sum of costs of individual steps. After N steps, Q must be an
ascending sequence. Your task is to minimize the total cost.
Input

The first line of the input file is T (T ≤ 10), the number of test cases.
Then descriptions of T test cases follow. The description of each test case
consists of two lines. The first line contains a single integer N (1 ≤ N ≤
1000). The second line contains N distinct integers from the set {1, 2, ..,
N}, the N-element permutation P.
Output

For each test case your program should write one line, containing a single
integer - the minimum total cost of sorting.
Example

N = 4
P = {4,1,3,2}
Step 1, Choose 3-rd, P={4,1,2}, Q={3} , Cost=3
Step 2, Choose 1-st, P={1,2}, Q={3,4} , Cost=2
Step 3, Choose 2-nd, P={1}, Q={2,3,4} , Cost=6
Step 4, Choose 1-st, P={}, Q={1,2,3,4}, Cost=4
The total cost is 15.
Another way to sort:
Step 1, Choose 4-th, P={4,1,3}, Q={2} , Cost=4
Step 2, Choose 2-nd, P={4,3}, Q={1,2} , Cost=4
Step 3, Choose 2-nd, P={4}, Q={1,2,3} , Cost=6
Step 4, Choose 1-st, P={}, Q={1,2,3,4}, Cost=4
The total cost is 18.

*Input:*
1
4
4 1 3 2
*Output:*
15




Regards

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] graphs

2011-04-03 Thread Akash Mukherjee
wouldn't a modified dijkstra do the trick??

On 4/2/11, Tech id  wrote:
> Given a directed graph G, with V vertices and E edges. Each edge in E
> is associated with a real number ‘r’,a reliabilty factor with r
> between 0(exclusive) and 1(inclusive). You are also given a pair of
> nodes u and v. Find the most reliable path in the given graph from u
> to v.
> Input will be the graph represented as a matrix with the following
> format:
> * the number of vertices n. (therefore, A is an nxn matrix)
> * The elements of A, row-wise: (total n*n numbers)
> A(i,j) = 0 denotes that the edge (i,j) is not present
> A(i,j) between 0 (exclusive) and 1 (inclusive) indicates
> that the edge (i,j) is present with reliability A(i,j).
> Output: Your output will be a sequence of vertices giving the path
> from u to v such as 1,4,3,5,8,6,7 with u=1 and v=7. The output is thus
> a comma separated list of vertices giving the path from u to v.
>
> --
> 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
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Microcontroller LED project

2011-04-03 Thread cegprakash
i've to do a project for my end semester.. its very urgent..

i'm going to construct a 10*10 LED board
i've to display 2 digit numbers in the board by a micro controller
also i donno which language i should code..

In a clear way i've to control all the LED's using a program. If you
know any system for it plz reply..

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Popular Puzzle of the week

2011-04-03 Thread shady
we are already getting your feed on the algogeeks, and please don't keep on
posting all kind of stuff. don't put puzzles, put algorithmic questions. one
more thing, most of your puzzles are also not original.

On Sun, Apr 3, 2011 at 1:18 PM, Lavesh Rawat  wrote:

>
> Hi,
>
> Based on most comments, The popular puzzle of the last week is
>
> http://dailybrainteaser.blogspot.com/2011/04/1april.html?lavesh=lavesh
>
> Please subscribe and follow this blog to show your liking to the blog.
>
> --
>
> "Never explain yourself. Your friends don’t need it and
> your enemies won’t believe 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 unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Popular Puzzle of the week

2011-04-03 Thread Lavesh Rawat
Hi,

Based on most comments, The popular puzzle of the last week is

http://dailybrainteaser.blogspot.com/2011/04/1april.html?lavesh=lavesh

Please subscribe and follow this blog to show your liking to the blog.

-- 

"Never explain yourself. Your friends don’t need it and
your enemies won’t believe 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 unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.