Skip to content

Code Challenge Solutions from different sources in Golang by @codeanit.

License

Notifications You must be signed in to change notification settings

go-programmer/codechallenge

Repository files navigation

“ For me, great algorithms are the poetry of computation. Just like verse, they can be terse, allusive, dense, and even mysterious.

But once unlocked, they cast a brilliant new light on some aspect of computing. ” — Francis Sullivan

“ An algorithm must be seen to be believed. ” — Donald Knuth

“ I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important.

Bad programmers worry about the code.

Good programmers worry about data structures and their relationships. ” — Linus Torvalds

“ Algorithms + Data Structures = Programs. ” — Niklaus Wirth`

Code Challenge

Code challenge solutions from different sources in Golang by @codeanit. I do this because I want to improve my problem solving skills and keep my competitive edge.

How to become good at code challenges?

Understand The Basics

Don't skip basics, mathematics, data structures and algorithms. Mathematics helps build a solution. The data structures are the tools and the algorithms are the techniques that are the arsenal that every good programmer must have, more the better. Else, you will only see a hammer and a nail.

Know The Process:

To solve the challenge, start with trivial, slow ideas to form a heuristic technique, and then improve towards creative, fast algorithms which could be solved with specific techniques. So just solve as you can first even the exponential solution if it works it's fine, be greatful.

Start by solving easy problems, then medium, and finally the difficult ones. Try different types of problems from different sources.

Learn from other's solution, compare. Try to add more dimensions to the problem.

Improve your understanding by trying to answer Why was it done this way?. Review. Realize. Refactor Re-engineer.

Estimate The Complexity, If Not Provided:

The time limit set for online tests is usually from 1 to 10 seconds. We can therefore estimate the expected complexity. During contests, we are often given a limit on the size of data, and therefore we can guess the time complexity within which the task should be solved. This is usually a great convenience because we can look for a solution that works in a specific complexity instead of worrying about a faster solution. For example, if: • n <= 1 000 000, the expected time complexity is O(n) or O(nlogn), • n <= 10 000, the expected time complexity is O(n^2), • n <= 500, the expected time complexity is O(n^3). Of course, these limits are not precise. They are just approximations, and will vary depending on the specific task.

Folders

resource folder contains learning materials.

About

Code Challenge Solutions from different sources in Golang by @codeanit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published