Hi,

I was advised that this website can help me learn to code better so that I may perform better in solving "leet" code type examples during interviews. I've been out of school for a long time and don't remember much math if any and my style of coding is pretty much brute force where I'm basically analyzing each element one at a time. I read somewhere about how I need to write code following the log(n) method. Will the projecteuler.net questions help me learn how to code more efficiently following the log(n) principles? Any good resource material on what exactly log(n) is?

Thanks!

## Project Euler - Learning to code efficiently

- kenbrooker
**Posts:**140**Joined:**Mon Feb 19, 2018 3:05 am**Location:**Northern California, USA

### Re: Project Euler - Learning to code efficiently

https://hackernoon.com/what-it-took-to- ... c01240266b

https://medium.freecodecamp.org/all-you ... d575e7eec4

*Something to ponder until a(n official) Project Euler reply is posted and...*

Something mSomething m

**O**re...https://medium.freecodecamp.org/all-you ... d575e7eec4

*((EDIT in parenthesis))*"

*Good Judgment comes from Experience;*

Experience comes from Bad Judgment..."Experience comes from Bad Judgment

### Re: Project Euler - Learning to code efficiently

I would not say that Project Euler (PE) will

I came to PE from an applied math/physics background and only had minimal previous exposure to formal treatment of algorithms and big-O. PE has been quite a revelation about the power of these ideas... it still astonishes me every time I use techniques like Dynamic Programming or Modular Matrix Exponentiation to crush something which might take years or even centuries to solve by a naive, bruteforce approach down to a virtually instantaneous runtime. On other forums, you occasionally come across people who are new to PE thinking they can somehow achieve the necessary runtime improvements by optimisation tricks like inline assembly code or persuading their compiler to vectorize using SSE/AVX instructions and so on... but such approaches will get you nowhere; it is

Bear in mind "coding" alone is not really enough; you'll need to know/learn a fair amount of mathematics too (especially Number Theory, but also combinatorics) to get anywhere.

*teach*you to code efficiently; more that you will need to*learn*to code efficiently to solve Project Euler problems. PE itself doesn't actually give you much to show you what efficient coding looks like (apart from some hints about prime sieving in PDFs accompanying earlier problems, I seem to recall). Just to be clear: by "efficient coding" I do indeed generally mean finding or devising a suitable algorithm so that a problem is soluble in, say, O(log n) time rather than O(n), or in O(n log n) rather than O(n^2).I came to PE from an applied math/physics background and only had minimal previous exposure to formal treatment of algorithms and big-O. PE has been quite a revelation about the power of these ideas... it still astonishes me every time I use techniques like Dynamic Programming or Modular Matrix Exponentiation to crush something which might take years or even centuries to solve by a naive, bruteforce approach down to a virtually instantaneous runtime. On other forums, you occasionally come across people who are new to PE thinking they can somehow achieve the necessary runtime improvements by optimisation tricks like inline assembly code or persuading their compiler to vectorize using SSE/AVX instructions and so on... but such approaches will get you nowhere; it is

*algorithmic*optimization which is needed).Bear in mind "coding" alone is not really enough; you'll need to know/learn a fair amount of mathematics too (especially Number Theory, but also combinatorics) to get anywhere.