Pages

Thursday, January 2, 2025

Check whether a number is Prime Number or not

 Check whether a number is Prime Number or not

Mistakes:- 

Theory-wise:-
I didn't knew what is Prime Numbers:
**Prime Number:- Divisible by 1 and itself only.
Composite Number:- Divisible by 1 and itself as well as other numbers too.


No comments:

Post a Comment

remove duplicates from sorted array - two pointer approach (leetcode)

  class Solution {     public int removeDuplicates ( int [] nums ) {         // base case: return if array have no el.         if ( nums...