Search:

Type: Posts; User: johnmerlino

Search: Search took 0.45 seconds.

  1. Replies
    3
    Views
    523

    Re: 2-dimensional arrays

    that was helpful, thanks
  2. Replies
    3
    Views
    523

    2-dimensional arrays

    In this code snippet:



    public static int[][] pascalTriangle(int n) {
    int[][] pt = new int[n][];
    for (int i = 0; i < n; i++) {
    pt[i] = new int[i + 1];
    ...
  3. trying to pass default params to tail recursion function

    In this code:



    public static void main(String[] args) {
    System.out.println(tailrecsum(5,0));
    }

    private static int tailrecsum(int x,int running_total, int default_total){
    if(x == 0){
  4. Replies
    3
    Views
    692

    Re: programming the Fibonacci number

    thanks for response
  5. Replies
    3
    Views
    692

    programming the Fibonacci number

    the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previous two.

    So I would expect output like this:

    0,1,1,2,3,5...



    private...
Results 1 to 5 of 5