This file contains 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
/** | |
Solution for: http://codesnakers.com/projects/6.png | |
*/ | |
function solution(s){ | |
var len = s.length; | |
var sub = []; | |
var subLen = 0, tempLen; | |
var i=0, k = 0; | |
var isSorted = false; |
This file contains 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
/** | |
Solution for: http://codesnakers.com/projects/5.png | |
*/ | |
function solution(S, T) { | |
// write your code in JavaScript (Node.js 8.9.4) | |
if(S===T) return "EQUAL"; | |
var lenS = S.length; | |
var lenT = T.length; | |
var diff; |
This file contains 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
/* | |
find smallest positive integer not in array | |
*/ | |
function solution(A) { | |
// write your code in JavaScript (Node.js 8.9.4) | |
var len = A.length; | |
if(len===0) return 1; | |
if(len===1){ | |
if(A[0]===1) return 2; |
This file contains 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
/** | |
Solution for: http://codesnakers.com/projects/4.png | |
*/ | |
function solution(S) { | |
// write your code in JavaScript (Node.js 8.9.4) | |
var len = S.length; | |
if(typeof S !== "string" || len===0 || len>1000000 || len===undefined){ | |
return 0; | |
} |
This file contains 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
/** | |
Solution for: http://codesnakers.com/projects/2.png | |
http://codesnakers.com/projects/3.png | |
*/ | |
function solution(T) { | |
// write your code in JavaScript (Node.js 8.9.4) | |
var paths = []; | |
var keyArr = []; | |
var maxDistinct = 0; | |
var countDistinct = 0; |
This file contains 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
/** | |
Solution for: http://codesnakers.com/projects/1.png | |
*/ | |
function solution(ranks) { | |
// write your code in JavaScript (Node.js 8.9.4) | |
var len = ranks.length; | |
if(len===undefined){ | |
return 0; | |
} | |
var keyArr = []; |
This file contains 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
/* eslint-disable */ | |
import React, { Component } from 'react'; | |
import Axios from 'axios'; | |
import MovieIcon from '@material-ui/icons/Movie'; | |
import AvTimerIcon from '@material-ui/icons/AvTimer'; | |
import VisibilityIcon from '@material-ui/icons/Visibility'; | |
import FavoriteIcon from '@material-ui/icons/Favorite'; | |
import WarningIcon from '@material-ui/icons/Warning'; | |
import PropTypes from 'prop-types'; |