Ice Cream Parlor

Sort by

recency

|

957 Discussions

|

  • + 0 comments

    Amazing!

  • + 0 comments

    Here is my c++ solution, you can watch the explanation here : https://youtu.be/WvLuA-LCsb0

    vector<int> icecreamParlor(int m, vector<int> arr) {
        map<int, int> mp;
        for (int i = 0; i < arr.size(); i++) {
            int complement = m - arr[i];
            if (mp.count(complement)) {
                return {mp[complement] + 1, i + 1};
            }
            mp[arr[i]] = i;
        }
        return {};
    }
    
  • + 0 comments
    def icecreamParlor(m, arr)
        seen = []
        for i in 0...arr.length
            comp = m - arr[i]
            if seen.include? comp
                ind = [seen.index(comp)+1, i+1]
                break
            end
            seen.push arr[i]
        end
        
        ind
    end
    
  • + 0 comments

    Solution of Ice Cream Parlor

    def icecreamParlor(m, arr):
        # Write your code here
        
        l1=[]
        for i in range(0,len(arr)):
            for j in range(i+1,len(arr)):
                if(arr[i] + arr[j] == m):
                    l1.append(i+1)
                    l1.append(j+1)
                    break
                    
        return l1
    
  • + 0 comments

    Branded products for "Ice Cream Parlor" can turn any sweet treat into a memorable experience. From custom ice cream scoops to branded waffle cone holders, these items are perfect for creating a fun and recognizable brand identity. Offer your customers personalized toppings containers, eco-friendly takeaway boxes, or reusable cups that promote your parlor’s name. With unique, branded products, you can elevate the entire ice cream experience while promoting sustainability and style.