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

3917. Count Indices With Opposite Parity (Brute Force) O(n2) + Optimized Solution O(n) + tips LEETCODE WEEKLY 500

  class Solution {     public int [] countOppositeParity ( int [] nums ) {          // approach 1 - checks every pair         int n = n...