Devesh Mehara
5fbf6934f7
added new algo. into : algorithms/java/Maths dir..
...
For a given number N check if it is prime or not. A prime number is a number which is only divisible by 1 and itself.
Example 1:
Input:
N = 5
Output:
1
Explanation:
5 has 2 factors 1 and 5 only.
PR Checklist:
My submission is formatted according to the guidelines in the contributing guide
My addition is on refer on the language README.md file
My addition does not have a spelling problem
My submission has a proper and user-friendly description of the algorithm
My submission has the time complexity of the algorithm
My submission has sample input-output of the program (NOT FOR PYTHON)
What kind of change does this PR introduce? (check at least one)
Bugfix
New algorithm
Optimization in previous algorithms
Code style update
Refactor
Documentation
Other, please describe:
Briefly describe the changes in this PR
code added for longest palindromic substring
2022-10-03 09:57:00 +05:30
Vivi Koutsoumanidou
62907b69ec
chore(Java) : add roman numerals conversion ( #849 )
...
* Add Roman Numerals Conversion
* roman numerals conversion, expanded description
* roman numerals conversion, expanded description
2022-10-01 02:41:58 +05:30
Vishnu Rai
b4cd97f55a
chore(Java) : add ternery search ( #850 )
...
* Add Ternery-search in java
* Updated Ternery Search
Added Time compleities and iterative method of the ternery search.
* Updated Ternery-Search
* Updated Ternery Search
Updated Again.
2022-10-01 02:37:07 +05:30
Devang-Shah-49
b67f5e1786
chore(CPlusPlus): add n-queens backtracking algorithm ( #812 )
...
Co-authored-by: Arsenic <54987647+Arsenic-ATG@users.noreply.github.com>
2022-09-28 18:14:20 -04:00
Adelinked
8072446b24
chore(JavaScript): add max heap ( #842 )
2022-09-24 21:47:06 -04:00
Chris Morin
368ec2e1db
fix (Java): random node of a binary tree link ( #841 )
...
Co-authored-by: Ming Tsai <37890026+ming-tsai@users.noreply.github.com>
2022-09-14 16:48:19 -04:00
Hemant Sharma
eb3d410c09
chore(Java): add left leaf sum binary tree ( #839 )
2022-09-14 16:44:31 -04:00
Ayomide AJAYI
daa8be12a4
enh(Go): import the string package on anagram ( #838 )
2022-09-11 20:44:32 -04:00
Ishantgarg-web
7f85abfa31
chore(Go): add anagram ( #834 )
2022-09-11 15:45:00 -04:00
Ishantgarg-web
a5ae1dc091
chore(Java): add next greater element ( #833 )
...
* chore(Java): added Next Greater Element
* Update Next_Greater_Element.java file
2022-09-11 19:02:36 +05:30
Andrés Martínez
e1bbc8b302
chore(Python): add find all permutations ( #831 )
...
* added find_all_permutations
* added test case for find_all_permutations
* updated README with find all permutations
* Added desc and time complexity of find_all_permutations
* PR comment spelling correction
2022-09-06 23:45:28 +05:30
Ivan Kirspu
033fbe1503
chore(C): add bogo sort algorithm ( #829 )
...
* Add bogo sort algorithm
* Add bogo sort to README.md
* Fix typo
Co-authored-by: Ivan Kirspu <luneyune@users.noreply.github.com>
2022-09-06 18:31:56 +05:00
Mohit Chakraverty
7fabd6432d
chore(Java): add square root using binary search ( #826 )
2022-09-04 20:55:17 -04:00
Ishantgarg-web
7dc2c928f7
chore(Java): add isomorphic strings ( #828 )
...
* chore(Java): added isomorphic strings
* added Time and space complexity
* update algorithms/Java/README.md
* update algorithms/Java/README.md file
* spelling Correct README.md file
2022-09-04 15:08:24 +05:30
Ivan Kirspu
cfc589e55f
chore(C): add shuffle array algorithm ( #827 )
...
Co-authored-by: Ivan Kirspu <luneyune@users.noreply.github.com>
2022-09-03 10:55:52 -04:00
Ashad
170a706b1b
Merge pull request #824 from Prashant-Bhapkar/second-largest-element
...
chore(C): add find second largest element in array
2022-09-01 20:49:29 +05:00
Mohnish Deshpande
88b0e15b52
chore(CPlusPlus): add binary power on maths algorithm ( #810 )
...
Co-authored-by: angshudas <offangshudas123@gmail.com>
Co-authored-by: Mohnish Deshpande <mohnish@pop-os.localdomain>
2022-09-01 11:40:21 -04:00
angshudas
a68c012fea
chore(CPlusPlus): add prim's graph algorithm ( #816 )
...
Co-authored-by: angshudas <offangshudas123@gmail.com>
Co-authored-by: Ming Tsai <37890026+ming-tsai@users.noreply.github.com>
2022-09-01 11:39:18 -04:00
Mohit Chakraverty
3a11c6328b
Merge pull request #818 from ssandra102/add-new-code
...
chore(CPlusPlus): add sparse matrix
2022-09-01 18:12:36 +05:30
Sandra
3a65798024
updated readme
2022-09-01 16:40:53 +05:30
Prashant Bhapkar
c1cc998c6e
Merge branch 'MakeContributions:main' into second-largest-element
2022-08-31 16:38:55 +05:30
Prashant Bhapkar
41ace4231f
Added running time of algorithm and update readme.md file
2022-08-31 16:30:53 +05:30
Mosab Mohamed
788c04c926
Open chore(CPlusPlus): add Floyd Warshall algorithm ( #791 )
2022-08-30 19:31:17 -04:00
Prashant Bhapkar
710d7bfbf6
Find Second largest element in the array
2022-08-29 20:39:31 +05:30
Sandra
b5aaf761e3
add tupple form
2022-08-28 23:12:51 +05:30
Ayomide AJAYI
7d0f490e7b
chore(Go): add selection sort ( #820 )
2022-08-27 13:24:44 -04:00
Sandra
005af5d471
add-new-file
2022-08-25 11:54:32 +05:30
Akashdeep Tickoo
8649eda4b1
docs(Python): add missing space on README ( #809 )
2022-08-20 11:54:06 -04:00
Mohnish Deshpande
f4353ff2a4
enh(CPlusPlus): update comment of binary search ( #807 )
2022-08-20 11:50:26 -04:00
Ming Tsai
d34acc78b0
docs: fix typos
2022-08-20 11:48:26 -04:00
Hridyansh Pareek
1d1a3468e7
chore(Python) : add prime number check ( #802 )
...
* Added Prime Number checker alorithm
* Added Prime Number Checker Algorithm:
* Update prime_number.py
2022-08-18 09:23:20 -04:00
Mohit Chakraverty
6e39b2bc60
enh(Java): binary search ( #800 )
...
* add Cycle-Sort.md
* corrected documentation
* add Cycle-Sort.md
* Fixed the broken link
* Added the file index for Cycle-Sort
* Fixed typo
* created new file for iterative binary search
* created binary-search.java
2022-08-17 11:20:07 -04:00
Hridyansh Pareek
6f19b452ea
chore(Python) : add GCD using recursion following Euclid's Algorithm ( #797 )
2022-08-15 10:03:38 -04:00
brugner
ac970481a9
chore(CSharp): add quick sort ( #798 )
2022-08-12 08:39:22 -04:00
Ashad
e42f4bb0b1
chore(CPlusPlus): add reverse number algorithm ( #789 )
...
Co-authored-by: Arsenic <54987647+Arsenic-ATG@users.noreply.github.com>
2022-08-11 14:52:36 -04:00
Leong Teng Man
cef837425c
chore(C): add fibonacci algorithm ( #794 )
2022-08-10 17:18:21 -04:00
Rusu Emanuel
5d703d8170
chore(C): add sieve-of-eratosthenes ( #778 )
2022-08-02 15:38:49 -04:00
Rakshit Gondwal
bfcae851a0
enh(Java): add comments for binary search ( #776 )
...
Improved the code by adding the explanation of using (l + (r - l)) rather than using (l - r) while searching for the mid element.
2022-07-19 19:11:47 -04:00
Rakshit Gondwal
7985059f7d
enh(CPlusPlus): add binary search ( #777 )
...
Improved the code by adding the explanation of using (l + (r - l)) rather than using (l - r) while searching for the mid element.
2022-07-19 19:09:09 -04:00
PrathameshSahasrabuddhe
4add09632e
chore(Python): add depth first search ( #775 )
...
* Added depth first search algorithm in Python and updated README.md
* Added output example in Depth First Search algorithm
* bug fixes
* Fixed spelling mistake on line 1 (alorithm-> algorithm)
* Moved the file from recursion folder to graphs folder and updated README.md
Co-authored-by: Prathamesh Sahasrabuddhe <prathamesh16020@gmail.com>
2022-07-15 08:46:44 -04:00
Anika Kamath
c780f5a641
chore(Python): add sum of n numbers using recursion ( #770 )
2022-07-09 11:31:28 -04:00
Ankit Gupta
bacaa04f5a
fix(CPlusPlus): number system links ( #762 )
...
Co-authored-by: en1gm479 <spydergup@gmail.com>
2022-06-05 14:00:06 -04:00
Nibedita Chakraborty
2152f16a71
chore(Python): add Breadth First Search for a graph ( #760 )
2022-05-29 10:07:46 -04:00
Ankit Gururani
25e68800e4
docs(CSharp): grammar enhancement ( #757 )
2022-05-10 18:26:33 -04:00
Valerio Cipolla
0cc7c94675
chore(Javascript): add factorial recursion ( #756 )
2022-05-06 09:01:10 -04:00
Valerio Cipolla
6a64805e36
chore(Javascript): add fibonacci series ( #752 )
...
* Add fibonacci series for javascript
* Added doc in js readme for fibonacci series
* Add user-friendly description of algorithm in comments
* fix change fibs to series
* fix output spelling
* add time complexity
2022-04-30 12:38:43 -04:00
Matt
09b5568315
chore(CSharp): add character limit ( #740 )
...
Co-authored-by: Ming Tsai <37890026+ming-tsai@users.noreply.github.com>
2022-04-21 09:38:29 -04:00
Ghada AbdulWahab
76d3bf22aa
chore(Python): add breath-first search ( #738 )
...
Co-authored-by: Arsenic <54987647+Arsenic-ATG@users.noreply.github.com>
2022-04-20 09:37:34 -04:00
Ghada AbdulWahab
bc0569ad09
chore(Python): add uniform cost search ( #723 )
...
Co-authored-by: Ming Tsai <37890026+ming-tsai@users.noreply.github.com>
2022-04-16 14:08:02 -04:00
sam chan
dd601a7734
chore(Python): add dutch national flag algo ( #720 )
2022-04-11 09:38:45 -04:00