Prime Pair with Target Sum | GFG POTD | C++ | Java | Code Kar Lo
Vložit
- čas přidán 22. 07. 2024
- Given a number n, find out if n can be expressed as a+b, where both a and b are prime numbers. If such a pair exists, return the values of a and b, otherwise return [-1,-1] as an array of size 2.
0:00 Introduction
0:14 Problem Statement
1:57 Explanation
9:23 C++ Code
13:07 Java Code
Sieve Complete Article:www.geeksforgeeks.org/sieve-o...
Sieve TC: www.geeksforgeeks.org/how-is-...
My DSA Journey:- • How Did I Learn Data S...
How to Earn By GFG Articles:- • How to Write Article o...
Infosys Coding Questions:- • Infosys Coding Questions
Problem Link:-www.geeksforgeeks.org/problem...
Code Link:-github.com/ShubhamKashyap138/...
Playlist Link:- • Geeks for Geeks POTD
Linkedin:- / shubham-kashyap-65a29a218
Instagram:- im_shubham_kash...
My GFG Profile:- auth.geeksforgeeks.org/user/s...
gfg potd
gfg potd today
gfg problem of the day
potd gfg
potd
potd today
gfg
#dsa #datastructures #algorithm #gfg #potd #coding #array #strings #tree #binarysearchtree #codekarlo #dynamicprogramming
thanks
i kept all of the three loops till
Yes it will work as 0,n will never be a pair. 🙏👍
Very well explained
Thanks 🙏❤️
Java solution gives an error
Import vali line hogi ek gfg ne extra dali hui hai usko remove karke run krdo chal jayega
@@code_kar_lo ok tnq😇