Giter Club home page Giter Club logo

codewars's Introduction

Code wars | geeksforgeeks | Technical Questions | Interview Questions | Coderpad | Javascript

A list of technical questions using Javscript | js node.js

Click ⭐if you like it. Submiting Pull Request are highly appreciated. Check me @Bidyashish.


Getting Started

In order to the following example

just run eg:

node triplets-array-given-sum.js

Given an array and a value, find if there is a triplet in array whose sum is equal to the given value. If there is such a triplet present in array, then print the triplet and return true. Else return false

check triplets-array-given-sum.js.

arr=[1, 4, 45, 6, 10, 8]

sum=22

find array[a,b,c]  where a+b+c = sum

eg: From above array 4+10+8 =22
so Answers is [4,10,8]

Given an array and a value, find if there is a pairs in array whose sum is equal to the given value. If there is such a pairs present in array, then print the pairs and return true. Else return false

check pair-array-given-sum.js.

arr=[1, 4, 45, 6, 10, 8]

sum=7

find array[a,b]  where a+b = sum

eg: From above array 1+6 = 7
so Answers is [1,6]

The maximum sum subarray problem consists in finding the maximum sum of a contiguous subsequence in an array or list of integers:

Easy case is when the list is made up of only positive numbers and the maximum sum is the sum of the whole array. If the list is made up of only negative numbers, return 0 instead.

Empty list is considered to have zero greatest sum. Note that the empty list or array is also a valid sublist/subarray.

check continous-subsequence.js.


maxSequence([1, 2, 3, 4]

output: 10

Javascript Implementation of Longest Common Subsequence

Find longest common subsequence between two strings

check longest-common-subsequence.js.

String1 = AGGTAB
String2 = GXTXAYB

Result array conatining LCS is G,T,A,B
Length of result array 4
Result string GTAB


Bidyashish Kumar @Bidyashish.

LinkedIn profile: @Bidyashish.

codewars's People

Contributors

bidyashish avatar

Stargazers

 avatar

Watchers

 avatar

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.