0

The course should be discussed in c language. I am presently learning basic computer programming through a book and while doing the questions from the book from a chapter say array, I found out most of the questions are based on algorithm, so I want to study all major algorithms before attempting these computer

2 Answers2

1

Your question doesn't make much sense. First, there are literally thousands of major algorithms, and many of them are quite involved. You don't begin your studies with Red-Black Trees because even their purpose will elude you until you've (at the very least) spent some time dealing with sorts and searches.

Second, if you eliminate time complexity and the actual steps to make an algorithm possible, what is left? A vague discussion of the purpose of the algorithm? Needless to say, no such discussion would include any bits of actual programming, especially not in a low-level language like C.

Speaking of which, why are you focused on C? Do you have a particular reason for this choice of language? C is a "low-level" language, which means it works quite closely to how machines think, and quite differently from how people think. This is sort of like taking a math class that provides only axioms, and makes the student prove all of the important results on their own. I am not suggesting that there is no value there, but (1) it is much, much harder, and (2) you're more likely to simply give up in frustration when you can't seem to do anything at all, even after months of effort.

Beginners, particularly if self-taught, should start in higher-level languages where they can begin to learn how to actually undergo the process of programming without having to worry yet about pointer arithmetic and memory management.

Ben I.
  • 32,726
  • 11
  • 68
  • 151
0

I would not start with C as your first language, though it is a 700% (May be more) better choice than C++.

A good series is Structure and Interpretation of Computer Programs -- MIT Press. There is a book and a series of videos of lectures. They use Scheme, a LISP variant, which is a good choice for a first language. It uses the functional paradigm, however, which is very different from C.

While you may thing that you should choose a language that you will use at work, as this seems like the quickest way to arrive at where you want to be. I strongly suspect that it is faster to first learn to program (with whatever language makes this easier), and then learn a language (the one that you will eventually work with). I would like to see if there is any research on this. There is research that says that learning two things at once (e.g. programming and a language) is much much harder (possibly $n\times{}m$ instead of $n+m$). So if we make the learning-the-language part easier, then over all cognitive load will be reduced a lot.

I have however noticed that graduates that have studied industrial languages, can not (in general) program. However those that can program (but only know learning languages), cad be quickly taught a new language. And people that know more than one language, are better programmers.


Note: lisp is used in the programming of quantum computers (as it is easy to write compilers in it), so should no be classed as just a learning language.

ctrl-alt-delor
  • 10,635
  • 4
  • 24
  • 54
  • Only a very few top tech companies will use Scheme or know how to interpret an answer expressed a la SICP. – Buffy Oct 06 '19 at 21:36
  • 2
    I love that book but I don't think it's a good way to learn algorithms for technical interviews. – Ellen Spertus Oct 07 '19 at 01:17
  • @Buffy I agree, so let me paraphrase my 3rd paragraph: While you may thing that you should choose a language that will be asked about in an interview, as this seems like the quickest way to arrive at where you want to be. I strongly suspect that it is faster to first learn to program (with whatever language makes this easier), and then learn a language (the one that you will be asked about) – ctrl-alt-delor Oct 07 '19 at 17:52