Git Product home page Git Product logo

website's Introduction

The Algorithms Official Website


This is a static Next.js site providing a searchable library of all the algorithms in The Algorithms. All the data about the algorithms gets scraped directly from the git repositories.

Translating the website

You can help us translate the TheAlgorithms website using Weblate here. There you can complete the translations for our current languages, or suggest something if you are unsure. Also feel free to add a new language. The current languages are:

Translation status by language

Getting Started

If you haven't installed it yet, install Node.js and yarn. Then, install all the dependencies:

yarn

After that, run the script that fetches all the algorithms from GitHub:

yarn fetch-algorithms

Finally, run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the website.

Alternatively, you can also use the Ready-to-Code Gitpod and easily check how your deployment looks. It will automatically run the commands mentioned above on run.

Contributing

If you want to add a new feature or fix a bug, create a new branch or fork and commit there. Before opening a PR, be sure to

  • Run yarn lint and fix potential errors
  • Run yarn build to check if everything still builds successfully

Open the pull request against main. Vercel will automatically create a preview deployment, and the pull request will be squash merged after being reviewed by a member.

License

The source code of website itself (this repository) is licensed under MIT, while all the licenses for the code and explanations on the website can be found in the respective repositories.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Powered by Vercel

website's People

Contributors

ahmed-abohmaid avatar ahmed0saber avatar ahohnmyc avatar anorprogrammer avatar castilhera avatar darshea avatar dependabot-preview[bot] avatar dependabot[bot] avatar depfu[bot] avatar goudarz avatar hankhsiehtw avatar hatemhosny avatar itkhansunny avatar kunalsin9h avatar maltejur avatar milotype avatar mime8 avatar mkubdev avatar nathanbnm avatar panquesito7 avatar popovstefan avatar raklaptudirm avatar savvasio avatar starohit avatar tachyglossues avatar tndls9304 avatar viktoron avatar weblate avatar yrds avatar zackariyakrh 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

website's Issues

[FEATURE] Customize scrollbar

Description of the feature request

The scroll-bar could be customized for a better overall look of the website.

Add screenshots of the feature request (if applicable)

No response

Additional information/context

No response

[BUG] <Java sorting pages not opting as mention in this issue #142>

Description of the bug

As mentioned in issue #142 (still open so I am contributing). The java sorting GitHub page doesn't open for any sorting algorithm.

Add screenshots of the bug (if applicable)

So the problem is this

  1. Code Implementation Links of java sorting link directs to this URL (I am using a bubble sort link for example)(https://github.com/TheAlgorithms/Java/blob/master/Sorts/BubbleSort.java)
  2. The problem with this link is - it was supposed to be this (https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/sorts/BubbleSort.java)

The lib file is correct

Screenshot (128)

with java baseDir being (baseDir: "src/main/java/com/thealgorithms",)

I think the problem comes from the Java repo itself because πŸ‘‡

Now try to compare both of the like (provided by web and repo link)-

web one -

Screenshot (131)

repo one -

Screenshot (133)

So the only difference it comes down to is this

In the java repo of the sort folder notice how it is written in small letters

Screenshot (127)

as compared to other language repo of the sort folder (again taking the example of scala)

Screenshot (134)

So I think when it searches for java sort folder repo it did not find it because of a short letter that is - (s) in sort folder of java and it gives us an error or 404.

So maybe changing the java sort repo folder name from sort to Sort might work (i didn't read the whole codebase) because maybe it uses children prop.

PS I think for the test we can do that it's not going to affect the website in any way.

Additional information/context

No response

The website sometimes fails on mobile

On mobile, the website is quite slow, and sometimes it just fails and you need to refresh the page.
That happens only on mobile, though. On my PC it works a bit slow but it's acceptable.

Any reasons why that happens?
Thanks.

Ugly Numbers & Fermat Little Theorem

Description of the content report

Like the previous issue I made, I found 2 more Algorithms being the exact same. This time they were about Ugly Numbers (Java implementation & Python+Dart implementation) and Fermat's Little Theorem (Dart implementation & Python Implementation)

Add screenshots of the content report (optional)

No response

Add any other context about the report here

No response

[BUG] <Responsiveness of the website on Galaxy Fold>

Description of the bug

Bug: Responsiveness of the website
Device: Galaxy Fold
Dimensions: 280 x 653

Add screenshots of the bug (optional)

TheAlgorithms.mp4

Add any other context about the problem here

No response

Regex Mismatch for algorithm explanation

Can you explain what this regex expression is supposed to do? This is returning null value for every file due to which code inside the "if" block is not getting executed.

const match = dir.match(/(?:.+)\/(.+)\.md/);

[FEATURE] Translating into Japanese

Description of the feature request

Hi. I'm Shisato Yano from Japan.
I found this project and it looks so great!!

I'd like to suggest to add function translating all sentences into Japanese on your website. I think that a lot of Japanese programmers are interested in this project and it's very useful for them to translate into Japanese.

If above my suggestion is also valuable for you guys, I will try contributing to this project by translating by myself. Is it OK?

Add screenshots of the feature request (if applicable)

No response

Additional information/context

No response

2 Entries for aliquot Sum

Description of the content report

There's 2 entries for Aliquot Sum C# and Python+Ruby+Java

Add screenshots of the content report (optional)

No response

Add any other context about the report here

No response

fibonacci-numbers file not found

Hey
I am new to this repository and just started to set it up on my local machine. I have already installed all the dependencies and fetched all the algorithms, but by booting the server, an error has resulted that the Fibonacci-numbers file is not found.

Screenshot (31)

I couldn't find a connection to a communication channel, so I opened the issue.
It would be nice if anyone can help me resolve this.

Code highlight issue

Codes in languages like Python, Javascript, Dart, Go etc are displayed in proper highlited format but C++ implementations are in black and white mode meaning no code highlighting is there.

Python

python

C++

C++

[BUG] Plausible Analytics not working

Description of the bug

The Plausible Analytics page is not working and displaying an error.
This issue has been for a long time by now. I thought it was fixed. πŸ˜…

Let me know if you need any help in fixing this. :)

Add screenshots of the bug (if applicable)

image

Additional information/context

No response

[BUG] <No module named 'numpy'>

Description of the bug

error occured when run gradient descent algorithm python code on Code Playground

PythonError: Traceback (most recent call last):
  File "/lib/python3.9/site-packages/_pyodide/_base.py", line 415, in eval_code
    CodeRunner(
  File "/lib/python3.9/site-packages/_pyodide/_base.py", line 296, in run
    coroutine = eval(self.code, globals, locals)
  File "", line 5, in 
ModuleNotFoundError: No module named 'numpy'

Add screenshots of the bug (optional)

image

Add any other context about the problem here

No response

Default preview of algorithms in Python

If we search and choose any algorithm the default preview code is of python, if we click on the language icons provided below the code we will be redirect to the specific repository. Wouldn't it be nice if instead of redirecting to the repository just show the code in choosed language in the same way as it was for Python.

[OTHER] Replace all `discord.gg` links with the new link

What would you like to share?

We now have a link to our Discord server using our domain, which is much easier to remember and share.
All discord.gg instances should be replaced with https://the-algorithms.com/discord/.

Additional information/context

This is a good first issue. Please leave it open to beginners or first-time contributors. πŸ™‚

[FEATURE]: Add donation button/widget

It would be nice if we could add a donation button somewhere on the page. People will be able to find it easier now. πŸ™‚

Donate

We can also add a widget of how much money the organization is receiving per week:

Income

What do you think?

Fix bad data

There still are a few of errors in the data fetched from the repositories that need to be fixed.

Some of them need to be fixed in the workflow that creates the DIRECTORY.md file directly in the seperate repositories, some can be fixed by expanding the aliases to also include categories.

Add more Programming Languages to Code Playground

Idea is to add a code playground section in code view frame. Once user clicks on Play button, user should be able to modify a virtual instance of current code and should be able to play around with that code by running the modified code on the very same page. This will create a beautiful learning experince.

  • C (High Priority)
  • C++ (High Priority)
  • Java (High Priority)
  • Python (High Priority)
  • Javascript (High Priority)
  • Rust (Medium Priority)
  • Golang (Medium Priority)
  • MATLAB (Low Priority)
  • Ruby (Low Priority)
  • C# (High Priority)
  • Swift (Medium Priority)
  • Jupyter (Medium Priority)
  • Julia (Low Priority)
  • Kotlin (High Priority)
  • R (Medium Priority)
  • OCaml (Low Priority)
  • Elm (Low Priority)
  • Dart (Medium Priority)
  • Haskell (Medium Priority)
  • Elixir (Low Priority)
  • Clojure (Low Priority)
  • F# (Low Priority)
  • Scala (Low Priority)
  • PHP (Low Priority)
  • AArch-64 Assembly (Low Priority)

Untranslated string

Title for All algorithms on https://the-algorithms.com/hr/all does not translate. The title seems to be hard coded, because other languages have the same problem.

I'm not a programmer, but I think something needs to be changed in the file website/pages/all.tsx, so the translated string in Weblate gets used, just as it does in the website's footer (please see attached screenshots).

 AllAlgorithms

footer

Add Analytics

chetan:

Yes, let's add it. This way atleast we could know how many people are using the website also what all features are most used and focus on them.

I wouldn't use google analytics, but something simpler like plausible which could also be self-hosted.

Add difficulty levels & views for each problem

Description of the feature request

There are a ton of algorithms present on https://the-algorithms.com, but I feel that they aren't presented as well. Don't get me wrong, the site is well made, however I think adding difficulty levels to the algorithms and showing the number of people that have viewed it would add 2 new filters for people to search with and find good algorithms and make it easier to categorize.
I know this site is just for educational purposes only and mostly meant to be used as a tool to find the solution which you need for your problems, however I think that it could also be extended to cater to the people who just want to browse through some algorithms in general, and maybe learn something new. People would be able to compare themselves and their knowledge to others, and improve as a whole, learning from each other. At the present, the site's elegant and highly functional, but it cannot cater to those groups of people as well. Because when you go to, let's say, problems under Math category, I don't exactly find anything new to learn from there (because I only see the names most of the time), neither do I know the level of the stuff in there. Some problems, like Fibonacci ones, are comparatively easy to stuff like Riemann Integration, etc.

The reason I'm also advocating for the addition of views is that, it could also allow people to know about popular topics, which are important to know for everyone. Like some stuff isn't always used by everyone, and can be very niche. Not everyone should be spending their time ignoring other well known topics which are useful to them and spending time to those niche algorithms. So it would help people to basically improve their strengths, rather than being jack of all trades. However I believe views may not be a good factor all the time, since the niche algorithms might get overshadowed. But that's up for debate.

Add screenshots of the feature request (optional)

No response

Add any other context about the feature request here

No response

Mobile Responsive Title Bar issue

I was looking around the website, found that in mobile view the logo of the website comes over the sidebar and it looks kind of weird whereas on the other page it works fine.

Adding a few Screenshot for the refernce :)

Homepage :

Screenshot (282)

Other pages:
Screenshot (283)

Ditch issue templates

What would you like to share?

@Panquesito7 the whole issue templates seem a bit unnecessary to me. All of the fields except What would you like to share? are kinda useless.
Screenshot_20211104_171742
Can we just revert to how the issue templates worked before where they just added tags to the issue?

Additional information

No response

Same problem with 2 different names

Description of the bug

I was just looking for something I could contribute when I found that there is a problem on converting degrees to radians on the website, implemented in Python (can be seen here)
Later when I tried looking for it (to put an implementation in JavaScript) but then I found this, the exact same problem but only implemented in JavaScript, under a slightly different name.

I am not sure how many of such duplicate problems can be found, but I would request:

  1. Checking of problems, so that they are confirmed to be non duplicate
  2. Merge these 2 problems into a single one (like that needs to be done, since that's what the website is for, providing easy access to algorithms fast and efficiently)

Add screenshots of the bug (optional)

No response

Add any other context about the problem here

No response

[BUG] Vercel tests are failing

Description of the bug

It appears all the Vercel tests are failing, which prevents the website from being updated and deployed.

Add screenshots of the bug (if applicable)

No response

Additional information/context

No response

Better Code Preview on Mobile

The current code preview is pretty clunky on mobile, a solution to that could be a second one specifically for mobile.

The current one one mobile:

Screenshot_20211024_000504
Screenshot_20211024_000515
Screenshot_20211024_000524

@Panquesito7 what do you think of the current code view on mobile, is it okay as it is right now or should it be replaced?

Code display Iframe close button issue

Description

There are two buttons on the top right of iframe View on Github and another is Close. Both buttons are disimilar in UI perspective. would not it be nice if we make them a look a bit similar such as that border around Close button is not matching with another button.

button issue

[BUG] Broken links

Description of the bug

Description
Code implementation links of algorithms when opened are giving 404 errors. I observed such behavior for Bubble sort.

Actual behavior

  1. Go to https://the-algorithms.com/algorithm/bubble-sort
  2. Scroll down to Code Implementation links
  3. Click on Java

Actual behavior
4. See Github 404 page (the link is https://github.com/TheAlgorithms/Java/blob/master/Sorts/BubbleSort.java)

Expected behavior
4. Bubble sort page should open (the link is https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/sorts/BubbleSort.java)

Add screenshots of the bug (if applicable)

No response

Additional information/context

Originally reported here TheAlgorithms/Java#2840

[FEATURE] Add commas between the numbers

It would be much easier to read and understand the stars count in the programming languages list. At least for me, it's quite hard to read them, especially if they're over 10k. It's just an idea; it doesn't have to be implemented. πŸ™‚

image

Thank you.

Bring all the folder structures of the repositories to a common standard

It is probably a good idea to bring all the folders in the different repositories to a common standard.

From @ayaankhan98 #60 (comment)

Yes, i think there must be a common standard for all the repositories.
Basically i think there is no need to maintain project type structure in such repositories, because each algorithm is independent of other and also each data structure is independent of other. It would be nice if we sum up one single algorithm in a single file (Implementation + Documentation + Tests). And arrange these files according to their categories. Most of the traffic of these repositories are among those peoples who are completely new to opensource or i would say who are new to computer programming (College undergraduates), our aim is to simplify the learning process by bringing all the generall data structures and algorithims under a single roof of The Algorithms. So, instead of creating a complex project strucutres i think it is better to keep things simple. we are not building any library or framework for algorithms, rather we are just simplifying the learning process.

There are already a lot of repositories with the same or almost the same folder structure (python, C++, C, ...), so we are probably going with a folder structure like in the python repo.

That means, every algorithm is in a single file (including inline documentation and tests) and every repo has the same top level folders (for example divide_and_conquer).

[CONTENT] JavaScript Singly Linked List not listed on website?

Description of the content report

https://the-algorithms.com/algorithm/singly-linked-list on this page the JS solution isn’t available but it’s implemented here https://github.com/TheAlgorithms/Javascript/blob/961f21f97c1ae53d79f90ee82a968d9a0409b968/Data-Structures/Linked-List/SinglyLinkList.js

Add screenshots of the content report (if applicable)

No response

Additional information/context

Meta, I think the description of the content report field should be a text box, because a having a single line for long text makes it hard to scan and modify.

Category strings don't translate on website

Category tags don't translate on website, even though the categories are translated at Weblate! Please see attached screenshots.

Also, some categories are not defined at Weblate, for instance:

  • Machine Learning
  • Neural Network
  • maybe others?

translate01

translate02

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.