[algogeeks] Re: spoj--two squares problem

2011-05-26 Thread ricky
thanks :) it worked. cheers

On May 25, 12:12 pm, Saikat Debnath crazysai...@gmail.com wrote:
 I think your problem is you are using int. Use long long.







 On Thu, May 26, 2011 at 12:29 AM, ricky moon.afr...@gmail.com wrote:
  can anyone help me out with this problem:
 https://www.spoj.pl/problems/TWOSQRS/
  It runs on my machine with this code but it gives wrong ans on their
  site.

  #includeiostream
  #includemath.h

  using namespace std;

  int main()
  {
  int i=0,j=0,X=0,t=0,count=0;
  cint;
  while(t--)
  {
   cinX;
   i=sqrt(X);
   j=sqrt(X-i*i);
   while(i=0  i=j)
    {
       if((i*i)+(j*j)==X)
         {count++;}
        i--;
        j=sqrt(X-i*i);

    }
    if(count0)
     coutYes;
     else coutNo;
    count=0;
    coutendl;
  }
  return 0;
  }

  --
  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] [brain teaser ] Mystery Puzzle Sherlock Holmes 26 may

2011-05-26 Thread Lavesh Rawat
*Mystery Puzzle Sherlock Holmes
 *
*
*
**
*One snowy night, Sherlock Holmes was in his house sitting by a fire. All of
a sudden a snowball came crashing through his window, breaking it.
Holmes got up and looked out the window just in time to see three
neighborhood kids who were brothers run around a corner. Their names were
John Crimson, Mark Crimson and Paul Crimson.
The next day Holmes got a note on his door that read '? Crimson. He broke
your window.'
Which of the three Crimson brothers should Sherlock Holmes question about
the incident?
*

*Update Your Answers at* : Click
Herehttp://dailybrainteaser.blogspot.com/2011/05/mystery-puzzle-sherlock-holmes-26-may.html?lavesh=lavesh


Solution:
Will be updated after 1 day



-- 

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.



Re: [algogeeks] [brain teaser ] Mystery Puzzle Sherlock Holmes 26 may

2011-05-26 Thread immanuel kingston
Mark

On Thu, May 26, 2011 at 1:05 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote:

 *Mystery Puzzle Sherlock Holmes
  *
 *
 *
 **
 *One snowy night, Sherlock Holmes was in his house sitting by a fire. All
 of a sudden a snowball came crashing through his window, breaking it.
 Holmes got up and looked out the window just in time to see three
 neighborhood kids who were brothers run around a corner. Their names were
 John Crimson, Mark Crimson and Paul Crimson.
 The next day Holmes got a note on his door that read '? Crimson. He broke
 your window.'
 Which of the three Crimson brothers should Sherlock Holmes question about
 the incident?
 *

 *Update Your Answers at* : Click 
 Herehttp://dailybrainteaser.blogspot.com/2011/05/mystery-puzzle-sherlock-holmes-26-may.html?lavesh=lavesh


 Solution:
 Will be updated after 1 day



 --

 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.



Re: [algogeeks] Re: strings

2011-05-26 Thread Senthil S
Can it be done this way ..Take count of each alphabet for all the three
strings and store separately.. Then for each alphabet in the third string,
check if its count is equal to the sum of the counts of the corresponding
alphabet in the first two strings .. If the counts match for all alphabets
then the third string is an interleaving of the first two ..

-- 
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] threading

2011-05-26 Thread jagannath
Pthread is a user-level thread or kernel-level?.Java
supports user-level threading i know ,but while doing a project on
web-
crawling i marked the cpu-utilization in conky(ubuntu) ,both the
cores' utilization increased drastically as program ran.I know that in
user-level threading kernel is not aware whether a process is
multithreaded or not,rather it sees the entire process as a single
entity .But in my project i think the dual cores utilization increased
because of the threads being scheduled on both the cores.I dont
understand how is it possible as the kernel isn't aware of the process
thread since it is user-level(java thread).Is it because of jvm
implicit feature or java threads are hybrid kind in nature.

-- 
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] 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 2- programming section...there were three questions
1)given two sorted linked list u have to return the linked list
 which is the merged list of the first two and also is sorted.
 2)given two Binary trees, u have to find whether the second is a
 sub tree of the first...
 3)Given an array which contains integers(may contain thousands of
 elements), u have to write a program to find the second largest element of
 the group
the first two u can run (i.e) u can check the outputbut
 the third u have to just write the code and u cant check the output


 On Sun, Apr 24, 2011 at 6:15 PM, JeanGrey shukla.preet...@gmail.comwrote:

 Has anyone attended amazon online test recently  ? what will be the
 type of questions which will be asked?

 --
 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.




 --
 A.Balaji

  --
 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: strings

2011-05-26 Thread sunny agrawal
@senthil
nopes, it will not work
eg.
S3 = cba
S1 = a
S2 = bc
count matches but not interleaved

On Thu, May 26, 2011 at 2:43 PM, Senthil S senthil2...@gmail.com wrote:

 Can it be done this way ..Take count of each alphabet for all the three
 strings and store separately.. Then for each alphabet in the third string,
 check if its count is equal to the sum of the counts of the corresponding
 alphabet in the first two strings .. If the counts match for all alphabets
 then the third string is an interleaving of the first two ..

 --
 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.




-- 
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee

-- 
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] threading

2011-05-26 Thread anshu mishra
it is os responsibility to map user level thread to kernel level thread.
Usually os implements many to many mapping.
In pthread we can bind a particular thread to particular processor or set of
processor.

-- 
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: strings

2011-05-26 Thread saurabh agrawal
Gys, this problem can b esolved using dynamic programming in o n^2.l
recursive/iterative approach wont work.

Regards
Saurabh

On Thu, May 26, 2011 at 4:41 PM, sunny agrawal sunny816.i...@gmail.comwrote:

 @senthil
 nopes, it will not work
 eg.
 S3 = cba
 S1 = a
 S2 = bc
 count matches but not interleaved


 On Thu, May 26, 2011 at 2:43 PM, Senthil S senthil2...@gmail.com wrote:

 Can it be done this way ..Take count of each alphabet for all the three
 strings and store separately.. Then for each alphabet in the third string,
 check if its count is equal to the sum of the counts of the corresponding
 alphabet in the first two strings .. If the counts match for all alphabets
 then the third string is an interleaving of the first two ..

 --
 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.




 --
 Sunny Aggrawal
 B-Tech IV year,CSI
 Indian Institute Of Technology,Roorkee


  --
 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: strings

2011-05-26 Thread Don
But checking the count is a good first step. If the count doesn't
match the result is false. If the count does match, you need to check
further. I found that my test set ran 10x faster if I checked the
count first.

Don

On May 26, 6:11 am, sunny agrawal sunny816.i...@gmail.com wrote:
 @senthil
 nopes, it will not work
 eg.
 S3 = cba
 S1 = a
 S2 = bc
 count matches but not interleaved



 On Thu, May 26, 2011 at 2:43 PM, Senthil S senthil2...@gmail.com wrote:
  Can it be done this way ..Take count of each alphabet for all the three
  strings and store separately.. Then for each alphabet in the third string,
  check if its count is equal to the sum of the counts of the corresponding
  alphabet in the first two strings .. If the counts match for all alphabets
  then the third string is an interleaving of the first two ..

  --
  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.

 --
 Sunny Aggrawal
 B-Tech IV year,CSI
 Indian Institute Of Technology,Roorkee

-- 
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: Round Robin Schedulling Problem

2011-05-26 Thread vishwakarma
@Anshuman sir
There is mistake in above code :
u wrote  --  ans[IN[i]] = curtime + (D[i] - last - 1) * rem + (i -
L[IN[i]] + 1); 
I think it should be -- ans[IN[i]] = curtime + (D[i] - last - 1) *
rem + (IN[i]- L[IN[i]] + 1);

correct me if  i m wrong 

On May 26, 9:17 am, anshu mishra anshumishra6...@gmail.com wrote:
 L[i] tells how many elements D[j] less than D[i] such that j  i ;
 for this u have to use BIT, segment tree, or any balanced BST(balanced
 implies to avoid the worst case that is o(n^2));

 rem = n;
 curtime = 0;
 last = 0;
 for (i = 0; i  n;)

       ans[IN[i]] = curtime + (D[i] - last - 1) * rem + (i - L[IN[i]] + 1);
       curtime += (D[i] - last) * rem;
       i++;
       rem--;
       while (i  n  D[i] == D[i-1])
       {
          ans[IN[i]] = ans[IN[i-1]] + 1; i++;
          rem--;
       }
       last = d[i-1];

 }

 curtime = total time till the iteration in which last event(which has burst
 time just less than current event) has been completed.

-- 
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] Admin of Group

2011-05-26 Thread pacific :-)
+1

On Wed, May 25, 2011 at 11:48 PM, anuj agarwal coolbuddy...@gmail.comwrote:

 Hi,

 Are there any admins on this group? I recently joined this group and i
 liked the discussions going on here.

 But there is a problem which hurts is that unlike other groups which are
 moderated by certain admin guys (also active members of group), this one is
 not.
 So we are receiving lots of SPAMS. I guess no body wants to get a job from
 this group (specially ones which are sent by some Panzer).

 If the mods are reading this, Please take some action on that mails so that
 group will remain clean.

 Sorry for off topic.

 Anuj Agarwal
 Engineering is the art of making what you want from things you can get.

 --
 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,
chinna.

-- 
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] Admin of Group

2011-05-26 Thread radha krishnan
+100

On Thu, May 26, 2011 at 9:26 PM, pacific :-) pacific4...@gmail.com wrote:

 +1


 On Wed, May 25, 2011 at 11:48 PM, anuj agarwal coolbuddy...@gmail.comwrote:

 Hi,

 Are there any admins on this group? I recently joined this group and i
 liked the discussions going on here.

 But there is a problem which hurts is that unlike other groups which are
 moderated by certain admin guys (also active members of group), this one is
 not.
 So we are receiving lots of SPAMS. I guess no body wants to get a job from
 this group (specially ones which are sent by some Panzer).

 If the mods are reading this, Please take some action on that mails so
 that group will remain clean.

 Sorry for off topic.

 Anuj Agarwal
 Engineering is the art of making what you want from things you can get.

 --
 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,
 chinna.

  --
 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] Admin of Group

2011-05-26 Thread Ashish Patel
+1000 ..dont count this as SPAM! :D

On Thu, May 26, 2011 at 9:29 PM, radha krishnan 
radhakrishnance...@gmail.com wrote:

 +100

 On Thu, May 26, 2011 at 9:26 PM, pacific :-) pacific4...@gmail.comwrote:

 +1


 On Wed, May 25, 2011 at 11:48 PM, anuj agarwal coolbuddy...@gmail.comwrote:

 Hi,

 Are there any admins on this group? I recently joined this group and i
 liked the discussions going on here.

 But there is a problem which hurts is that unlike other groups which are
 moderated by certain admin guys (also active members of group), this one is
 not.
 So we are receiving lots of SPAMS. I guess no body wants to get a job
 from this group (specially ones which are sent by some Panzer).

 If the mods are reading this, Please take some action on that mails so
 that group will remain clean.

 Sorry for off topic.

 Anuj Agarwal
 Engineering is the art of making what you want from things you can get.

 --
 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,
 chinna.

  --
 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] C#.Net developer -- Miami FL -- 6 month contract

2011-05-26 Thread sohail panzer
Hello,
Hope you are doing well.
I am a technical recruiter with Panzer Solutions LLC Software Implementing
and IT consulting company located in CT. Please go through the Job
Description and send me your updated resume with contact information.
*Please reply at soh...@panzersolutions.com
*
Title  :   C#.Net developer
Location:   Miami FL
Duration:   6 month contract
Rate  :   $40/Hr on C2c or 1099


This person will be working independently on the development (coding) and
enhancements to a web application.  They will also need to do testing of the
web application.

-It is very important for these candidates to have Batch Processing in a
large database environment (LARGE AMOUNTS OF DATA)

MUST HAVES:
HTML
JavaScript
JQuery or Silverlight
.NET Framework
Solid understanding of object oriented programming and database design
concepts.
Ability to perform unit and integration testing of both new and existing
processes.
Can work independently, does not need direction and can think outside of the
box



Thank you,

Sohail Khan | Technical Recruiter
Panzer Solutions LLc
45 Stuart Ave, K
Norwalk, CT 06850 USA
Voice: 203-813-2052
soh...@panzersolutions.com
URL: www.panzersolutions.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.



Re: [algogeeks] [brain teaser ] Mystery Puzzle Sherlock Holmes 26 may

2011-05-26 Thread DeVaNsH gUpTa
Mark as it reads ?(Question Mark) Crimson.

-- 
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] Immediate Need for Sharepoint/.NET Developer in Denver CO

2011-05-26 Thread sohail panzer
Hello,
Hope you are doing well.
I am a technical recruiter with Panzer Solutions LLC Software Implementing
and IT consulting company located in CT. Please go through the Job
Description and send me your updated resume with contact information.
Please reply at soh...@panzersolutions.com

Title  :   Sharepoint/.NET Developer
Location   :   Denver CO
Duration  :   6 month contract to hire
Green card and Citizens only

 *Must-haves *
Our client is looking for a motivated individual with the following
experience...
8 years development experience with 3 years designing and developing .NET
projects
Experience deploying, configuring and customizing Sharepoint WSS 3.0 and/or
Sharepoint 2010
Experience with object oriented analysis/design
Knowledge of design patterns, refactoring and unit testing
Exposure and knowledge of various ORM technologies such as NHibernate
Experience using Agile Methodologies such as Extreme Programming (XP)
Experience with LINQ and Entity Framework
Experience integrating COTS (commercial off-the-shelf) applications into
portals is highly desirable
Experience with DOJO, JQuery, or Microsoft AJAX Toolkit
Experience with automated deployment solutions like Nant or MSBuild



Thank you,

Sohail Khan | Technical Recruiter
Panzer Solutions LLc
45 Stuart Ave, K
Norwalk, CT 06850 USA
Voice: 203-813-2052
soh...@panzersolutions.com
URL: www.panzersolutions.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.



[algogeeks] suitable data structure

2011-05-26 Thread himanshu kansal
if a large no of documents are available and need to find out the
spelling errors.for this the words are compared wd a dictionary
fileif a word is nt present in dictionary thn it is sure dt d word
is wrong...thn v hv to print d no of occurences of the wrong
wordassuming dt d word vl occur frquently in d file nd wd b wrong
everytimewhch data structure wd b best suited for storing d wrong
wordsso tht v cn find whthr a wrd is wrong wdout scanning the
dictionary

-- 
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: Round Robin Schedulling Problem

2011-05-26 Thread vishwakarma
wait !! wait !!
@Anshuman sir...u  have left few case ;

I corrected ur code and got accepted at spoj.

Here is the correct code;
//here F[] is array which got 3 fields ( element value(same as ur D[]
array) , its index in original input(same as ur IN[] array) , number
of elements less than it till its poistion in original array(same as
ur L[] array) )

long long int rem = n;
long long int curtime = 0;
long long int last = 0;
long long int *Ans = new long long int[n];

for(int i=0;in;){
Ans[F[i].idx] = curtime + ((long long 
int)(F[i].data-last-1))*rem +
(long long int)(F[i].idx-F[i].rep+1);
curtime += ((long long int)(F[i].data - last))*rem;
i++;
rem--;
while(in  F[i].data == F[i-1].data){
Ans[F[i].idx] = Ans[F[i-1].idx] + (long long 
int)(F[i].idx -
F[i-1].idx - (F[i].rep - F[i-1].rep));
i++;
rem--;
}
last = (long long int)F[i-1].data;
}

On May 26, 8:15 pm, vishwakarma vishwakarma.ii...@gmail.com wrote:
 @Anshuman sir
 There is mistake in above code :
 u wrote  --  ans[IN[i]] = curtime + (D[i] - last - 1) * rem + (i -
 L[IN[i]] + 1); 
 I think it should be -- ans[IN[i]] = curtime + (D[i] - last - 1) *
 rem + (IN[i]- L[IN[i]] + 1);

 correct me if  i m wrong 

 On May 26, 9:17 am, anshu mishra anshumishra6...@gmail.com wrote:







  L[i] tells how many elements D[j] less than D[i] such that j  i ;
  for this u have to use BIT, segment tree, or any balanced BST(balanced
  implies to avoid the worst case that is o(n^2));

  rem = n;
  curtime = 0;
  last = 0;
  for (i = 0; i  n;)

        ans[IN[i]] = curtime + (D[i] - last - 1) * rem + (i - L[IN[i]] + 1);
        curtime += (D[i] - last) * rem;
        i++;
        rem--;
        while (i  n  D[i] == D[i-1])
        {
           ans[IN[i]] = ans[IN[i-1]] + 1; i++;
           rem--;
        }
        last = d[i-1];

  }

  curtime = total time till the iteration in which last event(which has burst
  time just less than current event) has been completed.

-- 
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] suitable data structure

2011-05-26 Thread Vipul Kumar
Map , key will be the wrong wrd , so lookup will be O(1).

On Thu, May 26, 2011 at 10:07 PM, himanshu kansal
himanshukansal...@gmail.com wrote:
 if a large no of documents are available and need to find out the
 spelling errors.for this the words are compared wd a dictionary
 fileif a word is nt present in dictionary thn it is sure dt d word
 is wrong...thn v hv to print d no of occurences of the wrong
 wordassuming dt d word vl occur frquently in d file nd wd b wrong
 everytimewhch data structure wd b best suited for storing d wrong
 wordsso tht v cn find whthr a wrd is wrong wdout scanning the
 dictionary

 --
 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] Palindrome

2011-05-26 Thread ankit sambyal
 You are given a large string. You need to cut the string into chunks such
that each substring that you get is a palindrome. Remember that each 1
length string is always a palindrome. You need to find the minimum number of
cuts that you need to make such that each substring is a palindrome.

-- 
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] Sure Shot Closure for Perl Programmer in Ft. Lauderdale, FL

2011-05-26 Thread sohail panzer
Hello,
Hope you are doing well.
I am a technical recruiter with Panzer Solutions LLC Software Implementing
and IT consulting company located in CT. Please go through the Job
Description and send me your updated resume with contact information.
*
Please reply at soh...@panzersolutions.com
*
Title  :   Perl Programmer
Location   :   Ft. Lauderdale, FL
Duration  :   6 Month contract


*Must-haves *
4-6 years of Perl Programming experience.
Strong knowledge of internet technologies such as HTTP, XML, XSLT,
JavaScript and HTML
Extensive SQL experience
Windows and Unix (FreeBSD or Linux) Experience

*Plusses *
Development and/or system administration in a hosting environment

*Responsibility *
Our client is a large company located in Boca Raton. They need someone to
design and develop web applications used by internal and external customers.
They will be working on a online billing/ordering system. The programmer
will be writing Perl code on a Unix platform.




Thank you,

Sohail Khan | Technical Recruiter
Panzer Solutions LLc
45 Stuart Ave, K
Norwalk, CT 06850 USA
Voice: 203-813-2052
soh...@panzersolutions.com
URL: www.panzersolutions.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.



[algogeeks] 100% close for UI Developer in Chicago, IL

2011-05-26 Thread sohail panzer
Hello,
Hope you are doing well.
I am a technical recruiter with Panzer Solutions LLC Software Implementing
and IT consulting company located in CT. Please go through the Job
Description and send me your updated resume with contact information.

*Please reply at soh...@panzersolutions.com* *
*
Title  :   UI Developer
Location   :   Chicago, IL
Duration  :   6 Month contract
Rate  :   $45/Hr on Corp to Corp


Required Skills:
5 plus years of experience in front-end application/user interface design
Mid to senior level experience with the following technologies:
html, javascript, css, photoshop, adobe, dreamweaver
Experience with the following types of interface design (in order of
importance):
1) website design
2) mobility or desktop design

NOTE: Candidate needs solid web design experience (Interface design) and/or
Mobile or desktop design experience

Nice to have:
Winforms
WPF
Backend development (java, c#, asp, .net development)
1 year of experience in designing interfaces for iPhone or Android

Description
Candidate will be a part of a team responsible for designing user interface
for website, desktop and mobile applications. He or she may be involved in
redesigning interfaces for existing applications as well as designing a
front end for dynamic prototypes. Our client is currently consolidating a
group of applications into one enterprise level software suite. Candidate
will be expected to help redesign a front end that is both visually
appealing and functional.




Thank you,

Sohail Khan | Technical Recruiter
Panzer Solutions LLc
45 Stuart Ave, K
Norwalk, CT 06850 USA
Voice: 203-813-2052
soh...@panzersolutions.com
URL: www.panzersolutions.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.



[algogeeks] Senior Network Admin // Boston, MA // 6+ Months contract

2011-05-26 Thread sohail panzer
Hello,
Hope you are doing well.
I am a technical recruiter with Panzer Solutions LLC Software Implementing
and IT consulting company located in CT. Please go through the Job
Description and send me your updated resume with contact information.

Title  :   Senior Network Admin
Location   :   Boston, MA
Duration  :   6+ Months contract


 QUALIFICATIONS REQUIRED AT HIRE (List knowledge, skills, abilities)
 Experience with designing, configuring and troubleshooting complex network
backbones.
 Knowledge of the capabilities and limitations of computer hardware and ITS
traffic/data acquisition and control devices
 Knowledge of serial communication technologies, MODBUS over serial/IP and
NTCIP protocols.
 Knowledge of routing protocols (e.g. EIGRP, OSPF, RIP, and BGP) in a mixed
environment.
 Knowledge of VLAN technology, VTP and STP protocols.
 Experience in Access Control Lists, Cisco Firewalls, VPN technologies and
other security technologies.
 Solid understanding of network routers and switches.
 Experience with data acquisition/control devices and sub-systems
communications including but not limited to PLCs, RTUs, FACPs, ACPs, etc.
 Knowledge of T1, T3, SONET, DWDM and OC technologies.
 Experience with Metro-Ethernet technologies.
 Experience in Network monitoring and management tools.
 Experience in VOIP and QoS.
 Ability to communicate effectively orally and in writing;  Ability to work
in a team setting.
 Ability to adjust to changing situations to meet emergencies or changing
program or production requirements.
 Knowledge of the methods and techniques of statistics.



QUALIFICATIONS ACQUIRED ON JOB (List knowledge, skills, abilities)
Knowledge of the policies, procedures, specifications, standards and
guidelines governing assigned unit activities.
Knowledge of the types and uses of agency forms.

MINIMUM REQUIREMENTS
Applicants must have at least four years of full-time, or equivalent
part-time, professional experience in networking of which at least two years
must have been in work in which the major duties included computer, traffic
devices, data acquisition/control devices and networking systems analysis.




Thank you,

Sohail Khan | Technical Recruiter
Panzer Solutions LLc
45 Stuart Ave, K
Norwalk, CT 06850 USA
Voice: 203-813-2052
soh...@panzersolutions.com
URL: www.panzersolutions.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.



[algogeeks] Lotus Connections Developer // Wilmington, DE // 6 Months contract

2011-05-26 Thread sohail panzer
 Hello,
Hope you are doing well.
I am a technical recruiter with Panzer Solutions LLC Software Implementing
and IT consulting company located in CT. Please go through the Job
Description and send me your updated resume with contact information.

*Please reply at soh...@panzersolutions.com
** *
Title  :   Lotus Connections Developer
Location   :   Wilmington, DE
Duration  :   6 Months contract


MUST:
IBM Lotus Connections
Technical Widget Developtment
Java Script / WebSphere – background

PLUS:
API – extract and Input data
Web Social Software
Rational Applicational Developtment tooks within Websphere

Responsibilities
Developtment from scratch – working on an internal social networking tool,
combining Facebook and LinkedIn, to improve busines intelligence  /
communication  Will be working with internal BA’s, developing a prototype
for first 4weeks, then 6 months of developtment / production.



Thank you,

Sohail Khan | Technical Recruiter
Panzer Solutions LLc
45 Stuart Ave, K
Norwalk, CT 06850 USA
Voice: 203-813-2052
soh...@panzersolutions.com
URL: www.panzersolutions.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.



Re: [algogeeks] spoj--two squares problem

2011-05-26 Thread Ashish Goel
bool fn(const floatc)
{//a^2+b^2=c

if (sqr(sqrt(c)) == c) //perfect square
{
  float a=1; float b=c-1;

  while(a=b){
   float a2=a*a;
   float b2=b*b;
   if (a2+b2==c) return true;
   if (a*2+b2c) { a+=1;}
   else ( b-=1;}
  }



}
return false;

}
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652


On Thu, May 26, 2011 at 12:29 AM, ricky moon.afr...@gmail.com wrote:

 can anyone help me out with this problem:
 https://www.spoj.pl/problems/TWOSQRS/
 It runs on my machine with this code but it gives wrong ans on their
 site.

 #includeiostream
 #includemath.h

 using namespace std;

 int main()
 {
 int i=0,j=0,X=0,t=0,count=0;
 cint;
 while(t--)
 {
  cinX;
  i=sqrt(X);
  j=sqrt(X-i*i);
  while(i=0  i=j)
   {
  if((i*i)+(j*j)==X)
{count++;}
   i--;
   j=sqrt(X-i*i);

   }
   if(count0)
coutYes;
else coutNo;
   count=0;
   coutendl;
 }
 return 0;
 }

 --
 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] spoj--two squares problem

2011-05-26 Thread Balaji S
sqr(sqrt(c)) == c

what ll it return if c is 10...

-- 
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] spoj--two squares problem

2011-05-26 Thread saurabh singh
Depends on the parameter list of sqr function and also on type of c.If it
takes double as parameter and returns double than false else true,Correct me
if wrong,..

On Fri, May 27, 2011 at 8:56 AM, Balaji S balaji.ceg...@gmail.com wrote:

 sqr(sqrt(c)) == c

 what ll it return if c is 10...


  --
 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.




-- 
Saurabh Singh
B.Tech (Computer Science)
MNNIT ALLAHABAD

-- 
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: Round Robin Schedulling Problem

2011-05-26 Thread anshu mishra
@gopi
by mistake i have written i in place of IN[i];

my fault, 2nd thing( (F[i].idx - F[i-1].idx - (F[i].rep - F[i-1].rep) ) i
have really not think of that. thanks :)

-- 
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.