This file contains hidden or 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 problems; | |
| import java.util.Arrays; | |
| public class BoyerMoore { | |
| /** | |
| * Bad Character Rule | |
| * <p/> | |
| * Preprocess the pattern string. Returns array with | |
| * array[c] = position of rightmost occurrence of c in the pattern |
This file contains hidden or 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
| // | |
| // LLUGrid.swift | |
| // | |
| // Class representing a grid, where elements can be accessed using [x,y] subscript syntax | |
| // Example: | |
| // var grid = Grid<Bool>(rows: 3, columns: 10, defaultValue: false) | |
| // grid[1,2] = true | |
| // | |
| // Created by Lucas Louca on 06/02/16. | |
| // Copyright © 2016 Lucas Louca. All rights reserved. |
This file contains hidden or 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.tool.main; | |
| import java.io.BufferedReader; | |
| import java.io.File; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileReader; | |
| import java.io.IOException; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.LinkedHashMap; |
This file contains hidden or 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.tool.main; | |
| import java.util.List; | |
| import java.util.Map; | |
| public interface TTSheet2HashMap { | |
| /****************************************** PUBLIC ********************************************/ | |
| /** | |
| * Initiates the processing of the sheet to List<Map<String, |
This file contains hidden or 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 problems; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| /** | |
| * Created by lucas on 29/02/16. | |
| */ | |
| public class SuffixTree { |
This file contains hidden or 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 problems; | |
| public class TrieTest { | |
| static class TrieNode { | |
| private final int SIZE = 4; | |
| TrieNode[] children; | |
| char c; |
This file contains hidden or 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 problems; | |
| import java.util.LinkedList; | |
| import java.util.Queue; | |
| public class AhoCorasick { | |
| static class TrieNode { | |
| private final int SIZE = 4; |
This file contains hidden or 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
| use DBI; | |
| use strict; | |
| my $usersFile = sprintf("users.txt"); | |
| open(STDOUT, ">>", $usersFile); | |
| my $driver = "Oracle"; | |
| my $sid = "SID01"; | |
| my $userid = "admin"; | |
| my $password = "s3cret"; |
This file contains hidden or 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 problems; | |
| public class MergeSort { | |
| private static void print(int[] a) { | |
| for (int n : a) { | |
| System.out.print(n + " "); | |
| } | |
| System.out.println(); | |
| } |
This file contains hidden or 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 problems; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.util.InputMismatchException; | |
| /** | |
| * | |
| * "In the read() call, we do not do any fancy checks as Java does in the BufferedReader class. Plus we don't acquire any mutex locks which saves us additional cycles." | |
| * |
OlderNewer