The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
26 views
Consider the funciton $M$ defined as follows:

$M(n) = \begin{cases} n-10 & \text{ if } n > 100 \\ M(M(n+11)) & \text{ if } n \leq 100 \end{cases}$

Give a constant time algorithm that computes $M(n)$ on input $n$. (A contant-time algorithm is one whose running time is independent of the input $n$)
asked in Others by Veteran (99.8k points) | 26 views

Please log in or register to answer this question.



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

37,980 questions
45,481 answers
131,420 comments
48,452 users