Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
Calculate the factorial of 4 using the algorithm.
Multiply 4 x 3 x 2 x 1.
Is 27 a prime number? Justify your answer.
Check for factors from 2 to 27.
What is the output of the factorial of 6?
Think of the repeated multiplication of numbers.
True or False: A prime number has exactly two distinct positive divisors.
Consider the definition of a prime number.
Implement a Java program that uses recursion to calculate the factorial of a number. Discuss its performance compared to the iterative approach.
Think about how each call can consume stack memory.
Given an unsorted array, write a program to sort it using bubble sort and count the number of swaps made. Discuss bubble sort's efficiency for large sets.
Consider using a variable to count swaps during the sorting process.
6 more questions in this section. Enroll free to practise them all.
Enroll free