Skip to content

Instantly share code, notes, and snippets.

@rohanjai777
rohanjai777 / index.html
Created June 4, 2019 20:38
Tribute Page
<main id="main">
<h1 id= "title"> Sadhguru Jaggi Vasudev </h1>
<p> The Man who inspires million lives </p>
<figure id="img-div">
<img
id="image"
src="https://isha.sadhguru.org/wp-content/uploads/2013/10/Sadhguru-Jaggi-Vasudev-Public.jpg"
alt="Sadhguru Jaggi Vasudev, often referred to as simply Sadhguru, is an Indian yogi, mystic, and author"
/>
<figcaption id="img-caption">
@rohanjai777
rohanjai777 / Survey.html
Last active June 14, 2019 04:34
Survey Form
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Survey Form</title>
<link rel="stylesheet" href="styl.css">
</head>
<body>
<header>
@rohanjai777
rohanjai777 / Product.html
Last active June 15, 2019 23:07
CBR Group
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Product Landing Page</title>
<link rel="stylesheet" href="product.css">
</head>
<body>
<header id="header" class="first">
<div class="logo">
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>JavaScript Documentation</title>
<link rel="stylesheet" href="js.css">
</head>
<body>
<header>
JS Documentation
@rohanjai777
rohanjai777 / Min Steps in Infinite Grid
Created March 23, 2021 11:22
Min Steps in Infinite Grid InterviewBit Solution
public class Solution {
public int coverPoints(int[] A, int[] B) {
int sum = 0;
for(int i=1;i<A.length;i++){
int v1 = Math.abs(A[i] - A[i-1]);
int v2 = Math.abs(B[i] - B[i-1]);
int max = Math.max(v1,v2);
sum+=max;
}
return sum;
public class Solution {
public void merge(ArrayList<Integer> a, ArrayList<Integer> b) {
int i=0;
int j=0;
int n = a.size();
int m = b.size();
//ArrayList<Integer> al = new ArrayList<>();
while(i<n || j<m){
if(i<n && j<m){
int v1 = a.get(i);
public class Solution {
public int threeSumClosest(int[] arr, int b) {
Arrays.sort(arr);
int mindiff = Integer.MAX_VALUE;
int close_sum = 0;
for(int i=0;i<arr.length;i++){
int v = arr[i];
int j=i+1;
int k=arr.length-1;
while(j<k){
public class Solution {
public ArrayList<ArrayList<Integer>> threeSum(ArrayList<Integer> A) {
Collections.sort(A);
HashSet<ArrayList<Integer>> hs = new LinkedHashSet<>();
int n = A.size();
for(int i=0;i<n-2;i++){
int v = A.get(i);
int j = i+1;
int k = n-1;
while(j<k){
public class Solution {
public int removeDuplicates(ArrayList<Integer> a) {
int j=0;
int n = a.size();
int count = 1;
for(int i=1;i<n;i++){
int v1 = a.get(i);
int v2 = a.get(j);
if(v1!=v2){
count = 1;
public int maxSubArray(final int[] arr) {
if(arr.length == 0){
return -1;
}
int max = 0;
int finalmax = Integer.MIN_VALUE;
for(int i=0;i<arr.length;i++){
max = Math.max(max+arr[i],arr[i]);
finalmax = Math.max(max,finalmax);
}