Skip to content

Codenervemerge #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 87 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
e0fdccc
Merge pull request #34 from ifenil/master
Pradyuman7 Oct 5, 2020
6dac29c
Fix file structure and some codes
Pradyuman7 Oct 5, 2020
119888d
Merge pull request #35 from CodeNerve/Fix-structure-and-codes
Pradyuman7 Oct 5, 2020
9df12ee
Add contributing rules
Pradyuman7 Oct 5, 2020
e6a734f
Merge pull request #36 from CodeNerve/Contributing-rules
Pradyuman7 Oct 5, 2020
74e81a9
Add random interview questions with Top K frequent elements question
Pradyuman7 Oct 5, 2020
8ed76e0
Add random interview questions with Top K frequent elements question
Pradyuman7 Oct 5, 2020
349771d
Merge pull request #37 from CodeNerve/Add-random-interview-questions
Pradyuman7 Oct 5, 2020
33659f9
Update CalculatePi.java
getmyfile Oct 5, 2020
48bd827
Create LSB_encode.java
getmyfile Oct 6, 2020
e08ac75
Create LSB_decode.java
getmyfile Oct 6, 2020
471c73c
Create README.md
getmyfile Oct 6, 2020
8193951
Merge pull request #39 from getmyfile/master
Pradyuman7 Oct 7, 2020
55dd346
Create EOEO.java
Priyankarajput1 Oct 7, 2020
7c65f94
Merge pull request #40 from Priyankarajput1/patch-1
Pradyuman7 Oct 9, 2020
575b331
Create RemoveElement.java
mKittyD Oct 9, 2020
583b209
Merge pull request #41 from mKittyD/patch-1
Pradyuman7 Oct 9, 2020
6ad7ec8
Create MaxConsecutiveOnes.java
mKittyD Oct 9, 2020
5296c7a
Create MergeSort.java
mKittyD Oct 9, 2020
51b9730
Create DPEfficient.java
mKittyD Oct 9, 2020
ba9e2e6
Merge pull request #43 from mKittyD/patch-1
Pradyuman7 Oct 9, 2020
101688d
Merge pull request #42 from mKittyD/master
Pradyuman7 Oct 9, 2020
038fedb
Create FibonacciNumber.java
mKittyD Oct 9, 2020
245964a
Update README.md
mKittyD Oct 9, 2020
84d40d6
Update README.md
mKittyD Oct 9, 2020
2794895
Merge pull request #44 from mKittyD/master
Pradyuman7 Oct 9, 2020
61f94ee
Stack implementation using exception handling in java
chinmaychahar Oct 9, 2020
92275a6
initial maven project setup
fazreil Oct 9, 2020
47d6ad5
added AddFibonacciNumbers module
fazreil Oct 9, 2020
8a304cd
added Armstrong-Number module
fazreil Oct 10, 2020
e6177ac
convert Calculate Pi into maven module
fazreil Oct 10, 2020
ac1132a
convert Dynamic Programming into maven module
fazreil Oct 10, 2020
0d70dd4
convert FindMinimumInRotatedSortedArray into maven module
fazreil Oct 10, 2020
0539b11
convert FindPrime into maven modeule
fazreil Oct 10, 2020
f5bafb4
convert Matrix Operations into maven module
fazreil Oct 10, 2020
9cd2152
convert OTPGenerator into maven module
fazreil Oct 10, 2020
4ec7883
convert Palindrome Checking into maven module
fazreil Oct 10, 2020
fbd4ffc
convert PassGenerator into maven module
fazreil Oct 10, 2020
20c9a2c
convert PasswordGeneratorInJava into maven module
fazreil Oct 10, 2020
82a50bf
rename PasswordGeneratorInJava to PasswordValidationInJava to follow …
fazreil Oct 10, 2020
58932db
rename PasswordValidationInJava project.name in pom
fazreil Oct 10, 2020
a6f3ff0
convert Permutation Of String into maven module
fazreil Oct 10, 2020
a551de2
convert Simple DES Encryption Algorithm into maven module
fazreil Oct 10, 2020
0a3bb5b
convert Snake Game Applet into maven module
fazreil Oct 10, 2020
bb39412
convert Sorting Algorithms into maven module
fazreil Oct 10, 2020
f3f6731
convert Towers Of Hanoi into maven module
fazreil Oct 10, 2020
1405350
algorith for pangram sentences
Oct 10, 2020
9a08988
convert Tree into maven module
fazreil Oct 10, 2020
a940fe8
convert admission and ArrSort into maven module, fixed Tower of Hanoi…
fazreil Oct 10, 2020
004fea5
refactor tree to make it compilable
fazreil Oct 10, 2020
a5a9fb2
convert FANCY standalone into maven module
fazreil Oct 10, 2020
c10a764
convert KickStart2019 into maven module
fazreil Oct 10, 2020
f739d9f
convert NoMatcher into maven module
fazreil Oct 10, 2020
d522f53
add eclipse ide files into .gitignore
fazreil Oct 10, 2020
4cf304b
refactor to add public classes into AddFibonacciNumbers
fazreil Oct 10, 2020
9c8703b
refactor to add public classes into Armstrong-Number
fazreil Oct 10, 2020
7377083
refactor to add public classes into ArmstrongNumber
fazreil Oct 10, 2020
33f5d45
refactor to add public classes into Palindrome
fazreil Oct 10, 2020
c923f80
refactor to add public classes into BubbleSort
fazreil Oct 10, 2020
e0cb11b
refactor to add public classes into admission
fazreil Oct 10, 2020
daf872e
refactor to add public classes into Codechef, renamed from FANCY to a…
fazreil Oct 10, 2020
638d823
refactor to add public classes into Solution
fazreil Oct 10, 2020
89a9e36
refactor to add public classes into NoMatcher
fazreil Oct 10, 2020
b06e14b
add javadoc generation for the whole project
fazreil Oct 10, 2020
c917976
add profile for install to clean-instal, and profile doc to generate …
fazreil Oct 10, 2020
2b47325
convert Zomcav into maven module
fazreil Oct 10, 2020
8c5b11d
update README with instruction to compile and document using Apache M…
fazreil Oct 10, 2020
1f678a2
Merge pull request #1 from fazreil/maven
fazreil Oct 10, 2020
69f452e
github action for maven build and doc workflow
fazreil Oct 10, 2020
8973d4a
add ArrSort module, it was missed out earlier
fazreil Oct 10, 2020
fb87493
remove directory for archive and let it use default
fazreil Oct 10, 2020
eb1942e
Merge branch 'maven' into master
fazreil Oct 10, 2020
3a0f24a
change maven goal to doc
fazreil Oct 10, 2020
88c6170
change to just archive site directory
fazreil Oct 10, 2020
9ef5452
upload site archive into github actions
fazreil Oct 10, 2020
889a7c0
Merge pull request #46 from Acentari/master
Pradyuman7 Oct 11, 2020
f8fd95c
Merge pull request #45 from chinmaychahar/new-user
Pradyuman7 Oct 11, 2020
8973b73
merge with codenerve master
fazreil Oct 11, 2020
c5dfe8b
declare Map and HashMap for class DPEfficient.java
fazreil Oct 11, 2020
c731399
declare class as public and rename classname to reflect filename, for…
fazreil Oct 11, 2020
3913337
fix syntax errors
fazreil Oct 11, 2020
8ce7700
fix package name so it won't have duplicate Node class
fazreil Oct 11, 2020
428485c
merge more modules into new and existing modules
fazreil Oct 11, 2020
d0bee51
Merge remote-tracking branch 'codenerve/master' into codenervemerge
fazreil Oct 11, 2020
ee11210
convert Stacks into maven module
fazreil Oct 11, 2020
d83e41e
convert Pangram into maven module
fazreil Oct 11, 2020
8de825d
fix conflict with MkittyD
fazreil Oct 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -P doc
- name: Zip Release
# You may pin to the exact commit or the version.
# uses: TheDoctor0/zip-release@a1afcab9c664c9976ac398fa831eac67bed1eb0e
uses: TheDoctor0/[email protected]
with:
# Filename for archive
filename: site.zip
# Base path for archive files
path: target/staging
- uses: actions/upload-artifact@v2
with:
name: Artifact upload
path: site.zip
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
target
*/.classpath
*/.project
*/.settings
.settings
.project
.classpath
31 changes: 0 additions & 31 deletions Add Fibonacci numbers/BruteForce.java

This file was deleted.

50 changes: 0 additions & 50 deletions Add Fibonacci numbers/Efficient.java

This file was deleted.

19 changes: 19 additions & 0 deletions AddFibonacciNumbers/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.let.us.java</groupId>
<artifactId>LetUsJava</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<groupId>com.let.us.java</groupId>
<artifactId>AddFibonacciNumbers</artifactId>
<packaging>jar</packaging>

<name>Add Fibonacci Numbers</name>

</project>
31 changes: 31 additions & 0 deletions AddFibonacciNumbers/src/main/java/BruteForce.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import java.io.*;

public class BruteForce {


static int calculateSum(int n) {
if (n <= 0)
return 0;

int fibo[]=new int[n+1];
fibo[0] = 0; fibo[1] = 1;

// Initialize result
int sum = fibo[0] + fibo[1];

// Add remaining terms
for (int i=2; i<=n; i++)
{
fibo[i] = fibo[i-1]+fibo[i-2];
sum += fibo[i];
}

return sum;
}

public static void main(String args[]) {
int n = 4;
System.out.println("Sum of Fibonacci" +
" numbers is : "+ calculateSum(n));
}
}
20 changes: 20 additions & 0 deletions AddFibonacciNumbers/src/main/java/DPEfficient.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import java.util.HashMap;
import java.util.Map;

public class DPEfficient {
Map<Integer,Integer> map = new HashMap<>();

public int fib(int n) {
if(n <= 0) {
return 0;
} else if(n == 1 || n == 2) {
return 1;
} else if(map.containsKey(n)){
return map.get(n);
} else {
int answer = fib(n - 1) + fib(n - 2);
map.put(n, answer);
return answer;
}
}
}
50 changes: 50 additions & 0 deletions AddFibonacciNumbers/src/main/java/Efficient.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import java.io.*;
import java.util.*;

public class Efficient {
static int MAX = 1000;


static int f[] = new int[MAX];


static int fib(int n)
{
Arrays.fill(f, 0);
// Base cases
if (n == 0)
return 0;
if (n == 1 || n == 2)
return (f[n] = 1);

// If fib(n) is already computed
if (f[n] == 1)
return f[n];
int k;
if((n & 1) == 1)
k = (n + 1) / 2 ;
else
k = n / 2;

if((n & 1) == 1)
f[n] = (fib(k) * fib(k) +
fib(k - 1) * fib(k - 1));
else
f[n] = (2 * fib(k - 1) + fib(k)) * fib(k);

return f[n];
}

static int calculateSum(int n)
{
return fib(n + 2) - 1;
}


public static void main(String args[])
{
int n = 4;
System.out.println( "Sum of Fibonacci numbers is : " + calculateSum(n));

}
}
19 changes: 19 additions & 0 deletions Admission/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.let.us.java</groupId>
<artifactId>LetUsJava</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<groupId>com.let.us.java</groupId>
<artifactId>Admission</artifactId>
<packaging>jar</packaging>

<name>Admission</name>

</project>
2 changes: 1 addition & 1 deletion admission.java → Admission/src/main/java/admission.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void display()
}
}

class admission{
public class admission{
public static void main(String arg[])
{
Scanner sc=new Scanner(System.in);
Expand Down
19 changes: 19 additions & 0 deletions ArmstrongNumber/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.let.us.java</groupId>
<artifactId>LetUsJava</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<groupId>com.let.us.java</groupId>
<artifactId>ArmstrongNumber</artifactId>
<packaging>jar</packaging>

<name>Armstrong-Number</name>

</project>
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import java.util.Scanner;

class ArmstrongNum {
public class ArmstrongNum {

/* driver function commented
public static void main(String[] args) {

Scanner kb = new Scanner(System.in);
int N = kb.nextInt();

int k = length(N);

System.out.println(isArmstrongNumber(N, k));

kb.close();
}
*/
Expand All @@ -30,16 +30,16 @@ public static int length(int N) {
public static boolean isArmstrongNumber(int N, int k) {
long powerSum = 0;
int n = N;

while (n != 0) {
int rem = n % 10;

powerSum += (int) Math.pow(rem, k);

n /= 10;
}
System.out.println(powerSum);
return (powerSum==N);
}

}
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Rules of contribution

## Code contribution
- Please make sure to add your code in the directory that makes sense, if there is no directory present please make one.
- Please make sure to add a code that is not simply a print statement saying something random and an actual contribution
- Add as many codes you want, every contribution welcome

## ReadMe contribution
- Please make sure that the formatting is all good and is not messy
- No PRs just for a few typos, however feel free to make a PR listing the contributors' name who have contributed to the repository but their username is not on the ReadMe
19 changes: 19 additions & 0 deletions CalculatePi/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.let.us.java</groupId>
<artifactId>LetUsJava</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<groupId>com.let.us.java</groupId>
<artifactId>CalculatePi</artifactId>
<packaging>jar</packaging>

<name>Calculate Pi</name>

</project>
Loading