Commit Graph

27 Commits

Author SHA1 Message Date
phunghocong
73e5711b73 Quick_sort_in sorting (#224)
* Update 01_dijkstras_algorithm.go

* Create Test_report.binary_quick_sort.cpp.docx

* 1

fix

* fix it better
2022-11-18 16:52:21 -06:00
Paolo Grisoli
5d9ae511d5 Add examples for Zig language (#242)
* add zig examples

* improved zig binary search

This commit improves the binary search code in zig. The function has
been made generic and the logic has been cleaned up a bit.
The code has been updated to work with zig versions >= 0.9

* simplify zig selection sort

This commit simplifies the logic of the zig selection sort. It now swaps
in place the elements of the array instead of creating another array.
This avoids allocating heap memory.
The code has also been upgraded to zig version 0.9.1

* make zig recursion examples generic

This commit modifies the zig examples for the recursion chapter to be
generic. It also updates the code to zig version 0.9.1

* update chapter 4 examples

This commit updates the zig examples in chapter 4. In particular
examples have been made generic where possible. The code has been
updated to zig version 0.9.1

* update zig hash table examples

This commit updates the examples for the chapter 5 about hash tables.
Some improvements have been done (using a set instead of a map). The
code has been updated to zig version 0.9.1

* update breadth first search zig example

This commit updates the zig example for the breadth first search
algorithm. It adds a unit test and updates the code to zig version 0.9.1

* revamp zig dijkstra example

* add comments in dijkstra zig

* fix zig greedy algorithm

* add test for zig dijkstra

* add test for zig greedy algorithm

* improve zig chapter 9 exercise

This commit improves the zig exercise to comput the longest common
subsequence.
A main function has been added and the allocator code has been extracted
from the `subsequence` function.
2022-11-18 16:36:32 -06:00
Jinguang
f03841e79a Description:[fix] fixed the C++ compile error for std::find (#241)
Bug: NA
Test: 1.  add "#include <algorithm>" on fisrt line of the file
      2.  It could be normally compiler, or it will report compile error
2022-11-18 16:35:04 -06:00
Vasilii Boldurean
38f962f2a3 Fix: dijkstras example for JavaScript ES6. (#205) 2022-11-18 15:28:46 -06:00
Aditya Bhargava
35bb758f5e Delete 07_dijkstras_algorithm/golang directory
deleting to stop case insensitive issue on Mac
2022-11-18 14:53:39 -06:00
Aditya Bhargava
e4a909e94d Merge pull request #159 from fhl43211/master
Please consider adding 01_dijkstras_algorithm in C++ 11
2020-09-14 10:54:09 -05:00
Aditya Bhargava
b2867050d7 Merge pull request #139 from Alexandrshy/issues-138-formatting-problems-and-example-for-dijkstras-algorithm
Fixed formatting problems, added JSDoc
2020-09-14 10:47:56 -05:00
fhl43211
e6558351a8 Use lambda function 2020-02-21 09:06:58 -08:00
fhl43211
4fd96f6987 Create cpp file 2020-02-20 17:23:54 -08:00
Massoud Afrashteh
9dc7611411 Julia samples (#108)
* Add julialang binary search sample

* Add unit test

* Add julialang selection sort sample

* Change julia suffix to jl

* Add recursion and quick sort with tests

* add quick sort

* Add hash table samples

* Add BFS

* Changed file names

* Add dijkstras

* Add Dijkstras test
2019-11-12 09:19:21 -06:00
Evgeny Samsonov
3a50470e3d Add dijkstras algorithm in golang (#118)
* Golang dijkstra algorithm

* New line in end of file
2019-11-12 09:18:00 -06:00
Candido Sales Gomes
591111e596 add dijkstra to golang (#149) 2019-10-30 16:29:20 -05:00
Alexandrshy
2216e23b6b Fixed formatting problems, added JSDoc 2019-07-25 08:53:03 +04:00
Oleg A. Glushko
06ee65d9e5 Please, merge my PowerShell examples for all chapters (#106)
* PowerShell 01_introduction_to_algorithms example

* PowerShell 02_selection_sort example

* PowerShell 03_recursion examples

* PowerShell 04_quicksort examples

* PowerShell 05_hash_tables examples

* PowerShell 06_breadth-first_search example

* PowerShell 07_dijkstras_algorithm example

* PowerShell 08_greedy_algorithms example

* Powershell 09_dynamic_programming example
2019-03-28 14:49:20 -07:00
Alexander Berezhnoy
be4a420dd5 add lost semicolons (#89) 2018-10-18 08:26:39 -07:00
Ramit Mittal
2ab2e9c181 changed python2 print statements to python3 in 07_dijkstras_algorithm (#82)
* Resolve Issue #40: Changed more examples to use python3 syntax

* corrected selection sort python

* 07 dijkstras changed python2 print statement
2018-08-24 11:20:10 -07:00
Evgeny Garlukovich
434fb6212f Add Elixir example for Dijkstra's algorithm 2018-04-20 08:18:52 -07:00
miholeus
c7c8827628 php dijkstras algorithm (#60) 2018-03-19 09:51:31 -07:00
Bijoy Thomas
542f4ab0a0 Added Haskell example for Dijkstras algorithm (#18)
* Adding binary search example for Haskell

* Adding selection sort example in Haskell

* Adding Haskell examples for chapter 3

* Adding examples for chapter 4

* Adding examples for chapter 5

* Adding git ignore

* Add Haskell example for BFS

* resetting

* Adding haskell example for dijkstras algorithm

* Adding Haskell example for chapter 8

* Adding power set based solution for set covering problem

* Adding Haskell examples for chap 9
2017-11-13 08:16:12 -08:00
zhangjiongwx
d0ac45bcde Add Lua code for chapter 6-9 (#36)
* Add Lua code for chapter 6

* Add Lua code for chapter 7

* Add Lua code for chapter 8

* Add Lua code for chapter 9
2017-11-13 08:14:24 -08:00
Yossi Adler
ec2890a93d Add ES6 Examples to all chapters (#38)
* add ES6 example for binary search

* add ES6 example for selection sort

* add ES6 example for countdown

* add ES6 example for greet

* add ES6 example for factorial

* edit ES6 example for quicksort

* add ES6 example for loop sum

* add ES6 example for recursive sum

* add ES6 example for recursive count

* add ES6 example for recursive max

* add ES6 example for price of groceries

* add ES6 example for check voter

* add ES6 example for breadth-first search

* add ES6 example for dijkstras algorithm

* edit ES6 example for dijkstras algorithm

* edit ES6 example for set covering

* add ES6 example for longest common subsequence
2017-11-13 08:12:59 -08:00
Oleh Novikov
4631b7a156 add examples in java 8 (#12)
* code for chapters 3-9 in Java

* code for chapters 1 in Java

* code for chapter 2 in Java

* missing CheckVoter for chapter 5 in Java

* add missing sample output for SetCovering as a comment
2017-03-20 09:06:45 -07:00
Anthony Marchenko
12265a8c61 Add examples on Swift 3.0.2 (#11)
* 01_binary_search Swift 3.0.2

* 01_binary_search Swift 3.0.2

* add Chapter 2 - 01_selection_sort Swift 3.0.2 example

* 01_binary_search cosmetic note updates Swift 3.0.2

* 03_recursion Swift 3.0.2 examples

* 04_quicksort Swift 3.0.2 examples

* fix typo on quicksort example. Swift 3.0.2

* add  05_hash_tables examples on Swift 3.0.2

* add 01_breadth-first_search Swift 3.0.2 example

* 01_breadth-first_search fixing typo Swift 3.0.2

* add 01_dijkstras_algorithm on Swift 3.0.2

* add 08_greedy_algorithms Swift 3.0.2 example

* 01_longest_common_subsequence Swift 3.0.2 example
2017-03-15 16:05:38 -07:00
Jim Vaughan
62ed616954 add csharp examples (#10) 2016-11-07 13:43:30 -08:00
Kevin Nguyen
d41a255b64 code for chapter 7 in javascript 2016-06-21 21:52:26 -07:00
Leon Rische
738f9cac22 code for chapter 7 in ruby 2016-03-03 16:07:24 +01:00
Aditya Bhargava
bc5cccb85d code for chapter 7 2016-03-02 15:01:47 -08:00