Simple recursive program, how do I get passed?

xiaoxiao2021-03-06  71

Yesterday, the topic of the examiner was written 1 2 3 . . . N's recursive procedure, I feel very easy because I have done this procedure from the big one, and it is very skilled, maybe forget too much, I can't afford to return when I examine it yesterday. Specific logic, just think of the conditions of exiting, suddenly thinking out when he slept at night, it is simple, this morning uses C # written, a total of 5 lines of code, but let me exam. . . . Public int digui (int N) {INT S = 0; if (n == 1) s = 1; ELSE S = N DIGUI (- N); return s;} I have graduated, I didn't expect to participate in the company's test Like postgraduate, do you have to remember all kinds of algorithms? Don't you check it?

转载请注明原文地址:https://www.9cbs.com/read-91868.html

New Post(0)