Answer the question
In order to leave comments, you need to log in
Which languages are best for understanding pointers and recursions?
Hello!
It is said that the most difficult topics in programming are pointers and recursions. Which languages give the best understanding of these things? Name one language for each of these concepts.
Answer the question
In order to leave comments, you need to log in
It hardly depends on the language. Recursion is in almost everyone. Pointers in one form or another too.
Canonically, it would be appropriate to study them in C.
It is said that the most difficult topics in programming are...
The most difficult is, of course, loudly said. Languages, as already mentioned C++, C, Pascal.
To deal with pointers, see (or write it yourself) how lists work: singly-linked and doubly-linked.
For recursion, the standard problem is fibbonacci numbers. Slightly more complicated - bypassing the graph in depth.
You are given n - the number of cities and k - the number of roads. Next, k pairs of numbers are written - (a_i, b_i), which mean that there is a road from city a_i to city b_i. Find all cities that can be reached from city number 1. For example, for 6 cities and 4 roads, the input data is:
6 4
1 3
3 5
6 4
2 6
answer:
1 3 5
For recursion, I advise some pure functional language. There are no cycles at all, so you will figure out how to think "recursively".
Pointers - C
Recursions - Erlang, especially how to make it look like a loop
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question