Jerry Blog

Your world should be a lively experience, not a series of hearsays.

【One topic per day】Persistent Bugger

前端题库,Javascript题集

Persistent Bugger. Write a function, persistence, that takes in a positive parameter num and returns its multiplicative persistence, which is the number of times you must multiply the digits in num...

【One topic per day】Find the missing letter

前端题库,Javascript题集

Find the missing letter Write a method that takes an array of consecutive (increasing) letters as input and that returns the missing letter in the array. You will always get an valid array. And i...

【One topic per day】Sum of two lowest positive integers

前端题库,Javascript题集

Sum of two lowest positive integers Create a function that returns the sum of the two lowest positive numbers given an array of minimum 4 integers. No floats or empty arrays will be passed. For ex...

【One topic per day】IQ Test

前端题库,Javascript题集

IQ Test Bob is preparing to pass IQ test. The most frequent task in this test is to find out which one of the given numbers differs from the others. Bob observed that one number usually differs fr...

【One topic per day】Bit Counting

前端题库,Javascript题集

Bit Counting Write a function that takes an integer as input, and returns the number of bits that are equal to one in the binary representation of that number. You can guarantee that input is non-...

【One topic per day】Equal Sides Of An Array

前端题库,Javascript题集

Equal Sides Of An Array You are going to be given an array of integers. Your job is to take that array and find an index N where the sum of the integers to the left of N is equal to the sum of the...

【One topic per day】Exes and Ohs

前端题库,Javascript题集

Exes and Ohs Check to see if a string has the same amount of ‘x’s and ‘o’s. The method must return a boolean and be case insensitive. The string can contain any char. Examples input/output: XO("...

【One topic per day】Directions Reduction

前端题库,Javascript题集

Directions Reduction In [“NORTH”, “SOUTH”, “EAST”, “WEST”], the direction “NORTH” + “SOUTH” is going north and coming back right away. What a waste of time! Better to do nothing. The path becomes...

【One topic per day】Double Cola

前端题库,Javascript题集

Double Cola Sheldon, Leonard, Penny, Rajesh and Howard are in the queue for a “Double Cola” drink vending machine; there are no other people in the queue. The first one in the queue (Sheldon) buys...

【One topic per day】Highest and Lowest

前端题库,Javascript题集

Highest and Lowest In this little assignment you are given a string of space separated numbers, and have to return the highest and lowest number. Example: highAndLow("1 2 3 4 5"); // return "5 ...