1
$\begingroup$

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

$\endgroup$
  • 1
    $\begingroup$ What are "the main algorithms" for you ? $\endgroup$ – Michel Billaud Oct 6 at 8:57
  • $\begingroup$ The algorithm which are asked in job interview of top tech companies and in acm-icpc $\endgroup$ – Hritik Kumar Oct 6 at 12:13
  • $\begingroup$ Learning how to use an array is a first step on the long walk to learning how to program, and succeeding a job interview in a top tech company. $\endgroup$ – Michel Billaud Oct 6 at 14:26
  • $\begingroup$ The last sentence of you question is not complete (please edit). $\endgroup$ – ctrl-alt-delor Oct 6 at 17:50
  • $\begingroup$ I am not sure how allgorithms can be discussed without their steps, and technical interviews include complexity analysis, at least at top companies. Could you clarify what you want? $\endgroup$ – Ellen Spertus Oct 7 at 1:18
1
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Only a very few top tech companies will use Scheme or know how to interpret an answer expressed a la SICP. $\endgroup$ – Buffy Oct 6 at 21:36
  • 2
    $\begingroup$ I love that book but I don't think it's a good way to learn algorithms for technical interviews. $\endgroup$ – Ellen Spertus Oct 7 at 1:17
  • $\begingroup$ @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) $\endgroup$ – ctrl-alt-delor Oct 7 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.