Notes/Codes/Problem links under day 8 of A2Z DSA Course: takeuforward.o... Entire playlist: • Maths Playlist | Langu... Follow us on our other social media handles: linktr.ee/take...
Пікірлер: 16
@aniketgupta80645 ай бұрын
hey striver, a request. As you upload videos, kindly also make the required updates in the A to Z sheet as well so that we wont have to find them out on YT.
@user-mx6et3qm3i5 ай бұрын
can you please provide the link of the question?
@sachinchoudhary41424 ай бұрын
Ya please anyone provide the link
@adarshgupta19723 ай бұрын
@@sachinchoudhary4142 did you get it
@abhijeetbasfore68164 ай бұрын
Great explanation.
@tonylee18685 ай бұрын
great! love your work ❤❤❤❤ Take rest bro and Understood 🙂🙂
@trailblazer5552 ай бұрын
Great Bro; Understood well;
@hritikminmuley13975 ай бұрын
Hey Striver, can you please provide the respective code in c++/java.
@user-lz1qb9ek4jАй бұрын
class Solution { public: int count(int n) { vector prime(n, 1); int count = 0; for(int i = 2; i * i < n; i++) { if(prime[i] == 1) { for(int j = i * i; j < n; j += i) { prime[j] = 0; } } } for(int i = 2; i < n; i++) { if(prime[i] == 1) { count++; } } return count; } bool isPrime(int n) { if (n
@drishtirai8645 ай бұрын
Understood :))
@AkOp-bf9vm3 ай бұрын
notes?
@HimanshuKumar-sg6hv3 ай бұрын
can anyone explain me what is l = queries[i][0] and r = queries[i][1]
@vipuljamod41192 ай бұрын
Queries store the list. If Queries=3, then three range given.., So find primes for every range..., To access l and r of first query, l = Queries [i][0] r = Queries [i][1] Means if i=0 then it acces 0th l & r. If i=1 then it access 1st L & R And so on...,
@techmateinАй бұрын
Here queries can be seen as an array of array where the array the queries stores just have 2 indexes first for l(left) and r(right) So the queries stores the l and r for each query