Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Brute force vs algorithm (PWC # 100)

by pryrt (Abbot)
on Feb 15, 2021 at 19:56 UTC ( [id://11128414]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Brute force vs algorithm (PWC # 100)
in thread Brute force vs algorithm (PWC # 100)

Hmm, I didn't think it my method was as bad as the brute force, but it apparently is. So much for that idea. (it's how I would've solved it. Also, your implementation was better than mine would have been, even for my naive algorithm.)
  • Comment on Re^3: Brute force vs algorithm (PWC # 100)

Replies are listed 'Best First'.
Re^4: Brute force vs algorithm (PWC # 100)
by LanX (Saint) on Feb 15, 2021 at 20:17 UTC
    > I didn't think it my method was as bad as the brute force

    It's not, brute (well the brutest) force will explore all possible path.

    The number of possible path grows much faster than m (I'd say exponentially)°.

    (... but with such a small triangle that's only of theoretical interest )

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

    °) sure it's p = 2**(n-1)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11128414]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2024-04-23 08:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found