Skip to content

Commit

Permalink
Adding all HackerEarth and HackerRank Solution to github.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav-Shankar committed Nov 18, 2017
0 parents commit 2fc95d0
Show file tree
Hide file tree
Showing 643 changed files with 28,015 additions and 0 deletions.
6 changes: 6 additions & 0 deletions A-team/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="output" path="bin"/>
</classpath>
17 changes: 17 additions & 0 deletions A-team/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>A-team</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
11 changes: 11 additions & 0 deletions A-team/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
Binary file added A-team/bin/TestClass.class
Binary file not shown.
28 changes: 28 additions & 0 deletions A-team/src/TestClass.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import java.awt.geom.Line2D;
import java.util.Scanner;


public class TestClass {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
int x1 = 0,y1=0,x2=0,y2=0,Xc=0,Yc=0;
for(int i=0;i<T;i++){
x1 = sc.nextInt();
y1 = sc.nextInt();
x2 = sc.nextInt();
y2 = sc.nextInt();
Xc = sc.nextInt();
Yc = sc.nextInt();
Line2D line1 = new Line2D.Float(x1, y1, x2, y2);
Line2D line2 = new Line2D.Float(0, 0, Xc, Yc);
if(line1.intersectsLine(line2)){
System.out.println("NO");
}
else{
System.out.println("YES");
}
}

}
}
6 changes: 6 additions & 0 deletions Abstract Classes and Interfaces/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="output" path="bin"/>
</classpath>
17 changes: 17 additions & 0 deletions Abstract Classes and Interfaces/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Abstract Classes and Interfaces</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
Binary file added Abstract Classes and Interfaces/bin/Retailer1.class
Binary file not shown.
Binary file added Abstract Classes and Interfaces/bin/Retailer2.class
Binary file not shown.
Binary file added Abstract Classes and Interfaces/bin/Solution.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
16 changes: 16 additions & 0 deletions Abstract Classes and Interfaces/src/Retailer1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

public class Retailer1 extends Wholeseller{

@Override
void sellErasers() {
// TODO Auto-generated method stub
System.out.println("pucahsing 34 eraseres");
}

@Override
void sellPencils() {
// TODO Auto-generated method stub
System.out.println("purchasing 34 pencils");
}

}
22 changes: 22 additions & 0 deletions Abstract Classes and Interfaces/src/Retailer2.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

public class Retailer2 implements Wholeseller1{

@Override
public void sellbooks() {
// TODO Auto-generated method stub
System.out.println("I am purchasing books of class 9th");
}

@Override
public void sellpencils() {
// TODO Auto-generated method stub
System.out.println("purchasing 10 pencils");
}

@Override
public void sellerasers() {
// TODO Auto-generated method stub
System.out.println("purchasing 15 eraseres");
}

}
17 changes: 17 additions & 0 deletions Abstract Classes and Interfaces/src/Solution.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import java.util.Dictionary;

public class Solution {
public final static int i=0;
public static void main(String[] args) throws Exception {
Retailer1 r1 = new Retailer1();
Retailer2 r2 = new Retailer2();
i = i+1;
r1.sellErasers();r1.sellPencils();r1.sellXbooks();
r2.sellbooks();r2.sellerasers();r2.sellpencils();
System.out.println();;

}


}

9 changes: 9 additions & 0 deletions Abstract Classes and Interfaces/src/Wholeseller.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

public abstract class Wholeseller {
void sellXbooks(){
System.out.println("Books of class 10th sold");
}
abstract void sellErasers();
abstract void sellPencils();

}
6 changes: 6 additions & 0 deletions Abstract Classes and Interfaces/src/Wholeseller1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

public interface Wholeseller1 {
void sellbooks();
void sellpencils();
void sellerasers();
}
Binary file added Activators/KMSpico-8.9_PlusCrack.com.rar
Binary file not shown.
Loading

0 comments on commit 2fc95d0

Please sign in to comment.