Projects
This page is my main work at the moment. You may see changes from time to time when you visit, and I would be happy to discuss those changes.

Caesar Cipher

Description: Caesar Cipher; shifts the given message letters by a specified number of characters which is passed in.

Language: javascript


(e,t,n)=>{let r=t.toLowerCase().split("");n%=r.length;let a=e.toLowerCase().split(""),i="";for(let l=0;l<a.length;l++){let t=a[l],o=r.indexOf(t);if(" "===t||-1===o){i+=t;continue}let s=o+n;s>r.length-1&&(s=s-(r.length-1)-1),e[l]===e[l].toUpperCase()?i+=r[s].toUpperCase():i+=r[s]}return i}

Max Stock Provide

Description: Takes in an array of prices and returns the max possible profit for the day. In other words, find the lowest point and the highest point. Subtract the value from the highest to the lowest and return that value.

Language: javascript


e=>{let t=e.sort(((e,t)=>e-t));return t[t.length-1]-t[0]>0?t[t.length-1]-t[0]:-1}

Sieve Of Eratosthenes

Description: Find all the prime numbers up to a given number.

Language: javascript


e=>{let t=[];for(let r=0;r<=e;r++)t[r]=!0;t[0]=!1,t[1]=!1;for(let r=2;r<=Math.sqrt(e);r++)for(let n=2;n*r<=e;n++)t[n*r]=!1;let n=[];return t.forEach(((e,t)=>{e&&n.push(t)})),n}