NetWallah has asked for the wisdom of the Perl Monks concerning the following question:
I was recently introduced to leetcode problems ( https://leetcode.com/).
As a good monk, I would love to hack these using perl, but the site does not provide any options to to do so (many other, far less desirable options languages are offered).
I'm sure fellow monks have considered this. Please share hacks/workarounds/solutions to approach this, or even suggestions on an approach.
Thanks.
"If you had better tools, you could more effectively demonstrate your total incompetence."
Re: leetcode perl solutions
by pryrt (Abbot) on Jan 23, 2022 at 22:39 UTC
|
| [reply] |
Re: leetcode perl solutions
by LanX (Saint) on Jan 23, 2022 at 21:55 UTC
|
Hello NetWallah
From what I can see they need to actively provide a Perl engine at the back-end to run the code.
I quickly searched their discussion board and found 3 threads requesting Perl, alas without answer.
Like https://leetcode.com/discuss/feedback/1051600/Perl-support-wanted
So, I only see 3 options
- you convince many monks to join leetcode to petition in large numbers in the board.
- you start punishing their snobbish attitude, by "steeling" their questions to discuss them here on PM. (a win for the monastery)
- a combination of the former two
HTH! :)
| [reply] |
Re: leetcode perl solutions
by eyepopslikeamosquito (Archbishop) on Jan 24, 2022 at 05:11 UTC
|
Looks similar to the venerable Rosetta Code.
As others have pointed out, there doesn't seem to be any barrier to posting
solutions to LeetCode problems, or Rosetta code
problems, or problems from many other sources, here and inviting discussion.
In fact, given the appalling quality of many questions posted here lately,
that seems like a good idea. :)
I've done this sort of thing here in the past, for example:
- Tales from writing a RPN evaluator in Perl 5, Perl 6 and Haskell
- Five Ways to Reverse a String of Words (C#, Perl 5, Perl 6, Ruby, Haskell)
- Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)
- Rosetta PGA-TRAM
- Rosetta code: Split an array into chunks
- Re^2: Perlplexation - foreach shoulda Known (Rosetta: Perl, Python, Ruby)
- Rosetta Dispatch Table (Interview Question)
Having admittedly just done a quick browse of LeetCode, I doubt I'd use it.
While I always ask job applicants to write code,
I prefer to ask them to write code related to our business,
code that you can't google for canned solutions on the Internet.
Moreover, as indicated at On Interviewing and Interview Questions, hiring is a tricky business:
it's not just algorithm pop quiz, teamwork and interpersonal skills are vital.
| [reply] |
Re: leetcode perl solutions
by kcott (Archbishop) on Jan 24, 2022 at 00:24 UTC
|
G'day NetWallah,
I had a look around some of the problems listed.
It seems that many are quite similar to the type of questions we get here:
we post solutions; discuss different approaches; and often provide benchmarks.
Far from stealing (as LanX suggested)
I think it would be totally legitimate to discuss Perl solutions to those problems here.
It's quite likely that at least some problems were discussed here before they were posed by LeetCode.
I've just posted a quick solution to the first problem, "LeetCode Problem #1 - Two Sum - Improve and/or discuss.",
so that we can gauge interest in discussing these.
| [reply] |
|
|