Giter Club home page Giter Club logo

Rhea Jain's Projects

factorial-using-recursion- icon factorial-using-recursion-

Write a recursive function factorial that accepts an integer n as a parameter and returns the factorial of n, or n!. A factorial of an integer is defined as the product of all integers from 1 through that integer inclusive. For example, the call of factorial(4) should return 1 * 2 * 3 * 4, or 24. The factorial of 0 and 1 are defined to be 1. You may assume that the value passed is non-negative and that its factorial can fit in the range of type int.

fibonacci-sequence icon fibonacci-sequence

The Fibonacci numbers are a sequence of numbers where each number after the first two is a sum of the prior two. As an illustration, here is a short sequence given starting values of (0, 1) is (0, 1, 1, 2, 3, 5, 8, 13). Write a program to generate and print the first n terms of the Fibonacci sequence where n >=1.

fibonacci-sequence-using-recursion icon fibonacci-sequence-using-recursion

The Fibonacci numbers are a sequence of numbers where each number after the first two is a sum of the prior two. As an illustration, here is a short sequence given starting values of (0, 1) is (0, 1, 1, 2, 3, 5, 8, 13). Write a program to generate and print the first n terms of the Fibonacci sequence using recursion in reverse order.

find-remainder- icon find-remainder-

Write a program to find the remainder when an integer A is divided by an integer B.

leerob.io icon leerob.io

✨ My portfolio built with Next.js, MDX, Tailwind CSS, and Vercel.

move-the-elements icon move-the-elements

Write a function moveElements which receives an array of n elements (both positive and negative) as input and shift all the negative elements to the right side of the array while maintaining the original order of the positive and negative elements. Note: consider 0 as a positive element. Suppose the array contains the following values: -6 7 13 10 -8 15 5 -9 2 -1 After a call to moveElements(arr, n); the array should store the following values: 7 13 10 15 5 2 -6 -8 -9 -1

partition-a-array icon partition-a-array

Given a randomly ordered array (arr) of n elements, function partitionArray(int arr[], int n, int x) partition the elements into two subsets such that elements <= x are in left subset and elements > x are in the right subset. Initial code of partitionArray(int arr[], int n, int x) which is given fails in some test cases. Identify those test cases and make the necessary changes in the function so that it gives the desired output in all the cases. Constraints : Don't rewrite the function only make the required changes in the given code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.