Coder Social home page Coder Social logo

knaxus / problem-solving-javascript Goto Github PK

View Code? Open in Web Editor NEW
1.4K 29.0 262.0 1.09 MB

:fire: Crack you JS interviews ⚑ Collection of most common JS Interview questions with Unit Tests πŸš€

Home Page: https://ashokdey.in

License: MIT License

JavaScript 99.91% Shell 0.09%
datastructures interview-questions interview-preparation algorithm algorithms-and-data-structures javascipt javascript-algorithms javascript-es6 nodejs-development beginner

problem-solving-javascript's People

Contributors

abkhanch avatar ahtaxam avatar ashokdey avatar balajipachai avatar christierobson avatar deadem avatar dependabot[bot] avatar faergeek avatar francismarcus avatar gabrielbarker avatar iamshadmirza avatar jdhrnndz avatar jonathanmcchesney avatar k88manish avatar karimelazzouni avatar leosl avatar maharshi-gor avatar maxmyers13 avatar ngittlen avatar niyonx avatar qualitymanifest avatar ryanmcpherson7 avatar sanyamdogra avatar scottwedge avatar softwarevirus avatar sumeetharyani avatar tanyakhandelwal avatar thestl avatar ulasaydin avatar yahavarm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

problem-solving-javascript's Issues

Add Unit Test for - postfix expression evaluation

Add the Unit Test for #33

What is required?

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Knuth–Morris–Pratt(KMP) Pattern Matching(Substring search)

Knuth–Morris–Pratt(KMP) Pattern Matching(Substring search)

Problem: Given two string A and B. Check if A is Substring of B.
Return true if substring , else return false.
Create a new folder KMP in Classics
Highly recommended to watch this video to understand KMP

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Add Unit Test for - Caeser Cipher

🀑 What is required?

The algorithm is here : Caeser Cipher

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Add Unit Test For - Trie search string

πŸ‘½ What is required?

Function to test: search();
The algorithm is here : Trie

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Implement Jump search

πŸ•΅οΈβ€β™‚οΈ What is required?

You can learn about it from here

  • Create a new folder in Searching
  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Add Unit Test for - Fibonacci

πŸ‘½ What is required?

The algorithm is here : Fibonacci

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Add Unit Test for - all-words-in-trie in Trie

πŸ‘½ What is required?

The algorithm is here : all-words-in-trie

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Add Unit Test For - Binary Tree preOrder Traversal

πŸ‘½ What is required?

Function to test: preOrder();
The algorithm is here : Binary Tree

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Implement Ternary search

πŸ₯Ά What is required?

  • Create a new folder in Searching
  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Follow the Contribution Guide strictly, go through the codebase pattern and add tests accordingly

Thank You!

Armstrong No.

I would gladly take up the task for adding Armstrong no.

Add Unit Test for - Loop in list

🀑 What is required?

The algorithm is here : Loop in list

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Hey! we can have CD as well.

πŸ€– Why I am worried?

I can see that the CI here is working great and I have an idea of having CD as well.

To have a CD pipeline in place we can do the following:

  • Create a web page of problem listing
  • Create an express server to serve that weeb page
  • Finally, Heroku can be used to showcase the repo to the world in the form of a website

πŸŽ‰

Add Unit Test for - LRU Cache

🀑 What is required?

The algorithm is here : LRU-Cache

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Add Contribution Guide

What do we need in the Contribution Guide?

  • When adding a new problem with solution

    • Take care of the filename convention (Very Important)
    • Problem statement should be there with examples
    • Make sure you add the Run Time complexity of your solution
    • Please take care of the segregation of the Problems as per the given Folder Structure
    • It's great if you can add the Unit Tests to verify your solutions as well
    • Strictly follow ESLINT rules
  • When adding a Unit Test

    • Take care of the file name convention
    • Make sure CI (Travis) is passing

Queue data structure

Need following functions in queue:

File location - Queue

  1. empty() – Returns whether the queue is empty.
  2. size() – Returns the size of the queue.
  3. front() – Function returns a the first element of the queue.
  4. back() – Function returns a the last element of the queue.
  5. push(g) – Function adds the element β€˜g’ at the end of the queue.
  6. pop() – Function deletes the first element of the queue.

Example:

Queue q = [1,2,3,4,5,6];
q.empty() false
q.size() 6
q.front() 1
q.back() 6
q.push(10) [1, 2, 3, 4, 5, 6, 10]
q.pop() [2, 3, 4, 5, 6, 10]

Caesar cipher

⚠️ Issue

Caesar cipher should raise and error when second argument is not a number, instead it's returning a string of "undefinedundefinedundefined"

Add Unit Test for - A* algorithm

πŸ€– What is required?

The algorithm is here : A* pathFinder

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Edit in Readme.md file of the project

Just correct the spelling of Find under contribution in Readme.md file of the repository. Can I do it?

PS- I am newbie, sorry for this silly issue.
If this is a valid issue, please assign it to me.

Add Unit Test for - Get Maze Path

πŸ‘½ What is required?

The algorithm is here : get-mazePath

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Add unit tests for solved problems

Hello folks! Unit testing is one of the best ways to build robust applications. If you are a beginner, it's a great place to start with Unit Testing and your Open Source contribution journey.

You can find ample of examples in the repo itself and hence can kickstart with the unit tests for solutions not having test cases.

Add new problems with solution

If you are very new to the world of software development and you are finding it hard to start your open source contribution, here is the easiest way to kick-off!

This issue is not bounded to a single person
Mention the Problems you will be adding so that people do not collide

  • Add a logical problem with the solution
  • Follow the pattern for file names and folder name (adding Contribution Guide ASAP)
  • Add Unit Test as well to verify the solution

Bottom View of a Binary Tree

Create a new folder bottom-view-binary-tree in Binary Tree .
Use implemented BinaryTree.
Problem is statement here: bottom-view-binary-tree.

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

Handling fibonacci for negative numbers and 0

Function fibonacciTabular is not handled if a negative number is provided. It returns undefined as output.

If 0 is given as index in fibonacciTabular it returns 0 instead of 1.

@ashokdey For the functions fibonacci and fibonacciMemoized if negative numbers are provided the output is coming as 1. Is it correct to handle in such a way that the output should be 1 or it should be handled that the output comes as 0?

Balanced Paratheses Problem

Check for balanced parentheses in the given string.

 ()() --> return true
 (((  --> return false
 ((()  --> return false

I want to implement this problem using reduce() method in JS.

image

Can I work on this problem ?

Add Unit Test For - get-unique-words for Trie

πŸ‘½ What is required?

The algorithm is here : get-unique-words

  • Follow the ESLint rules strictly
  • Follow the filename and folder structure strictly
  • Since the Contribution Guide is not ready yet, go through the codebase pattern and add tests accordingly

Thank You!

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.