Programming

Programming

[Solved] Pet Store STARTERS 71 CodeChef

[Solved] Pet Store STARTERS 71 CodeChef

Alice and Bob went to a pet store. There are NN animals in the store where the i^{th}ith animal is of type A_iAi​. Alice decides to buy some of these NN animals. Bob decides that he will buy all the animals left in the store after Alice has made the purchase.…

[Solved] Instagram STARTERS 71 CodeChef

[Solved] Instagram STARTERS 71 CodeChef

Chef categorises an instagram account as spam, if, the following count of the account is more than 1010 times the count of followers. Given the following and follower count of an account as XX and YY respectively, find whether it is a spam account. Input Format Output Format For each test case, output on a new…

[Solved] Snapchat STARTERS 71 CodeChef

[Solved] Snapchat STARTERS 71 CodeChef

The most popular feature on snapchat is Snapchat Streak.A streak is maintained between two people if both of them send at least one snap to each other daily.If, on any day, either person forgets to send at least one snap, the streak breaks and the streak count is…

[Solved] Check If It Is a Straight Line

[Solved] Check If It Is a Straight Line

You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straight line in the XY plane. Problem: https://leetcode.com/problems/check-if-it-is-a-straight-line/?envType=study-plan&id=programming-skills-i Example 1: Input: coordinates = [[1,2],[2,3],[3,4],[4,5],[5,6],[6,7]] Output: true Example 2: Input: coordinates…