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
import java.io.File; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.apache.commons.collections.ListUtils; | |
import org.apache.commons.io.FileUtils; | |
import org.apache.commons.lang.StringUtils; | |
import org.apache.log4j.Logger; | |
import org.openqa.selenium.By; |
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 me.rerun; | |
import java.util.Arrays; | |
public class QuickSort { | |
public static void quickSort (Comparable comparableArray[], int lowIndex, int highIndex){ | |
//at least one item must exist in the array | |
if (lowIndex>=highIndex){ |
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
/*Note : This code fails for inputs such as int[] intArr={3, -1, -1, -1, -1, -1, 2, 0, 0, 0 }; | |
A modified version of this program is available at gist: https://gist.github.com/gists/3624849 | |
This program is retained for archival purposes. | |
*/ | |
public class Kadane { | |
public static void main(String[] args) { | |
int[] intArr = {-1, 3, -5, 4, 6, -1, 2, -7, 13, -3}; | |
findMaxSubArray(intArr); |
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 me.rerun; | |
public class Kadane { | |
public static void main(String[] args) { | |
int[] intArr={3, -1, -1, -1, -1, -1, 2, 0, 0, 0 }; | |
//int[] intArr = {-1, 3, -5, 4, 6, -1, 2, -7, 13, -3}; | |
//int[] intArr={-6,-2,-3,-4,-1,-5,-5}; | |
findMaxSubArray(intArr); | |
} |
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 me.rerun.incubator; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.Future; | |
import java.util.concurrent.atomic.AtomicInteger; |
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 me.rerun.incubator; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.Future; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.TimeoutException; | |
import java.util.concurrent.atomic.AtomicInteger; |
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
static final class RunnableAdapter<T> implements Callable<T> { | |
final Runnable task; | |
final T result; | |
RunnableAdapter(Runnable task, T result) { | |
this.task = task; | |
this.result = result; | |
} |
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
/** | |
* Only basic arithmetic operators are supported. However, could easily be | |
* extended to support any binary operators | |
* | |
* This program is not an infix to postfix converter. However, this program does the following | |
* | |
* 1) Evaluates a non-parenthesized infix expression and drives it to a final value | |
* 2) Does not support parentheses | |
* 3) Supports multiple digits as operands | |
* 4) Empty space allowed |
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
/** | |
* Only basic arithmetic operators are supported. However, could easily be | |
* extended to support any binary operators | |
* | |
* This program is not an infix to postfix converter. However, this program does the following | |
* | |
* 1) Evaluates a parenthesized or non-parenthesized infix expression and drives it to a final value | |
* 2) Supports parentheses | |
* 3) Supports multiple digits as operands | |
* 4) Empty space allowed |
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 interface Constants { | |
public static final String BANNER = "****************************************************************************************"; | |
public static final String VALIDATION_REPORT = "************************************** VALIDATION REPORT **********************************"; | |
public static final String ENABLED="enabled"; | |
public static final String DISABLED="disabled"; | |
public static final String VISIBLE="visible"; | |
public static final String INVISIBLE="hidden"; | |
public static final String REPORTS_FOLDER="reports"; |
OlderNewer