• Meta tag @media in css for responsive websites

    Meta tag @media in css for responsive websites To make the websites responsive, we use the meta tags which makes our website look more responsive when used in smart phones or ipads. Using meta tag and @media in css for making website more responsive when used in small screen devices. Link to JS FIDDLE: //jsfiddle.net/djmayank/a2tn43yw/26/embedded/html,css,result/dark/

  • Chaging background color using @media in css

    Chaging background color using @media in css LINK TO JS FIDDLE //jsfiddle.net/djmayank/yprt6r9m/5/embedded/html,css,result/dark/ The @media rule is used in media queries to apply different styles for different media types/devices. Media queries can be used to check many things, such as: width and height of the viewport width and height of the device orientation (is the tablet/phone in landscape…

  • Flex changing positions on resizing window

    Flex changing positions on resizing window The main css code for the position changing is : @media all and (min-width: 750px) { .nav {text-align:left;flex: 1 auto;order:1;} .article {flex:5 0px;order:2;} footer {order:3;} }

  • The Coin Change Problem[hackerRank solution]

    The Coin Change Problem[hackerRank solution] This is a C++ Program that Solves Coin Change Problem using Dynamic Programming technique. Problem: There are infinite number of coins of x different values. These values are given. Using these coins, you have to make change for Rs. N. In how many ways, you can make this change?

  • Artificial Intelligence is the next new

    AI comes of age It was only in December that the US’ National Aeronautics and Space Administration (Nasa) announced that a solar system with as many planets as our own had been discovered with the help of its Kepler space telescope and AI. Closer home, Microsoft and the International Crops Research Institute for the Semi-Arid…

  • Egg Dropping Puzzle[DP][GFG]

    Egg Dropping Puzzle[DP][GFG] Problem: The following is a description of the instance of this famous puzzle involving n=2 eggs and a building with k=36 floors. Suppose that we wish to know which stories in a 36-story building are safe to drop eggs from, and which will cause the eggs to break on landing. We make…

  • Sparse Arrays[HackerRank Solution]

    Sparse Arrays[HackerRank Solution] Problem: There is a collection of N strings ( There can be multiple occurences of a particular string ). Each string’s length is no more than 20 characters. There are also Q queries. For each query, you are given a string, and you need to find out how many times this string occurs in the…

  • Sherlock and Array[HackerRank Solution]

    Sherlock and Array[HackerRank Solution] Problem: Watson gives Sherlock an array A of length n. Then he asks him to determine if there exists an element in the array such that the sum of the elements on its left is equal to the sum of the elements on its right. If there are no elements to the…

  • Chocolate Feast[HackerRank Solution]

    Chocolate Feast[HackerRank Solution] Problem: Little Bobby loves chocolate, and he frequently goes to his favorite  store, Penny Auntie, with  dollars to buy chocolates. Each chocolate has a flat cost of  dollars, and the store has a promotion where they allow you to trade in  chocolate wrappers in exchange for  free piece of chocolate. For example, if  and Bobby has  dollars that he…

  • The Maximum Subarray[HackerRank Solution]

    The Maximum Subarray[HackerRank Solution] Dynamic Programming Problem: Given an array of N elements, find the maximum possible sum among all nonempty subarrays. all nonempty subsequences. We define a subarray as a contiguous subsequence. Note that empty subarrays/subsequences should not be considered. Input Format The first line of input contains a single integer T denoting the number of test cases. The first…