Leena Lavanya

July 11, 2021

Short CSS Base Reset - Essential CSS Properties to Reset [Reference]

As a general CSS reset applied across all elements of a website, use the below. I’ve included some (not very helpful) comments to explain the most common use case I have found for each of the properties. * { margin: 0;/* the amount of space that a paragraph has by...

March 26, 2019

Round A of Google Kick Start 2019 - Training

Below is a solution for both test sets of Training (7pts, 13pts), Round A of Kick Start 2019. It first sorts all the students by descending order of skill and then calculates the number of hours required for a ‘fair’ n - (p - 1) combinations to find the minimum...

February 19, 2019

Code Chef February Challenge Div. 2 2019 - Appy and Contest

Problem HMAPPY2 in the February Challenge 2019 Code Chef (Division 2) basically required finding the number of integers between 1 and N that are divisible by an integer A and not divisible by an integer B or divisible by B and not divisible by A. If the number was found...

January 17, 2019

The Basic Lazy Load (ft. Images & IFrames)

bLazy, Echo.js, Yet Another Lazy Loader, jQuery / Wordpress plugins are some of the many libraries designed to speed up initial load, reduce data usage, lighten server load as well as provide a host of other benefits resulting from a site not attempting to call and display every image, script,...

December 30, 2018

Printing A Reversed Array of Integers

What this does is read integer by integer from cin and insert it at the beginning of a string variable. The string variable is then printed to cout. Another way to do this would be to create a vector, store the integers and then print it in reverse - but...

October 18, 2018

Chef and Semi-Primes - 2019 Code Chef SnackDown

In the 2019 SnackDown, the problem Chef and Semi-Primes (CHEFPRMS) required that given an integer N, one must determine whether it can be expressed as a sum of two square-free semi-primes. The time limit is 1s for a maximum number of test cases of 200, where the maximum value of...

October 18, 2018

Solution for SnackDown 2019: Qualifying to Pre-Elimination

Problem QUALPREL in the Online Qualifiers of the Code Chef SnackDown 2019 required that given a N number of scores S and an integer K, one should output the number the number of scores that are higher than or equal to the Kth highest score.

October 4, 2018

Waffle Choppers - Test Set 1 Solution for Google Code Jam 2018

The Small Test Set for Round 1A Google Code Jam 2018 required that given an n number of test cases (each containing information on the number of rows and columns of a waffle (waffle squares?) and whether or not each waffle square has a chocolate chip) one should determine whether...

September 4, 2018

Daily Coding Problem: Problem #3

The Daily Coding Problem (Day 3) was given an array of integers, to return the first postive integer missing. The inputed array could contain duplicate and negative numbers. For instance, given an array of [-2 -1, 4, 4, 1, 3], the program should return 2. The solution below was to...

September 4, 2018

Daily Coding Problem: Problem #2

The Daily Coding Problem (Day 2) was given an array of integers, to return another array of integers consisting of the product of all the integers of the original array except the one at place i (i being the place of each integer in the original list). For instance, an...

August 31, 2018

Trouble Sort Solution - 2nd Try at Google Code Jam

This is the second piece of C++ code I’ve written. It’s bound to be awful - do forgive me. It’s the solution to the 2018 Google Code Jam Qualifying Round B. I’m going to split the solution into parts.

August 31, 2018

Saving The Universe Again - An Amateur Solution

This is the first time I’m writing a C++ code (or program or whatever). I decided I would learn a new langauge for the Google Code Jam and I’m going to do that by just attempting the previous years’ questions. This is the working solution for ‘Saving The Universe Again’...

August 27, 2018

Fade-In Fade-Out Hover Effect Using CSS Transitions

jQuery’s fadeToggle() is literally the easiest way to fade in and fade out elements - onmouseover, onclick or whatever. But what if we wanted the same effect using only CSS? Below is a short code to achieve a fade-in fade-out effect on hover - purely using CSS transitions:

August 27, 2018

Using Canvas to Create Cloth that Moves

Last week, I completed a pen that turned any image into swaying cloth. At first, it had 0 hits but the next day, after it was picked, I got over 1139 hits in a matter of 24 hours. That’s why I decide to write a post on how to create...

© Copyright 2021 Leena Lavanya. Icons by Font Awesome. Image Credit: Taras Shypka on Unsplash.