Skip to content

Instantly share code, notes, and snippets.

View amrsmind's full-sized avatar
👩‍🎨
Thriving

Amr Nabil amrsmind

👩‍🎨
Thriving
View GitHub Profile
@amrsmind
amrsmind / solution.js
Created May 9, 2021 01:45
Find the Symmetric Difference The mathematical term symmetric difference (△ or ⊕) of two sets is the set of elements which are in either of the two sets but not in both. For example, for sets A = {1, 2, 3} and B = {2, 3, 4}, A △ B = {1, 4}. Symmetric difference is a binary operation, which means it operates on only two elements. So to evaluate a…
function sym() {
//return symmetric difference for two arrays
const getSym = (x,y) => {
x = [...new Set(x)].sort((a, b) => a - b);
y = [...new Set(y)].sort((a, b) => a - b);
const xLength = x.length;
const yLength = y.length;
let i = 0;
let j = 0;
let result = [];
@amrsmind
amrsmind / Simple example on scroll snap
Created April 29, 2020 02:17
scroll-snap-type scroll-snap-align
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.container{
display: flex;
height:500px;
@amrsmind
amrsmind / 1.py
Created January 22, 2018 02:47
it's a python code for the people wants to refresh their python basics just by looking into some code
'''
amr,ali,abeer,nabil = 5,99,11,20
amr,ali = ali,amr #swap
if amr == 99:
print("bal7")
else:
print("gamdgdn")