Find all $f: R\rightarrow R$ such that
(i) The set $\{\frac{f(x)}{x}| x\in R-\{0\}\}$ is finite
(ii) $f(x-1-f(x)) = f(x)-1-x$ for all $x$
To find all functions \( f: \mathbb{R} \rightarrow \mathbb{R} \) that satisfy the given conditions, we will proceed step-by-step.

1. **Condition (i):** The set \( \left\{ \frac{f(x)}{x} \mid x \in \mathbb{R} \setminus \{0\} \right\} \) is finite.
   - This implies that \( \frac{f(x)}{x} \) can only take a finite number of values. Let these values be \( c_1, c_2, \ldots, c_n \). Therefore, for any \( x \neq 0 \), \( f(x) = c_i x \) for some \( c_i \in \{c_1, c_2, \ldots, c_n\} \).

2. **Condition (ii):** \( f(x - 1 - f(x)) = f(x) - 1 - x \) for all \( x \).
   - Let us define \( g(x) = x - 1 - f(x) \). Then the given functional equation becomes:
     \[
     f(g(x)) = f(x) - 1 - x
     \]
   - We need to explore the properties of \( g(x) \) and how it interacts with \( f(x) \).

3. **Exploring \( g(x) \):**
   - By definition, \( g(x) = x - 1 - f(x) \).
   - Applying \( g \) again, we get:
     \[
     g(g(x)) = g(x - 1 - f(x)) = (x - 1 - f(x)) - 1 - f(x - 1 - f(x))
     \]
   - Using the functional equation, \( f(x - 1 - f(x)) = f(x) - 1 - x \), we have:
     \[
     g(g(x)) = (x - 1 - f(x)) - 1 - (f(x) - 1 - x) = x - 1 - f(x) - 1 - f(x) + 1 + x = 2x - 2f(x) - 1
     \]

4. **Analyzing the behavior of \( f(x) \):**
   - Since \( \left\{ \frac{f(x)}{x} \mid x \in \mathbb{R} \setminus \{0\} \right\} \) is finite, \( f(x) \) must be of the form \( f(x) = c_i x \) for some finite set of constants \( c_i \).
   - Suppose \( f(x) = c x \) for some constant \( c \). Substituting this into the functional equation:
     \[
     f(x - 1 - f(x)) = f(x) - 1 - x
     \]
     becomes:
     \[
     f(x - 1 - c x) = c x - 1 - x
     \]
     \[
     f(x(1 - c) - 1) = c x - 1 - x
     \]
     \[
     c(x(1 - c) - 1) = c x - 1 - x
     \]
     \[
     c x (1 - c) - c = c x - 1 - x
     \]
     \[
     c x - c^2 x - c = c x - 1 - x
     \]
     \[
     -c^2 x - c = -1 - x
     \]
     \[
     c^2 x + c = x + 1
     \]
     \[
     (c^2 - 1)x = 1 - c
     \]
   - For this to hold for all \( x \), we must have \( c^2 - 1 = 0 \) and \( 1 - c = 0 \). Solving these, we get \( c = 1 \) or \( c = -1 \).

5. **Checking the solutions:**
   - If \( c = 1 \), then \( f(x) = x \). Substituting \( f(x) = x \) into the functional equation:
     \[
     f(x - 1 - x) = x - 1 - x
     \]
     \[
     f(-1) = -1
     \]
     This is consistent.
   - If \( c = -1 \), then \( f(x) = -x \). Substituting \( f(x) = -x \) into the functional equation:
     \[
     f(x - 1 - (-x)) = -x - 1 - x
     \]
     \[
     f(x - 1 + x) = -x - 1 - x
     \]
     \[
     f(2x - 1) = -2x - 1
     \]
     This is also consistent.

Therefore, the solutions to the functional equation are \( f(x) = x \) and \( f(x) = -x \).

The final answer is \( \boxed{ f(x) = x } \) or \( f(x) = -x \).