This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
[ | |
{ | |
"time": "0", | |
"y": 0 | |
}, | |
{ | |
"time": "1", | |
"y": 0 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.triangle; | |
import java.io.File; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.StringTokenizer; | |
public class Triangle { | |
public static void main(String args[]){ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.tree; | |
import com.example.Node; | |
// Tree is balanced when the difference between maximum and minimum height is <= 1. | |
public class Tree{ | |
public static void main(String args[]){ | |
Node root = new Node(); | |
if(checkTreeBalance(root)) | |
System.out.println("Its a balanced tree"); | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.operations.stack; | |
public class Stack{ | |
private static final int SIZE = 1024; | |
private int N; | |
private int t = -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.operations.queue; | |
public class Queue{ | |
private int N ; | |
private static final int SIZE = 1024; | |
private int[] arr = null; | |
private int t = 0; | |
private int f = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Sort{ | |
private int[] arr = null; | |
public Sort(int[] arr) throws SortException{ | |
this.arr = arr; | |
if(this.arr == null) | |
throw new SortException("Null array found"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.operations.search; | |
public class Search{ | |
private int[] arr=null; | |
private int k=0; | |
public Search(int[] arr){ | |
this.arr = arr; | |
if(this.arr == null) | |
throw new SearchException("Cannot accept null array"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Puzzle { | |
public static int[] shuffleCards(int[] cards){ | |
if(cards == null || cards.length==1 || cards.length==0){ | |
return cards; | |
} | |
int cardNumber,hold; | |
for(int i =0; i < cards.length; i++){ | |
cardNumber = (int)(Math.random()*(cards.length-i)) + 1; | |
hold = cards[cardNumber]; | |
cards[cardNumber] = cards[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Puzzle{ | |
public static boolean findAnagrams(String s1, String s2){ | |
if(s1 == null && s2!=null) | |
return false; | |
if(s1!=null && s2==null) | |
return false; | |
if(s1==null && s2==null) | |
return true; | |
if(s1.length()!=s2.length()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding:utf-8 | |
# Author: Anup Sawant | |
# Purpose: Doc2vec vectors of Science Direct Articles | |
# Created: 9/21/2015 | |
import sys | |
import os | |
import pandas as pd | |
from pandas import Series, DataFrame |
OlderNewer