Sub-arrays with equal number of occurrences | HARD💀| GFG POTD | 22-10-24 | GFG Problem of the day

āđāļŠāļĢāđŒ
āļāļąāļ‡
  • āđ€āļœāļĒāđāļžāļĢāđˆāđ€āļĄāļ·āđˆāļ­ 5 āļž.āļĒ. 2024

āļ„āļ§āļēāļĄāļ„āļīāļ”āđ€āļŦāđ‡āļ™ • 1

  • @codewithuday
    @codewithuday  15 āļ§āļąāļ™āļ—āļĩāđˆāļœāđˆāļēāļ™āļĄāļē +1

    class Solution {
    public:
    int sameOccurrence(vector& arr, int x, int y) {
    // code here
    int cx = 0 ,cy = 0;
    int res = 0 ;
    map map;
    map[0] =1;
    for(int i = 0 ; i