javascript-algorithms icon indicating copy to clipboard operation
javascript-algorithms copied to clipboard

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

Results 281 javascript-algorithms issues
Sort by recently updated
recently updated
newest added

Could we have just one way of doing the swapping to have better consistency across the code

[{"_id":"62e716c020254a0ab074df18","body":"The former makes use of ES6 destructuring whilst the latter does not. I think the question is whether ES6 is recommended in this project","issue_id":1659297582677,"origin_id":483272519,"user_origin_id":49646896,"create_time":1555338166,"update_time":1555338166,"id":1659311808773,"updated_at":"2022-07-31T23:56:48.772000Z","created_at":"2022-07-31T23:56:48.772000Z"},{"_id":"62e716c020254a0ab074df1a","body":"I feel that this project is trying to use modern language standards. I support the use of ES6 destructuring.","issue_id":1659297582677,"origin_id":504645611,"user_origin_id":12058428,"create_time":1561193393,"update_time":1561193393,"id":1659311808776,"updated_at":"2022-07-31T23:56:48.776000Z","created_at":"2022-07-31T23:56:48.776000Z"},{"_id":"62e716c020254a0ab074df1c","body":"Hi, we are four students working on this issue as part of a course in software development.","issue_id":1659297582677,"origin_id":1060511629,"user_origin_id":3149300,"create_time":1646650581,"update_time":1646650581,"id":1659311808779,"updated_at":"2022-07-31T23:56:48.779000Z","created_at":"2022-07-31T23:56:48.779000Z"}] comment

Like how we have here https://github.com/trekhleb/javascript-algorithms/blob/master/src/algorithms/sorting/bubble-sort/BubbleSort.js#L22 instead of https://github.com/trekhleb/javascript-algorithms/blob/master/src/algorithms/sorting/shell-sort/ShellSort.js#L24

enhancement

Closes #314

Add MiniMax

[{"_id":"62e716c120254a0ab074df1e","body":"Hey, @Kachhadiyn Can you provide more description about problem??","issue_id":1659297582685,"origin_id":721816974,"user_origin_id":30151850,"create_time":1604505483,"update_time":1604505483,"id":1659311809127,"updated_at":"2022-07-31T23:56:49.126000Z","created_at":"2022-07-31T23:56:49.126000Z"},{"_id":"62e716c120254a0ab074df21","body":"I think @Kachhadiyn means the Tic Tac Toe algorithm.","issue_id":1659297582685,"origin_id":744697404,"user_origin_id":22855929,"create_time":1607978435,"update_time":1607978435,"id":1659311809131,"updated_at":"2022-07-31T23:56:49.130000Z","created_at":"2022-07-31T23:56:49.130000Z"},{"_id":"62e716c120254a0ab074df23","body":"I've never seen it called Tic Tac Toe algorithm. https:\/\/en.wikipedia.org\/wiki\/Minimax","issue_id":1659297582685,"origin_id":744756516,"user_origin_id":7661457,"create_time":1607985587,"update_time":1607985587,"id":1659311809134,"updated_at":"2022-07-31T23:56:49.134000Z","created_at":"2022-07-31T23:56:49.134000Z"},{"_id":"62e716c120254a0ab074df24","body":"Let me say it another way then: the algorithm used in Tic Tac Toe.\r\nhttps:\/\/www.geeksforgeeks.org\/minimax-algorithm-in-game-theory-set-3-tic-tac-toe-ai-finding-optimal-move\/","issue_id":1659297582685,"origin_id":745103563,"user_origin_id":22855929,"create_time":1608016573,"update_time":1608038915,"id":1659311809137,"updated_at":"2022-07-31T23:56:49.136000Z","created_at":"2022-07-31T23:56:49.136000Z"},{"_id":"62e716c120254a0ab074df25","body":"Sure, _this specific article you found online_ uses a game of Tic Tac Toe as an example game for the Minimax. Apart from Minimax being a basic algorithm from game theory and Tic Tac Toe being a basic example of a well-known two-player game, there's no link between two algorithms, neither historically (that I'm aware of) nor conceptually. \u201cThe algorithm used in Tic Tac Toe\u201d sounds as if the game of Tic Tac Toe (i.e. its ruleset) is somehow tied to the Minimax algorithm, which is not the case.","issue_id":1659297582685,"origin_id":745423240,"user_origin_id":7661457,"create_time":1608051317,"update_time":1608051317,"id":1659311809139,"updated_at":"2022-07-31T23:56:49.138000Z","created_at":"2022-07-31T23:56:49.138000Z"},{"_id":"62e716c120254a0ab074df27","body":"Hi, we are four students working on this issue as part of a course in software development.","issue_id":1659297582685,"origin_id":1059435921,"user_origin_id":4411767,"create_time":1646420566,"update_time":1646420566,"id":1659311809142,"updated_at":"2022-07-31T23:56:49.141000Z","created_at":"2022-07-31T23:56:49.141000Z"}] comment

Add Markov Chain or Markov Process algorithm

[{"_id":"6370ceccb928086c8172c7c9","body":"This sounds interesting, can I be assigned this?","issue_id":1659297582693,"origin_id":1207493513,"user_origin_id":65878619,"create_time":1659909911,"update_time":1659909911,"id":1668337356889,"updated_at":"2022-11-13T11:02:36.889000Z","created_at":"2022-11-13T11:02:36.889000Z"}] comment

Wikipedia: https://en.wikipedia.org/wiki/Markov_chain Implementations: * Random pronounceable words generator Example in coffee-script (8 years old) here: https://github.com/SyntaxColoring/Markov-Word-Generator/tree/Markov.coffee * Random sentence generator Example in ruby/python (7 years old) here: https://github.com/hrs/markov-sentence-generator

A* algorithm?

[{"_id":"62e716f93f02dc4dab2ad1b2","body":"Hi @marcofugaro \r\n\r\nThank you for suggestion!\r\n\r\nYes let's have it as an issue here and I will treat it as item from requested algorithms queue. I've created a label for that. So once I'll have a chance I'll implement it (or may be any other developer will volunteer)","issue_id":1659297582696,"origin_id":391718499,"user_origin_id":3000285,"create_time":1527169223,"update_time":1527169223,"id":1659311865943,"updated_at":"2022-07-31T23:57:45.943000Z","created_at":"2022-07-31T23:57:45.943000Z"},{"_id":"62e716f93f02dc4dab2ad1b4","body":"Hello @trekhleb \r\n\r\nI willing to contribute the project, so I would like to take this problem. As a newcomer I don't know how much time I have to complete the task so I will like to know.\r\n \r\nThank you.","issue_id":1659297582696,"origin_id":391884286,"user_origin_id":20746972,"create_time":1527200552,"update_time":1527200552,"id":1659311865947,"updated_at":"2022-07-31T23:57:45.947000Z","created_at":"2022-07-31T23:57:45.947000Z"},{"_id":"62e716f93f02dc4dab2ad1b6","body":"@dani4453 great! It would be nice to have your contribution!","issue_id":1659297582696,"origin_id":391929667,"user_origin_id":3000285,"create_time":1527218372,"update_time":1527218372,"id":1659311865951,"updated_at":"2022-07-31T23:57:45.950000Z","created_at":"2022-07-31T23:57:45.950000Z"},{"_id":"62e716f93f02dc4dab2ad1b7","body":"I have a A* algorithm in my https:\/\/github.com\/amatiasq\/pathfinding repo, but I'm not an expert. I can clean it up for this.","issue_id":1659297582696,"origin_id":392250824,"user_origin_id":1533589,"create_time":1527328546,"update_time":1528201991,"id":1659311865953,"updated_at":"2022-07-31T23:57:45.953000Z","created_at":"2022-07-31T23:57:45.953000Z"},{"_id":"62e716f93f02dc4dab2ad1ba","body":"Hi. I'm on my phone so I can't do a pull request, but I recently implemented A*, feel free to copy it... https:\/\/github.com\/thwee-alchemist\/A_Star","issue_id":1659297582696,"origin_id":394125814,"user_origin_id":16966787,"create_time":1527984879,"update_time":1527984879,"id":1659311865958,"updated_at":"2022-07-31T23:57:45.957000Z","created_at":"2022-07-31T23:57:45.957000Z"},{"_id":"62e716f93f02dc4dab2ad1bd","body":"What about the pathfinding algorithms and also optimised data structures from: https:\/\/github.com\/anvaka\/ngraph.path ?\r\n\r\nIt seemed really interesting project to me, both from algorithms for pathfinding and also modified data structures for performance in JS.\r\n\r\n@anvaka what are your thoughts?","issue_id":1659297582696,"origin_id":394686937,"user_origin_id":7586051,"create_time":1528200936,"update_time":1528200936,"id":1659311865961,"updated_at":"2022-07-31T23:57:45.961000Z","created_at":"2022-07-31T23:57:45.961000Z"},{"_id":"62e716f93f02dc4dab2ad1c0","body":"Hello @trekhleb \r\n\r\nI want to contribute to this repo. I have implemented few path finding algorithms like dijkstra algorithm,A* and etc.\r\nbut i have noticed so much activity that's why asking before creating pull request.","issue_id":1659297582696,"origin_id":660497936,"user_origin_id":40126673,"create_time":1595085570,"update_time":1595085570,"id":1659311865965,"updated_at":"2022-07-31T23:57:45.964000Z","created_at":"2022-07-31T23:57:45.964000Z"},{"_id":"62e716f93f02dc4dab2ad1c2","body":"@trekhleb I can provide my implementation of IDA* (assume the answer to the following question is be \"No\")\r\n\r\n> What about the pathfinding algorithms and also optimised data structures from: https:\/\/github.com\/anvaka\/ngraph.path ?\r\n\r\n@Martin-Pitt Look nice! Does it include IDA\\*? So I don't need to implement it again, lol.\r\n\r\n\r\nby a random person who was fascinated by iterative deepening A\\* path finding algo.(100+hours spent)","issue_id":1659297582696,"origin_id":1046223274,"user_origin_id":24765272,"create_time":1645358858,"update_time":1645358996,"id":1659311865968,"updated_at":"2022-07-31T23:57:45.968000Z","created_at":"2022-07-31T23:57:45.968000Z"}] comment

Hey! This repo is awesome! Nice job! While I was reading through the algorithms, I found weird that the [A* algorithm](https://en.m.wikipedia.org/wiki/A*_search_algorithm) was missing, which is one of the few I...

enhancement

npm该更新了 它老了呀

[{"_id":"62e716fa3f02dc4dab2ad1c4","body":"\u7b97\u6cd5\u6703\u8001\u55ce\uff1f","issue_id":1659297582700,"origin_id":1046222668,"user_origin_id":24765272,"create_time":1645358671,"update_time":1645358671,"id":1659311866726,"updated_at":"2022-07-31T23:57:46.725000Z","created_at":"2022-07-31T23:57:46.725000Z"},{"_id":"6370cf28a63f0c535f611208","body":"\u601d\u60f3\u6c38\u4e0d\u8fc7\u65f6","issue_id":1659297582700,"origin_id":1306750290,"user_origin_id":25098471,"create_time":1667892531,"update_time":1667892531,"id":1668337448476,"updated_at":"2022-11-13T11:04:08.475000Z","created_at":"2022-11-13T11:04:08.475000Z"}] comment

Algorithms

[{"_id":"6370d4d4a63f0c535f6114fa","body":"Can you lend more details to help further figure out what needs to be done?","issue_id":1659297582704,"origin_id":1233704109,"user_origin_id":62739843,"create_time":1662004340,"update_time":1662004340,"id":1668338900268,"updated_at":"2022-11-13T11:28:20.267000Z","created_at":"2022-11-13T11:28:20.267000Z"},{"_id":"6370d4d4a63f0c535f6114fb","body":"I think its can be closed!","issue_id":1659297582704,"origin_id":1241354012,"user_origin_id":25290972,"create_time":1662682119,"update_time":1662682119,"id":1668338900271,"updated_at":"2022-11-13T11:28:20.271000Z","created_at":"2022-11-13T11:28:20.271000Z"}] comment

Project_bases for AIA

[String.prototype.substr()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) is deprecated so we replace it with [String.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) which works similarily but isn't deprecated. .substr() probably isn't going away anytime soon but the change is trivial so it doesn't...

Data structures

[{"_id":"62e716fb3f02dc4dab2ad1c6","body":"unwanted issue\r\n","issue_id":1659297582710,"origin_id":1044051977,"user_origin_id":73638623,"create_time":1645168988,"update_time":1645168988,"id":1659311867025,"updated_at":"2022-07-31T23:57:47.024000Z","created_at":"2022-07-31T23:57:47.024000Z"},{"_id":"659465cd5799de9564123c46","body":"> wanted issue\r\n\r\nyes saw the same","issue_id":1659297582710,"origin_id":1410508434,"user_origin_id":124065953,"create_time":1675176860,"update_time":1675176860,"id":1704224205009,"updated_at":"2024-01-02T19:36:45.009000Z","created_at":"2024-01-02T19:36:45.009000Z"},{"_id":"659465cd5799de9564123c47","body":" I am new to open source, I want to take up the issue can you please guide me a bit. Can you please assign me to this task","issue_id":1659297582710,"origin_id":1415800578,"user_origin_id":69814563,"create_time":1675426941,"update_time":1675426941,"id":1704224205014,"updated_at":"2024-01-02T19:36:45.014000Z","created_at":"2024-01-02T19:36:45.014000Z"}] comment