Live data from Hacker News

A Competitive Programmer's Handbook

cses.fi

121–130 of 171 posts

Re: A Competitive Programmer's Handbook

#121
post #105
post #76

Earlier quoted context omitted.

This is my understanding as well. Data structures and basic algo comes up in interviews, and if you pass that's probably the last of it too. I never studied them originally, but once I realised it was a blocker to getting a new job I spent some time to learn the basics at least which truly helped a lot. It was also a bit of fun, to be honest - even though they have almost no bearing on the day to day work. So I'm int…

Besides basics, I've learned and forgot several times, so I don't have enough motivation nor time to re-learn again :)

I read you. It's funny how it blocked a couple of jobs, and it only took me a few hours to learn enough to pass the basics. I understand the need to filter, but still believe it's a crappy way of doing it.

Re: A Competitive Programmer's Handbook

#122
post #100

Earlier quoted context omitted.

From my experience i'd rather work with programmers with strong CS skills. They put out better code

I'd rather work with the ones who actually care about the people they're solving problems for vs the ones who can write bubble sort with no reference material, which happens in the real world precisely never. Employers pay developers to solve problems, not necessarily to write the most efficient code possible. I get that it's a craft and it's good to understand what happens under the hood, but you can get pretty damn…

[deleted]

Re: A Competitive Programmer's Handbook

#123
post #100

Earlier quoted context omitted.

It sounds like it may have been awhile since you've interviewed. The modern "good" interview is all data structure and algorithm white boarding nonsense. For me, who is not a competitive programmer, the standard interview prep is spending a couple of hours on Hacker Rank every day and making sure I can delete a node in a binary tree on a white board without so much a missing semicolon. For some reason that signals "g…

From my experience i'd rather work with programmers with strong CS skills. They put out better code

being good at physics doesnt help you jump higher. its good to know theory, but to be good at something you need practice.

Re: A Competitive Programmer's Handbook

#125

Earlier quoted context omitted.

Is that sad? It's a better filter than college degrees.

So your ability in a pressured limited-time environment come up with an O(N) dynamic programming algorithm for a fictitious scenario is a testament to your ability as a software engineer versus a competitive programmer who can pattern match scenarios?

But algo questions are usually just part of the interview, not the whole thing. And usually they are fairly simple, so every good software engineer should be able to solve them.

Re: A Competitive Programmer's Handbook

#126
This seems to be horribly written. Example:

>"In the German Lotto you have to select 6 numbers from the set {1,2,...,49}. A popular strategy top lay Lotto - although it doesn’t increase your chance of winning — is to select a subset S containing k (k > 6) of these 49 numbers, and then play several games with choosing numbers only from S.

For example, for k = 8 and S = {1, 2, 3, 5, 8, 13, 21, 34} there are 28 possible games: [1,2,3,5,8,13], [1,2,3,5,8,21], [1,2,3,5,8,34], [1,2,3,5,13,21], ..., [3,5,8,13,21,34]. Your job is to write a program that reads in the number k and the set S and then prints all possible games choosing numbers only from S."

if K needs to be > 8 how are the numbers in the selected subset {1, 2, 3, 5, 8, 13, 21, 34}? The majority of those are less than K. I have scratched my head about this for a few minutes. There are many that are equally as confusing.

See: https://uva.onlinejudge.org/index.php?option=com_onlinejudge...

Re: A Competitive Programmer's Handbook

#127

This seems to be horribly written. Example: >"In the German Lotto you have to select 6 numbers from the set {1,2,...,49}. A popular strategy top lay Lotto - although it doesn’t increase your chance of winning — is to select a subset S containing k (k > 6) of these 49 numbers, and then play several games with choosing numbers only from S. For example, for k = 8 and S = {1, 2, 3, 5, 8, 13, 21, 34} there are 28 possible…

The size of S is k.

Re: A Competitive Programmer's Handbook

#128

This seems to be horribly written. Example: >"In the German Lotto you have to select 6 numbers from the set {1,2,...,49}. A popular strategy top lay Lotto - although it doesn’t increase your chance of winning — is to select a subset S containing k (k > 6) of these 49 numbers, and then play several games with choosing numbers only from S. For example, for k = 8 and S = {1, 2, 3, 5, 8, 13, 21, 34} there are 28 possible…

The problem is your reading comprehension. That reads just fine to me. Pretty standard writing.

Re: A Competitive Programmer's Handbook

#129

There should be references to problems for each topic at online judges. Like this one: https://uva.onlinejudge.org/index.php?option=com_onlinejudge... Learning algorithms per se is only a small part of training. Much bigger part of training is learning how to recognize these algorithms in problems. After reading about some algorithm, I always solve a couple of related problems. P.S. Looks well-written. Bookmarked. I…

The book I recommend to people getting started is Competitive Programming 3 [1] by Steven and Felix Halim. It's pretty great if you have already a basic grasp of simple algorithms and a bit of C++. And as you say you need to practice, and the book incentivizes it. They accompany the book with precisely problems from UVa Online Judge, some of them solved and with code (in the book and in the site). [1] https://cpbook.…

I bought the A5 version and the printing quality was extremely low, they shouldn't sell something this bad. I would get another format if I had to buy it again.

Re: A Competitive Programmer's Handbook

#130

This seems to be horribly written. Example: >"In the German Lotto you have to select 6 numbers from the set {1,2,...,49}. A popular strategy top lay Lotto - although it doesn’t increase your chance of winning — is to select a subset S containing k (k > 6) of these 49 numbers, and then play several games with choosing numbers only from S. For example, for k = 8 and S = {1, 2, 3, 5, 8, 13, 21, 34} there are 28 possible…

It looks like k doesn't even matter apart from reading the input for the problem.
Post reply on HN