Leetcode biweekly contest 134 - Video Editorial | Global Rank - 44
Вставка
- Опубліковано 12 вер 2024
- Contest Link - leetcode.com/c...
If you have any queries, you can contact me on LinkedIn, I will definitely try to resolve your query.
About Me -
I am Aniket, a third year CS student
LinkedIn - / aniket-more-5a928822a
Twitter - / an1ket_more
Join telegram - t.me/aniketmorecp
#leetcode #competitiveprogramming #codeforces #programming #datastructures #algorithm #codeforces
4th one was easy solved using map
#define ll long long
class Solution {
public:
long long countSubarrays(vector& nums, int k) {
int n=nums.size();
mapm1;
ll cnt=0;
for(auto v:nums){
mapm2;
for(auto [u,f]:m1){
ll vl=v&u;
m2[vl]+=f;
}
m2[v]++;
cnt+=m2[k];
m1=m2;
}
return cnt;
}
};
How can I reach there like you ? What should I do . I am struggling for 2nd 3rd problem .😢
I want to see you in Candidate master ✨
Great work bro.