Giter Site home page Giter Site logo

algorithmwithjs's Introduction

Algorithm With JavaScript

general

  1. binarySearch.js: Binary Search in JS.
  2. mapWithReduce.js: map function created with reduce method.
  3. variance.js: Variance algorithm in JS.
  4. combinations: Get all possible combinations from given arr.
  5. isPrime.js: dividing through 2 to root n, returns boolean result for number n whether prime or not.

codewars

  1. jadenCasingStrings.js: Make first letter in every words to be upper case.
  2. unique_in_order.js: takes as argument a sequence and returns a list of items without any elements with the same value next to each other and preserving the original order of elements.
  3. stringIncrementer.js: Your job is to write a function which increments a string, to create a new string. If the string already ends with a number, the number should be incremented by 1. If the string does not end with a number the number 1 should be appended to the new string.
  4. twoFighters.js: Create a function that returns the name of the winner in a fight between two fighters.
  5. complementaryDna.js: In DNA strings, symbols "A" and "T" are complements of each other, as "C" and "G". You have function with one side of the DNA (string,); you need to get the other complementary side. DNA strand is never empty or there is no DNA at all.
  6. countingDuplicates.js: Write a function that will return the count of distinct case-insensitive alphabetic characters and numeric digits that occur more than once in the input string. The input string can be assumed to contain only alphabets (both uppercase and lowercase) and numeric digits.

sort

  1. mergeSort.js: Sort algorithm that has time complexity of O(lgn). Uses divide and conquer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.