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
{ | |
"basics": { | |
"name": "Vinay Verghese", | |
"label": "Senior Full Stack Developer", | |
"image": "", | |
"email": "vinay1@gwu.edu", | |
"phone": "+91 8137807505", | |
"url": "https://linkedin.com/in/vinayverghese", | |
"summary": "Full stack developer with over a decade of experience building enterprise, civic, and equity management platforms using Java, Ruby on Rails, React, and modern cloud-native technologies. Proven track record of delivering high-quality software in global teams across automotive, fintech, and public sectors.", | |
"location": { |
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
// Missing DigitII | |
// Using the JavaScript language, have the function MissingDigitII(str) take the str parameter, which will be a simple mathematical formula with three numbers, a single operator (+, -, *, or /) and an equal sign (=) and return the two digits that complete the equation. In two of the numbers in the equation, there will be a single ? character, and your program should determine what digits are missing and return them separated by a space. For example, if str is "38?5 * 3 = 1?595" then your program should output 6 1. | |
// The ? character will always appear in both the first number and the last number in the mathematical expression. There will always be a unique solution. | |
function MissingDigitII(str) { | |
str=str.replace(/=/,'===') |
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
// Missing DigitII | |
// Using the JavaScript language, have the function MissingDigitII(str) take the str parameter, which will be a simple mathematical formula with three numbers, a single operator (+, -, *, or /) and an equal sign (=) and return the two digits that complete the equation. In two of the numbers in the equation, there will be a single ? character, and your program should determine what digits are missing and return them separated by a space. For example, if str is "38?5 * 3 = 1?595" then your program should output 6 1. | |
// The ? character will always appear in both the first number and the last number in the mathematical expression. There will always be a unique solution. | |
function MissingDigitII(str) { | |
str=str.replace(/=/,'===') |
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
function layerTopRight(matrix) { | |
// remove and store the first row from matrix | |
var top = matrix.splice(0, 1); | |
// store the right column of the matrix | |
var right = []; | |
// remove the last column from the matrix | |
for (var i = 0; i < matrix.length; 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
function wordsWithRepeatedChars(str) { | |
var list = []; | |
//split string into words based on spaces and count repeated characters | |
str.toLowerCase().split(" ").forEach(function(currentWord){ | |
var lastLetter = ""; | |
var alreadyAdded = false; | |
//split word into characters and add to the list only if a letter repeats |
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
/** | |
* @param {string} s | |
* @param {string} t | |
* @return {boolean} | |
*/ | |
var isIsomorphic = function(s, t) { | |
var result = true; | |
if (s.length === t.length) { | |
var hash1 = []; |
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
function makeChange (amount) { | |
var change = {}, | |
i = 0, | |
coins = makeChange.COINS, | |
coin; | |
while (amount && (coin = coins[i++])) { | |
if (amount >= coin) { | |
change[coin] = ~~(amount / coin); |
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
// Using the JavaScript language, have the function RunLength(str) take the str parameter being passed and return a compressed // version of the string using the Run-length encoding algorithm. This algorithm works by taking the occurrence of each | |
// repeating character and outputting that number along with a single character of the repeating sequence. | |
// For example: "wwwggopp" would return 3w2g1o2p. The string will not contain any numbers, punctuation, or symbols. | |
// Input = "aabbcde" Output = "2a2b1c1d1e" | |
// Input = "wwwbbbw" Output = "3w3b1w" | |
function RunLength( str ) { | |
var output = ''; | |
while ( str.length > 0 ) { |