Skip to content

Instantly share code, notes, and snippets.

View MunimIftikhar's full-sized avatar
🏠
Working from home

Munim Iftikhar MunimIftikhar

🏠
Working from home
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tulip Wallpaper</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="tulip-container">
@MunimIftikhar
MunimIftikhar / CashRegister.md
Last active November 11, 2022 10:37
freeCodeCamp: Cash Register

Problem statement

Design a cash register drawer function checkCashRegister() that accepts purchase price as the first argument (price), payment as the second argument (cash), and cash-in-drawer (cid) as the third argument.

cid is a 2D array listing available currency.

The checkCashRegister() function should always return an object with a status key and a change key.

Return {status: "INSUFFICIENT_FUNDS", change: []} if cash-in-drawer is less than the change due, or if you cannot return the exact change.

Return {status: "CLOSED", change: [...]} with cash-in-drawer as the value for the key change if it is equal to the change due.

@MunimIftikhar
MunimIftikhar / TelephoneNumberValidator.md
Last active May 10, 2023 13:39
freeCodeCamp: Telephone Number Validator

Problem statement

Return true if the passed string looks like a valid US phone number.

The user may fill out the form field any way they choose as long as it has the format of a valid US number. The following are examples of valid formats for US numbers (refer to the tests below for other variants):

555-555-5555
(555)555-5555
(555) 555-5555
555 555 5555
@MunimIftikhar
MunimIftikhar / CaesarsCipher.md
Last active November 11, 2022 10:18
freeCodeCamp: Caesars Cipher

Problem Statement

One of the simplest and most widely known ciphers is a Caesar cipher, also known as a shift cipher. In a shift cipher the meanings of the letters are shifted by some set amount.

A common modern use is the ROT13 cipher, where the values of the letters are shifted by 13 places. Thus A ↔ N, B ↔ O and so on.

Write a function which takes a ROT13 encoded string as input and returns a decoded string.

All letters will be uppercase. Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on.

Input example #1

@MunimIftikhar
MunimIftikhar / RomanNumeralConvertor.md
Last active November 8, 2022 18:27
freeCodeCamp: Roman Numeral Convertor

Problem Statement

Convert the given number into a roman numeral. All roman numerals answers should be provided in upper-case.

Constraints

  • Given number is an arabic numeral ranges starting from 1.

Input example #1

44
@MunimIftikhar
MunimIftikhar / PalindromeChecker.md
Last active November 8, 2022 18:27
freeCodeCamp: Palindrome Checker

Problem Statement

Return true if the given string is a palindrome. Otherwise, return false.

A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing.

Note: You'll need to remove all non-alphanumeric characters (punctuation, spaces and symbols) and turn everything into the same case (lower or upper case) in order to check for palindromes.

We'll pass strings with varying formats, such as racecar, RaceCar, and race CAR among others.

We'll also pass strings with special symbols, such as 2A3*3a2, 2A3 3a2, and 2_A3*3#A2.