projecteuler

People often ask me "how can I get into competitive programming?"

人们经常问我“我如何进入竞争性编程领域?”

My answer has always been simple: practice as many algorithm and data structures problems as you can.

我的答案一直很简单:尽可能多地练习算法和数据结构问题。

But today, I have something more concrete for you. A challenge that will expand your computer science and math knowledge – all while giving you a ton of programming practice.

但是今天,我为您准备了更具体的内容。 一项挑战将扩展您的计算机科学和数学知识,同时为您提供大量的编程实践。

It's called #ProjectEuler100. And a lot of people have already publicly accepted the challenge.

它称为#ProjectEuler100。 许多人已经公开接受了挑战。

The challenge is named after Leonhard Euler, one of the most prolific mathematicians in history.

这项挑战以历史上最多产的数学家之一莱昂哈德·欧拉(Leonhard Euler)命名。

projecteuler_介绍#ProjectEuler100挑战:编码成就的“黑暗灵魂”
Leonhard Euler - the 16th century Swiss mathematician this challenge is named after.
莱昂哈德·欧拉(Leonhard Euler)-这个挑战的名字来自16世纪的瑞士数学家。

It represents learning on hard mode. Finishing this challenge will demand creativity and problem solving skills you didn't even know you had. It will turn you into an incredibly resourceful developer. It will give you the confidence to tackle the most ambitious projects.

它代表在硬模式下学习。 完成这一挑战将需要您甚至不知道拥有的创造力和解决问题的能力。 这将使您变成一个资源丰富的开发人员。 这将使您有信心应对最雄心勃勃的项目。

In short, the #ProjectEuler100 challenge will be a crucible where your Super Saiyan self is forged, ready to unleash your latent engineering genius on the world.

简而言之,#ProjectEuler100挑战将是您打造超级赛亚人自我的一个坩埚,随时可以释放您在世界上潜在的工程学天才。

projecteuler_介绍#ProjectEuler100挑战:编码成就的“黑暗灵魂”
Goku going super saiyan.
悟空去超级赛亚人。

什么是欧拉计划? (What is Project Euler?)

Project Euler is a website created back in 2001. It hosts a collection of around 600 different algorithm problems that get progressively harder, to the point where even people with math PhD's still struggle with them.

欧拉计画(Project Euler)是一个早在2001年建立的网站。它收录了约600种不同的算法问题,这些问题越来越难解决,甚至连拥有数学博士学位的人都在为之苦恼。

This said, the first 100 problems are totally do-able by a new developer. Thousands of people have completed the first 100 Project Euler problems over the years.

也就是说,前100个问题完全可以由新开发人员解决。 这些年来,成千上万的人已经完成了Euler项目的前100个问题。

It's just brutally hard. Like... Dark Souls hard.

这简直是​​残酷的。 像...辛苦的黑暗之魂。

projecteuler_介绍#ProjectEuler100挑战:编码成就的“黑暗灵魂”
Dark Souls is a video game famous for being ridiculously hard. But it becomes much easier with consistent practice - just like these algorithm problems.
《黑暗之魂》是一款以荒谬而著称的视频游戏。 但是通过一致的实践,它变得更加容易-就像这些算法问题一样。

I love the Project Euler problems. I used them extensively when I was first learning to code. I love these so much that we've added these Project Euler problems to freeCodeCamp's Interview Preparation section.

我喜欢欧拉计划的问题。 当我第一次学习编码时,我广泛使用它们。 我非常喜欢这些内容,以至于我们已将这些Euler项目问题​​添加到freeCodeCamp的采访准备部分

These will really wrack your brain. But they will be rewarding. They are hard, but fair. And if you're willing to swallow your pride and go down a few Wikipedia rabbit holes, you can solve them, too.

这些真的会伤脑筋。 但是他们会有所收获的。 他们很难,但公平。 而且,如果您愿意放下自己的骄傲并在Wikipedia上发现一些兔子漏洞,也可以解决它们。

"You can learn so much on the internet for the low, low price of your ego." - Shawn Wang (@swyx)

126 people are talking about this
昆西·拉森(Quincy Larson) @波斯

“您可以以低廉的价格在互联网上学到很多东西。” -肖恩·王( @ swyx )

126人正在谈论这个

So what do you think. Are you up for solving the first 100 Project Euler problems? Here are the rules.

所以你怎么看。 您准备解决前100个Euler项目问题​​吗? 这是规则。

#ProjectEuler100挑战赛的规则 (The Rules of the #ProjectEuler100 Challenge)

I've boiled everything down to these 6 simple rules all participants must follow.

我将所有内容简化为所有参与者必须遵循的这6条简单规则。

  1. Tweet out a photo of yourself giving a thumbs-up and announcing that you are committing to the #ProjectEuler100 challenge.

    发出一张自己竖起大拇指并宣布要参加#ProjectEuler100挑战的照片。
  2. Create a GitHub repository.

    创建一个GitHub存储库。
  3. Each time you complete a challenge, add your solution to your GitHub repository and tweet a link to it using the #ProjectEuler100 hashtag.

    每次完成挑战时,都将解决方案添加到GitHub存储库中,并使用#ProjectEuler100主题标签在其上鸣叫链接。
  4. Then scroll through the #ProjectEuler100 hashtag and give supportive feedback on at least 2 tweets from other developers.

    然后滚动#ProjectEuler100主题标签,并至少从其他开发人员获得2条推文上的支持性反馈。
  5. Move on to the next Project Euler challenge. You can't skip ahead. You have to complete all 100 problems in order. But you can use any programming language you want to solve these.

    继续进行下一个欧拉计划挑战。 你不能跳过。 您必须按顺序完成所有100个问题。 但是您可以使用任何要解决这些问题的编程语言。
  6. Once you've finished all 100 of them, tweet out a celebration photo of yourself with your laptop open to your GitHub repo.

    完成所有100个步骤后,在笔记本电脑上打开GitHub存储库,发布自己的庆祝照片。

我在哪里编码? (Where do I do my coding?)

You can use the 20-year-old Project Euler website itself.

您可以使用拥有20年历史的Euler项目网站。

Or you can use the freeCodeCamp.org version - which lets you code right in your browser, and has built-in tests.

或者,您可以使用freeCodeCamp.org版本 -该版本可让您直接在浏览器中进行编码,并具有内置测试。

Or if you're feeling spicy, you can build your own website for solving these challenges. (All of the Project Euler problems are Creative Commons-licensed and are free for non-commercial use.)

或者,如果您感到麻辣,则可以建立自己的网站来解决这些挑战。 (所有的Euler项目问题​​都是知识共享许可的,并且可以免费用于非商业用途。)

为什么需要将解决方案放在GitHub上? (Why do I need to put my solutions on GitHub?)

Putting your solutions into GitHub (Or GitLab or BitBucket) accomplishes several things:

将您的解决方案放入GitHub(或GitLab或BitBucket)可以完成几件事:

  1. It gives you a nice public record of your progress that you can share with other people.

    它为您提供了一份很好的公开记录,您可以与他人共享。
  2. It will make your GitHub profile look super active for any employers / clients looking to hire you.

    这将使您的GitHub个人资料对于希望雇用您的任何雇主/客户而言都显得异常活跃。
  3. It gives you something you can show to your grandkids.

    它为您提供了可以展示给孙子孙女的东西。

我可以看看别人的解决方案吗? (Can I look at other people's solutions?)

You can look at other people's solutions for problems that you yourself have already solved.

您可以查看别人对您自己已经解决的问题的解决方案。

Each challenge can be solved in many different ways - some more elegant than others. And you can compliment other people on their approaches.

每个挑战都可以通过许多不同的方式来解决-有些挑战比其他挑战更为优雅。 您可以称赞其他人的方法。

This said, it's 2020. The reality is that solutions to these problems are already peppered across the web. You may accidentally stumble upon a solution if you're searching for hints.

就是说,这是2020年。事实是,针对这些问题的解决方案已经在网络上出现。 如果要搜索提示,可能会偶然发现解决方案。

If you are exposed to the solution of a challenge that you have not yet completed yourself, you absolutely should not use the code you see there. You need to come up with code solutions for each of these problems yourself.

如果您面临尚未完成的挑战的解决方案,则绝对不应使用在此处看到的代码。 您需要自己针对每个问题提出代码解决方案。

我可以直播自己的尝试吗? (Can I live stream my attempts?)

Yes. By all means. As I said, the solutions to these problems are already all over the web. And many of the people who would tune in on Twitch or YouTube won't be doing the challenge - they'll just enjoy watching programming streams in general.

是。 一定要。 正如我所说,这些问题的解决方案已经遍布整个网络。 而且,许多愿意关注Twitch或YouTube的人都不会面临挑战-他们只会喜欢看一般的节目直播。

So don't worry about "spoiling" anything during your live streams.

因此,不必担心在直播过程中会“撒谎”任何东西。

We will be live streaming #ProjectEuler100 attempts on freeCodeCamp's YouTube channel.

我们将在freeCodeCamp的YouTube频道上直播#ProjectEuler100尝试。

This said, if you are creating video guides or articles that people would use as a reference to these problems, I encourage you to include spoiler warnings. People want hints so they can get unstuck - not full solutions.

这就是说,如果您要创建视频指南或文章,以供人们参考以解决这些问题,则建议您添加扰流板警告。 人们想要提示,以便他们可以解决-不是完整的解决方案。

我需要多快解决这些问题? (How fast do I need to solve these?)

To quote a great man:

引用一个伟人:

"It does not matter how slowly you go as long as you do not stop." - Leonhard Euler
“只要你不停下来,走多慢都没关系。” -莱昂哈德·欧拉

(OK, that quote is commonly attributed to Confucius. But all kinds of quotes get mis-attributed to Confucius, so I'm misattributing this quote to my boy Euler. ????)

(好吧,那句名言通常归功于Kong子。但是各种语录都被误认为是Kong子,所以我把这句名言错了给我的男孩欧拉。)

The first few problems are relatively easy. But they rapidly increase with difficulty. By the time you get to the final 20 or 30, you may be spending days to solve a single problem.

前几个问题相对容易。 但是它们Swift增加而困难。 到最后20或30的时候,您可能要花几天的时间来解决一个问题。

So don't make the mistake of saying "I'm going to finish these in 100 days" or something like that. Just keep working on these a little bit every day. You've got an entire community around you to help you make it past the finish line.

因此,请不要说“我将在100天之内完成这些任务”之类的错误。 每天继续努力一点。 您周围有整个社区,可以帮助您超越终点线。

社区在这里为您提供支持 (The community is here to support you)

We are all in this together. We're huddled around the #ProjectEuler100 hashtag on Twitter. This is baked right into the challenge rules. ("Rule #4: Scroll through the #ProjectEuler100 hashtag and give supportive feedback on at least 2 tweets from other developers.")

我们荣辱与共。 我们挤在Twitter上的#ProjectEuler100标签上。 这就是挑战规则中的内容。 (“规则4:滚动浏览#ProjectEuler100主题标签,并就其他开发人员的至少2条推文提供支持性反馈。”)

You will support other developers embarking on this challenge. And they will be there to support you.

您将支持其他迎接这一挑战的开发人员。 他们将在那里为您提供支持。

I also encourage you to join our #ProjectEuler100 Discord chat room where you can chat about the challenge and get help.

我也鼓励您加入我们的#ProjectEuler100 Discord聊天室 ,在这里您可以就挑战进行聊天并获得帮助。

And you can follow our #ProjectEuler100 Twitter bot.

您可以关注我们的#ProjectEuler100 Twitter机器人

So if you're ready, take the first step. Tweet out a photo of yourself giving a thumbs-up and announcing that you are committing to the #ProjectEuler100 challenge.

因此,如果您准备好了,请迈出第一步。 发出一张自己竖起大拇指并宣布要参加#ProjectEuler100挑战的照片。

You've got this.

你有这个

翻译自: https://www.freecodecamp.org/news/projecteuler100-coding-challenge-competitive-programming/

projecteuler

相关文章: