This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const insertBefore = Element.prototype.insertBefore; | |
Element.prototype.insertBefore = function <T extends Node>( | |
newNode: T, | |
referenceNode: Node | null, | |
): T { | |
if ( | |
newNode instanceof Text && | |
referenceNode instanceof HTMLElement && | |
referenceNode?.localName === 'font' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prints out recurrence relation based on 3 inputs: operations, relation, and term | |
# get input of operations | |
operations = input() | |
#split operations by space into list | |
op_list = operations.split(' ') | |
# get initial number | |
init = input() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<fstream> | |
#include<string> | |
using namespace std; | |
int main(){ | |
int line_count = 1; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Change all letters to lower case | |
#include<iostream> | |
#include<string> | |
#include<cstdlib> | |
using namespace std; | |
int main(){ | |
string str; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<string> | |
#include<stdlib.h> | |
using namespace std; | |
int isLetter(int sasi); | |
//Tests to see if the character is a letter | |
int isUpper(int sasi); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Print out the sum of integers read from a file. | |
#include<iostream> | |
using namespace std; | |
int main(){ | |
int sum = 0, n; | |
while (cin >> n){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Print the odd numbers from 1 to 99. | |
#include<iostream> | |
using namespace std; | |
int main(){ | |
for (int i = 1; i < 100; i++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Watson gives two integers A & B to Sherlock and asks if he can count the number | |
of square integers between A and B (both inclusive). | |
A square integer is an integer which is the square of any integer. For example, 1, | |
4, 9, 16 are some of the square integers as they are squares of 1, 2, 3, 4 respectively. | |
Input Format | |
First line contains T, the number of testcases. T test cases follow, each in a newline. | |
Each testcase contains two space separated integers denoting A and B. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Shashank likes strings in which consecutive characters are different. For example, | |
he likes ABABA, while he doesn't like ABAA. Given a string containing characters A and | |
B only, he wants to change it into a string he likes. To do this, he is allowed to | |
delete the characters in the string. | |
Your task is to find the minimum number of required deletions. */ | |
#include<iostream> | |
#include<string> |
NewerOlder