開源日報 每天推薦一個 GitHub 優質開源項目和一篇精選英文科技或編程文章原文,堅持閱讀《開源日報》,保持每日學習的好習慣。
今日推薦開源項目:《人工智慧課程 AI_Curriculum》
今日推薦英文原文:《Is Competitive Programming Helpful for Tech Interviews?》
(這裡放日報封面) (請檢查,本文勾上了且只勾了《開源日報》這一個分類,請檢查,有添加文章 Tag,請檢查,有添加文章摘要,請檢查,有添加特色圖像,有添加bigger圖片,有選中頭圖「布局設置」為佔滿屏幕的那張「第3張」) (請檢查,預覽時候,所有圖片和文字顯示正常,且勾上了百度熊掌號-原創提交) (請檢查,本文的信息已經添加到 https://pm.openingsource.org/projects/daily/wiki日報摘要里,每個月的摘要信息單獨發一個page,格式參照 https://openingsource.org/daily-index/2018-5/,標題,URL,正文等格式均需保持一致) (檢查上述都完成之後,請刪掉括弧里的字,包括這一句,每天發布時間為早晨8點左右)
今日推薦開源項目:《人工智慧課程 AI_Curriculum》傳送門:GitHub鏈接
推薦理由:該項目為開放的深度學習和強化學習課程,來自斯坦福大學、麻省理工學院、加州大學伯克利分校等頂尖大學。
今日推薦英文原文:《Is Competitive Programming Helpful for Tech Interviews?》作者:Dhananjay Trivedi
原文鏈接:https://medium.com/better-programming/is-competitive-programming-helpful-for-tech-interviews-e3d7ae1ba0b4
推薦理由:打比賽對我們的幫助還是挺大的

Is Competitive Programming Helpful for Tech Interviews?

Can CP help you get your dream job?

(Photo by Kaleidico on Unsplash)
In this piece, we will try to understand the importance of competetive programming (CP) and how it may or may not be helpful for your tech interview.

Competitive programming, for those of you who don』t know, is a type of mind-sport where you have to solve some programming problems with time and memory constraints and come up with an algorithm to do so.

It』s mostly about passing the test scenarios within the time and memory constraint — this sometimes requires you to think outside the box.

For example, there』s a problem — you read the problem, you understand it, you code it, you debug it and you finally successfully submit it. It might take you 10 minutes.

Meanwhile, some guy in the leaderboard has submitted the solution in 30 seconds. It』s simply because he was able to come up with a simple idea for the solution.

What makes some programmers so fast?
  • He didn』t have to go through the whole dataset making sure it's correct.
  • He didn』t need to get more clarity about the problem statement.
  • He didn』t have to think of edge cases.
With some simple, logical assumptions, he was able to come up with a simple solution, code it and submit it.

People don』t check your code in competitions, they want you to pass all the decided test scenarios.

Sometimes, for very complex problems, all the test cases can』t be predicted so the competition might miss a test case and you don』t have to worry about it.

That』s the beauty of competitive programming.

At the same time, competitive programming problems are harder than interview questions and they involve more advanced algorithms and data structures.

(Photo by Nik MacMillan on Unsplash)
In a coding interview, you can』t afford to assumptions. When you are given a coding problem in your interview, before you jump into actually coding it, you are expected to:
  • Ask good questions to get a better understanding of the problem.
  • Think of all the edge cases and be sure to cover them.
  • Be able to optimize your solution according to the specified requirements.
  • Write clean, solid code.
Coding interviews can ask questions that can』t be only solved by one computer, for example, parallel or distributed systems.

Interviews can also ask you to come up with some specialized algorithms for special cases — this might not be the best fit solution for a competitive programming problem but fits perfectly for the scenario of your interview.

Does Competitive Programming make Good Software Engineers?

(Photo by Phil Hearing on Unsplash)
Competitive programming helps sharpen your brain for programming and people at the top of the competitive programming domain are really smart. Also, some of their exceptional qualities like their maths and coding skills might be overkill for some SDE jobs.

But not all competitive programmers make good software engineers. There are a lot of other skills that competitive programming doesn』t teach you (and yes, you』re supposed to learn them on your own).

For example:
  • The art of writing clean code.
  • S.O.L.I.D principles.
  • Asking the right questions around the problem statements.
  • Scalable system designs.
The above-mentioned skills don』t help in CP. If your goal is to become the god of CP, you don』t have to worry about acquiring these skills.

But if you see yourself as a software engineer, then these are must-have qualities.

Should You do CP or Not?

This depends on where you are in your career.

1. If you』re a student at school/college.

Yes. You should invest as much time as you can to do competitive programming. It』s one of the best investments you can make in yourself.

It will sharpen your brain and you』ll learn some really strong computer science fundamentals, which are essential in programming jobs.

The companies interviewing you right after college won』t really look for the above mentioned SDE qualities. You』ll learn these as you progress into your career — it』s a cherry on top if you can learn some of them.

You can use the CP contents to attract your potential employers and even win the good prize money. But you don』t have to win those contests to get a job offer from the big tech companies — you just have to be amongst the top performers to attract them.

2. If you』re a working professional

Yes. You should at least practice one problem a day, to keep your programming mind sharpened. Working on projects doesn』t really push your brain and skills to the required extent. Over time you will lose your problem-solving abilities.

But you shouldn』t invest all your time and skills into competitive programming as you are already a professional. Invest time in upskilling your professional qualities as well.

CP will help you stay at the top of your problem-solving abilities and will give you the confidence to be interview-ready.

You can use the CP contests to get your next great job offer, earn some extra prize money.

Where Can You Practice Competitive Programming?


There are some popular coding competitions that you can practice and compete in:
  • Top Coder
  • Hackerrank (personal suggestion for beginners)
  • Codeforces
  • HackerEarth
  • Codechef
  • Leet Code
  • Google Codejam
  • Facebook hacker cup
I hope this has brought some value to you!

Have I missed anything? I would love to learn more from you.

Happy Hacking!


下載開源日報APP:https://openingsource.org/2579/
加入我們:https://openingsource.org/about/join/
關注我們:https://openingsource.org/about/love/