ππΎπΌπ΄π πΈ
β
quick recursion question
I have a tests about lists and recursion next friday and I'm really worried because these are easily the 2 subjects I'm the worst at from what we've learned so far. we got a bunch of assignments to turn in until sunday night to practice but I find them really hard. I managed to do most of them but it took a lot of trial and error which I can't do during a test.
the final question in one of assignments is to write a recursive function that gets a list of int and returns whether it is descending or not, meaning if each node is smaller than the node that came before it. for example:
list -> 3 -> 2 -> 1 -> null is descending
list -> 2 -> 3 -> 1 -> null is not descending
I need to practice so don't tell me the code but broadly how to do it? I have no idea honestly
5 replies