Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > OK. LETS START REAL PROGRAMMING IN C FOR PROBLEMS!!!

Reply
Thread Tools

OK. LETS START REAL PROGRAMMING IN C FOR PROBLEMS!!!

 
 
88888 Dihedral
Guest
Posts: n/a
 
      11-20-2011
PROBLEM 1: COMPUTE THE EULER'S NUMBER UP TO 30 DIGITS AFTER 1.
THE DIGIT REQUIRED SHOULD BE PARAMETER BY THE CALLER!

PROBLEM 2: COMPUTE PI AS IN THE ABOVE!

PROBLEM 3: LIST ALL PERMUTATIONS OF A STRING WITHOUT ANY REPEATED STRING IN THE LIST!

PROBLEM 4: IMPLEMENT A HASH THAT COULD BE AS FAST AS POSSIBLE AND VERY STABLE AND ROBUST TO BE USED EVERYWHERE TO BEAT OTHER LANGUAGES WITH A HASH BUILT IN.
 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      11-20-2011
On 11/21/11 08:12 AM, 88888 Dihedral wrote:
> PROBLEM 1: COMPUTE THE EULER'S NUMBER UP TO 30 DIGITS AFTER 1.
> THE DIGIT REQUIRED SHOULD BE PARAMETER BY THE CALLER!
>
> PROBLEM 2: COMPUTE PI AS IN THE ABOVE!
>
> PROBLEM 3: LIST ALL PERMUTATIONS OF A STRING WITHOUT ANY REPEATED STRING IN THE LIST!
>
> PROBLEM 4: IMPLEMENT A HASH THAT COULD BE AS FAST AS POSSIBLE AND VERY STABLE AND ROBUST TO BE USED EVERYWHERE TO BEAT OTHER LANGUAGES WITH A HASH BUILT IN.


Problem 5: Locate and turn off caps-lock.

--
Ian Collins
 
Reply With Quote
 
 
 
 
88888 Dihedral
Guest
Posts: n/a
 
      11-20-2011
I solved those long time ago in C.
 
Reply With Quote
 
Eric Sosman
Guest
Posts: n/a
 
      11-20-2011
On 11/20/2011 2:23 PM, 88888 Dihedral wrote:
> I solved those long time ago in C.


Glad to hear it. Just to verify, please post the output of
your Problem 3 solution for the string

I solved those long time ago in C

.... and state whether you are considering or ignoring letter case,
so we can check your answer.

--
Eric Sosman
http://www.velocityreviews.com/forums/(E-Mail Removed)d
 
Reply With Quote
 
Kaz Kylheku
Guest
Posts: n/a
 
      11-20-2011
On 2011-11-20, Eric Sosman <(E-Mail Removed)> wrote:
> On 11/20/2011 2:23 PM, 88888 Dihedral wrote:
>> I solved those long time ago in C.

>
> Glad to hear it. Just to verify, please post the output of
> your Problem 3 solution for the string


I like problem 4, because of its well-quantified and concretely targettable
requirement: "as fast as possible".
 
Reply With Quote
 
88888 Dihedral
Guest
Posts: n/a
 
      11-20-2011
1. Define an order in the symbol set of the string by a sort.
2. Start from the smallest mapped by the ordered defined which will yield the maximum if reversed.
3. From the smallest string by the order defined, just generate the next until the maximum is reached.

I hate to answer trivial questions!

 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      11-20-2011
On 11/21/11 09:13 AM, 88888 Dihedral wrote:
> 1. Define an order in the symbol set of the string by a sort.
> 2. Start from the smallest mapped by the ordered defined which will yield the maximum if reversed.
> 3. From the smallest string by the order defined, just generate the next until the maximum is reached.
>
> I hate to answer trivial questions!


Like you hate quoting context?

--
Ian Collins
 
Reply With Quote
 
Eric Sosman
Guest
Posts: n/a
 
      11-20-2011
On 11/20/2011 3:13 PM, 88888 Dihedral wrote:
> 1. Define an order in the symbol set of the string by a sort.
> 2. Start from the smallest mapped by the ordered defined which will yield the maximum if reversed.
> 3. From the smallest string by the order defined, just generate the next until the maximum is reached.
>
> I hate to answer trivial questions!


I'm sure you'll be happy to learn that you're tied for third
place in my fastest-to-PLONK list.

--
Eric Sosman
(E-Mail Removed)d
 
Reply With Quote
 
Joe Pfeiffer
Guest
Posts: n/a
 
      11-20-2011
88888 Dihedral <(E-Mail Removed)> writes:

> PROBLEM 1: COMPUTE THE EULER'S NUMBER UP TO 30 DIGITS AFTER 1.
> THE DIGIT REQUIRED SHOULD BE PARAMETER BY THE CALLER!
>
> PROBLEM 2: COMPUTE PI AS IN THE ABOVE!
>
> PROBLEM 3: LIST ALL PERMUTATIONS OF A STRING WITHOUT ANY REPEATED STRING IN THE LIST!
>
> PROBLEM 4: IMPLEMENT A HASH THAT COULD BE AS FAST AS POSSIBLE AND VERY STABLE AND ROBUST TO BE USED EVERYWHERE TO BEAT OTHER LANGUAGES WITH A HASH BUILT IN.


Please provide the email address of your instructor, so we can submit
our homework directly.

Also, please do something about your broken caps-lock key.
 
Reply With Quote
 
Lew Pitcher
Guest
Posts: n/a
 
      11-20-2011
On Nov 20, 2:12*pm, 88888 Dihedral <(E-Mail Removed)>
wrote:
> PROBLEM 1: COMPUTE THE EULER'S NUMBER UP TO 30 DIGITS AFTER 1.
> THE DIGIT REQUIRED SHOULD BE PARAMETER BY THE CALLER!


"Euler's Number"? Do you mean "the mathematical constant e"? Or
perhaps "a sequence En of integers defined by a specific Taylor series
expansion"?

If you mean /e/, then
a) the number starts with a /2/, not a /1/ (as in 2.718281828...),
b) Steve Wozniak published a solution to 116000 places, in 1981, and
c) /I/ wrote and published a C-language solution to 5000 places in the
1990s
What's so difficult about a /30 place/ solution?

> PROBLEM 2: COMPUTE PI AS IN THE ABOVE!


It's been done. Many times over.

> PROBLEM 3: LIST ALL PERMUTATIONS OF A STRING WITHOUT ANY REPEATED STRING IN THE
> LIST!


A little more difficult, but again, it's been done many times over.

> PROBLEM 4: IMPLEMENT A HASH THAT COULD BE AS FAST AS POSSIBLE AND VERY STABLE AND
> ROBUST TO BE USED EVERYWHERE *TO BEAT OTHER LANGUAGES WITH A HASH BUILTIN.


Again, it's been done, many times. And it's simpler than e or pi.

So, what's your point? Or is this a sad attempt to get others to do
your homework for you?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what has python added to programming languages? (lets be esoteric,shall we ;) Wildemar Wildenburger Python 20 04-24-2006 01:56 PM
OT: Lets all get high James MCSE 93 10-19-2005 05:45 PM
Review: Lets get a T@2 Part 1 Silverstrand Reviews & How-To's 0 06-20-2005 02:34 AM
is there a hardware / driver combination out there the lets win2k connect to the network before login?? christiane kewitz Wireless Networking 1 02-13-2005 01:08 AM
Re: Olympus C-5050 Users Group - lets start one on usenet! gr Digital Photography 6 08-04-2003 07:57 AM



Advertisments