Birthday Cake Candles Hackerrank Easy Difficulty problem, authored by shashank21j. The max score is 10 Logic Get the number of candles(array size) Declare the array to store candles Sort array in reverse Assign tallest candle to T for comparison Set initial count to 1 for tallest candle Check all candles for match If match found increment counter If match not found …
Read moreSherlock and Squares Code #include <bits/stdc++.h> using namespace std; int main() { int t,i; cin>>t; // input no of testcases for(i=0;i<t;i++) { int a,b,y,total=0; float x; cin>>a>>b; // input starting and ending poi…
Read moreAppend and Delete Code #include <bits/stdc++.h #include <string> using namespace std; int main() { string s,t; int k,i,x,y,z; cin>>s>>t>>k; // taking input x=s.size(); // calculate the size of first string y=t.size(); //calculate the size o…
Read moreConstellation Three characters { #, *, . } represents a constellation of stars and galaxies in space. Each galaxy is demarcated by # characters. There can be one or many stars in a given galaxy. Stars can only be in the shape of vowels { A, E, I, O, U }. A collection of * in the shape of the vowels is a star. A star is contained in a 3x3 block. Stars cannot be overl…
Read moreThe Saga of the Missing Coin A teacher came into the class with a large box that has several coins. Each coin has a number printed on it. Before coming to the class, she ensured that all the numbers occur an even number of times. However, while coming to the class once coin fell down and got lost. She wants to find out the number of the missing coin. Samp…
Read moreSober Walk Our hoary culture had several great persons since time immemorial and king vikramaditya’s nava ratnas (nine gems) belongs to this ilk.They are named in the following shloka: Among these, Varahamihira was an astrologer of eminence and his book Brihat Jataak is recokened as the ultimate authority in astrology. He was once talking with Amarasimha,another g…
Read moreCopyright © 2021 Coding Demons All Rights Reseved
Social Plugin