Coder Social home page Coder Social logo

akshitagit / javascript Goto Github PK

View Code? Open in Web Editor NEW
81.0 2.0 111.0 1.43 MB

Repository for JavaScript codes and algos.Star the repo too.

Home Page: https://github.com/akshitagupta15june

License: MIT License

JavaScript 75.67% HTML 6.14% CSS 2.47% Python 4.18% C++ 4.43% SCSS 7.11%
javascript algorithms hacktoberfest codes dsa data-structures

javascript's Introduction

JavaScript

Issues Pull Requests Forks Stars

REPOSITORY MAINTAINER : AKSHITA GUPTA

Open Repository For Students to Contribute Algorithms and Data Structures in different Languages

This Repository is meant for everyone to create code and learn to contribute to open source

People can star, fork or clone this repo and can add any type of data structures or algorithm codes and can raise PR during hacktoberfest.

Use this repo for contributing in open source. Start solving issues and raise the pull requests and even you can create your own issues. If you want to contribute to a project, the simplest way is to:

Find a ISSUE you want to contribute to ->> Fork it

  • Clone it to your local system
git clone https://github.com/your-username/hacktoberfest.git
  • Make a new branch
git checkout -b branch-name
  • Make your changes

  • Commit and push

git add .
git commit -m 'Commit message'
git push origin branch-name
  • Create a new pull request from your forked repository (Click the New Pull Request button located at the top of your repo)
  • Wait for your PR review and merge approval!
  • Star this repository if you had fun!

Contributors 🙏 💫

10

Happy coding!

javascript's People

Contributors

acearpit avatar agyin3 avatar akshitagupta15june avatar akwe-afriitech avatar ankit-rawani avatar banushanv avatar bilalzhd avatar boadusamuel avatar edsondomingos avatar ephremdeme avatar gargi-agrawal avatar garridorafa avatar hardy8118 avatar harshitbhat avatar hendrikorasisimbolon avatar ifahadashraf avatar imanshu03 avatar jagroop2001 avatar join2akshay avatar kartikchauhan avatar khanhtranngoccva avatar lonelysam16 avatar nachiketadhal avatar ngdangtu-vn avatar nilaylilawala avatar saadhztl avatar saurabhhere avatar utk09 avatar xenomshox avatar zheeno 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

Watchers

 avatar  avatar

javascript's Issues

INTERVIEW QUESTIONS ISSUES!

THE PEOPLE WHO HAVE FACED ANY INTERVIEWS AND THEY KNOW THE QUESTIONS WHICH WERE ASKED AND IF THEY ARE COMFORTABLE IN SHARING THEN THEY CAN RAISE THE ISSUE WITH THE QUESTIONS AND SOME DESCRIPTIONS TOO , SO THAT OTHER CAN SOLVE THEM AND LEARN.

ALL THE CODES WILL BE ADDED IN INTERVIEW QUESTION FOLDER!

HAPPY CODING TO EVERYONE!!!

HACKTOBERFEST 2020 (Open Source Celebration)

We all know Hacktoberfest will be starting from 1st October 2020.

Hacktoberfest is a celebration open to everyone in our global community.
Pull requests can be made in any GitHub-hosted repositories/projects.

Four valid pull requests (PRs) between October 1-31 (in any time zone) are required in this open source celebration.
If a maintainer reports your pull request as spam or behavior not in line with the project’s code of conduct, you will be ineligible to participate.

You can sign up anytime between October 1 and October 31- here https://hacktoberfest.digitalocean.com/

PR'S will be increased from 1st October onwards so I request everyone to solve issues , raise your issues but please maintain the code of conduct.

  1. STAR THIS REPO before any PR.

  2. Only those PR's will be merged if there is no conflict with the master branch, the code which is not available already in the repo and if the code is added to suitable folder.

  3. It is difficult to assign the issue to a seprate person so pr's will be merged if the issues are solved in fcfs.

  4. I will be adding some more issues(beginner friendly as well as moderate) but it will be great if you all look at repo's and find out what different codes can be added because DSA is very vast.

At last Enjoy this month of open source celebration.
All the best!
Happy Coding!

Add the algorithms!!

Add the algorithms if you find they are not already added in the repositories and create a pull request.

Example :
In sorting/searching repo many algos are not added so add them and raise the pull request.

  • you can create issue on codes if you find any mistakes in them.

Happy Coding!!!

PROCESS OF CONTRIBUTION IN THIS REPOSITORY

PROCESS OF CONTRIBUTION IN THIS REPOSITORY

FORK THIS REPOSITORY
ADD YOUR CODE IN RESPECTIVE FOLDER
CREATE A PULL REQUEST
AFTER A SIMPLE CHECK I WILL MERGE THE PR

HAPPY CODING AND CONTRIBUTING!!!!

Fix colliding name for Selection Sort

Hi @akshitagupta15june,

I had cloned the repo to contribute but it seemed the file names for selection sort were causing some collisions due to which I was unable to work. Can you please fix that by either deleting one of them or renaming one of them?

Thanks

Colliding file names on mac OS due to the default case-insensitive filesystem

When I git clone on my Mac:

warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'Sorts/SelectionSort.js'
  'Sorts/selectionSort.js'

You need to rename one of these files to avoid collision on case-insensitive filesystem

IS PARENTHESIS BALANCED?

You are given a string of brackets i.e. '{', '}' , '(' , ')', '[' , ']' . You have to check whether the sequence of parenthesis is balanced or not.
For example, "(())", "(())()" are balanced and "())(", "(()))" are not.
Input Format

A string of '(' , ')' , '{' , '}' and '[' , ']' .
Constraints

1<=|S|<=10^5
Output Format

Print "Yes" if the brackets are balanced and "No" if not balanced.
Sample Input

(())

Sample Output

Yes

Pull requests here won’t count toward Hacktoberfest.

Hi there,

Thank you for your interest in Hacktoberfest and in helping others make their first contributions to open source.

While we agree that it's important to help others, this repository does not do this in a way that is in line with the Hacktoberfest values. Please read the part that talks about high-quality contributions to understand why we are reaching out and taking action. Due to this, we've added this repository to the list of excluded repositories which means pull requests here will not count toward Hacktoberfest 2020.

This is not a DigitalOcean decision, it's one that is inspired by the community of maintainers and contributors who all agree that quality is more important than quantity when it comes to engagement in the Open Source community. The values remind us to shift the focus from contributions to repositories that encourage folks to quickly create and gain a pull request to contributions that will help people level-up their skills and contribute to open-source projects that are in need of help.

If you feel that this repository is an effective learning resource, we encourage you to keep running it since a core part of the aim for Hacktoberfest is to encourage new folks to get involved with open-source.

However, if you are interested in having contributions to this repo count toward Hacktoberfest we encourage you to take a look at this list of Hacktoberfest issues for inspiration and make the necessary changes to focus on enabling people to make meaningful contributions to open source projects.

If you have any questions about this or participating in Hacktoberfest, please contact our team via email [email protected] or join our community Discord server.

Happy Hacking,
The Hacktoberfest Team

Hacktoberfest is presented by DigitalOcean, Intel and DEV.

Radix Sort

I would like add the following algorithm, kindly accept my PR and merge request for hacktoberfest.

checkout problem for trailing spaces at file name

Hello, there was an checkout problem at window if you try to checkout your project from scratch via git clone.

Cause: the file Array/LongStrWithoutRepeat.js has 3 trailing spaces in the file name!

$ git clone [email protected]:Huluvu424242/JavaScript.git
Cloning into 'JavaScript'...
Enter passphrase for key '/c/Users/huluv/.ssh/id_rsa':
remote: Enumerating objects: 747, done.
remote: Counting objects: 100% (208/208), done.
remote: Compressing objects: 100% (97/97), done.
remote: Total 747 (delta 145), reused 118 (delta 110), pack-reused 539
Receiving objects: 100% (747/747), 181.20 KiB | 871.00 KiB/s, done.
Resolving deltas: 100% (284/284), done.
error: invalid path 'Array/LongStrWithoutRepeat.js '
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

This PR fixed this problem. I have removed the trailing spaces via 2 commits.

RAIN WATER SAVING-INTERVIEW QUESTION(FAANG)

AKSHITA has created an elevated roof. She wants to know how much water can she save during rain.

Given n non negative integers representing the elevation map where width of every bar is 1, Find the maximum water that she can save.

Explanation for the Sample input Testcase:
image

Elevation Map
Input Format

First line contains an integer n. Second line contains n space separated integers representing the elevation map.
Constraints

1 <= N <= 10^6
Output Format

Print a single integer containing the maximum unit of waters she can save.
Sample Input

10
0 2 1 3 0 1 2 1 2 1

Sample Output

5

Find HCF

Given N positive numbers, your task is to calculate their HCF.
Input Format

First line of input contains a single integer N, second line contains N space separated positive integers whose HCF is to be computed.
Constraints

N <= 10 and all the numbers lie between 1 and 100.
Output Format

Print HCF of N numbers.
Sample Input

3
2 4 6

Sample Output

2

Add QuickSort

The repository currently does not have a JS implementation of Quick Sort. I would like to work on it if possible. 😄

Hour glass Pattern

Take N as input. For a value of N=5, we wish to draw the following pattern :

                  5 4 3 2 1 0 1 2 3 4 5
                    4 3 2 1 0 1 2 3 4 
                      3 2 1 0 1 2 3 
                        2 1 0 1 2 
                          1 0 1 
                            0 
                          1 0 1 
                        2 1 0 1 2 
                      3 2 1 0 1 2 3 
                    4 3 2 1 0 1 2 3 4 
                  5 4 3 2 1 0 1 2 3 4 5

Input Format

Take N as input.
Constraints

N <= 20
Output Format

Pattern should be printed with a space between every two values.
Sample Input

5

Strings Compression

Take as input S, a string. Write a function that does basic string compression. Print the value returned. E.g. for input “aaabbccds” print out a3b2c2d1s1.
Input Format

A single String S
Constraints

1 < = length of String < = 1000
Output Format

The compressed String.
Sample Input

aaabbccds

Sample Output

a3b2c2d1s1

Explanation

In the given sample test case 'a' is repeated 3 times consecutively, 'b' is repeated twice, 'c' is repeated twice and 'd and 's' occurred only once.

Games - Memory Block

I want to add a simple web based memory block game.
The main logic of the game will be a JavaScript file.
There will be a HTML and CSS file for the UI.

Strings-Remove Duplicates

Take as input S, a string. Write a function that removes all consecutive duplicates. Print the value returned.
Input Format

String
Constraints

A string of length between 1 to 1000
Output Format

String
Sample Input

aabccba

Sample Output

abcba

Explanation

For the given example, "aabccba", Consecutive Occurrence of a is 2, b is 1, and c is 2.

After removing all of the consecutive occurences, the Final ans will be : - "abcba".

Sum without '+'

Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -
Input Format

Input two integers a and b
Constraints

Use of "+" and "-" operators are not allowed
Output Format

Print the sum of a and b
Sample Input

2
-1

Sample Output

1

Explanation

Sum of 2 and -1 is 1

MATRIX SEARCH

STAR THIS REPO!

Given an n x m matrix, where every row and column is sorted in increasing order, and a number x . Find if element x is present in the matrix or not.

Input Format

First line consists of two space separated integers N and M, denoting the number of element in a row and column respectively. Second line of each test case consists of N*M space separated integers denoting the elements in the matrix in row major order. Third line of each test case contains a single integer x, the element to be searched.
Constraints

1 <= N,M <= 30 0 <= A[i] <= 100000

Output Format

Print 1 if the element is present in the matrix, else 0.

Sample Input

3 3
3 30 38
44 52 54
57 60 69

62

Sample Output

0

PULL REQUESTS WILL BE MERGED

PULL REQUESTS WILL BE MERGED

Thankyou so much everyone for contributing in the repository.
As i am the only one to manage the repo so after some simple checks I will surely merge your pull request.
Happy Coding! and contributing to open source.

These contributions are really valuable.

git clone creates empty directory

Hey Akshita,

I recently forked JavaScript repo and when I cloned, the directory was empty. I examined and found that add-license-1 branch contains the code while master is empty. By default we are directed to the master branch.

Kindly check the issue and please resolve asap.

CREATE A HOLLOW RHOMBUS PATTERN

Take N (number of rows), print the following pattern (for N = 5).

 * * * * *
 * *   * *
 *       *
 * *   * *
 * * * * *

Input Format

Constraints

0 < N < 10 (where N is an odd number)

DECIMAL TO OCTAL

Take N (number in decimal format). Write a function that converts it to octal format. Print the value returned.
Input Format

Constraints

0 < N <= 1000000000
Output Format

Sample Input

63

Sample Output

77

LONGEST INCREASING SUBSEQUENCE

Find the length of the longest subsequence in a given array A of integers such that all elements of the subsequence are sorted in strictly ascending order.
Input Format

The first line contains a single integer n.
Next line contains n space separated numbers denoting the elements of the array.
Constraints

0 < n< 105
0 < Ai < 105
Output Format

Print a single line containing a single integer denoting the length of the longest increasing subsequence.
Sample Input

6
50 3 10 7 40 80

Sample Output

4

Explanation

The longest subsequence in test case is - 3,7,40,80

TRIANGLE PATTERN

Take N (number of rows), print the following pattern (for N = 4).

                   1 
                 2 3 2
               3 4 5 4 3
             4 5 6 7 6 5 4

Input Format

Constraints

0 < N < 10

Create Pascal Pattern

Given an integer N, print Pascal Triangle upto N rows.
Input Format

Single integer N.
Constraints

N <= 10
Output Format

Print pascal triangle.
Sample Input

4

Sample Output

   1
 1   1

1 2 1
1 3 3 1

Star This Repo ⭐⭐⭐

Star This Repo ⭐⭐⭐
Please make sure to star this repository before contributing.
YOUR CONTRIBUTIONS TOWARDS OPEN SOURCE DSA ARE VALUABLE⭐
HAPPY CODING!!

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.