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
| public static void main(String[] args) { | |
| String[] a = {"abstract", "analogy", "assignment", "audience", "bibliography", "citation", "clarify", | |
| "coherent", "compare", "conclusion", "contrast", "document", "draft", "edit", | |
| "essay", "footnote", "introduction", "metaphor", "paragraph", "paraphrase", "paraphrase", | |
| "precise", "quotation", "research", "scope", "source", "structure", "style", "summary", "support"}; | |
| String[] b = {"abstract", "analogy", "assignment", "audience", "bibliography", "citation", "clarify"}; | |
| System.out.println(find(b, 0, b.length - 1, "bibliography")); | |
| // System.out.println(find(a, 0, a.length - 1, "scope")); | |
| String nombre = "car"; |
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
| public class puntoCuatro { | |
| public static void main(String[] args) { | |
| System.out.println(countPalindromicPrimes(1, 100000)); | |
| } | |
| public static int countPalindromicPrimes(int a, int b) { | |
| int answer = 0; |
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
| public class puntoTres { | |
| public static Map<Integer, Integer> cache = new HashMap<>(); | |
| public static void main(String[] args) { | |
| //f without DP | |
| long init1 = System.currentTimeMillis(); | |
| System.out.println("f: " + withoutDP(-22)); |
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 ParcialFinal; | |
| /** | |
| * Created by DarkKlitos on 14/05/16. | |
| */ | |
| public class puntoDos { | |
| private static int[] test1 = new int[]{8, 8}; | |
| private static int[] test2 = new int[]{5, 8}; | |
| private static int[] test3 = new int[]{1, 7}; |
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
| public class puntoUno { | |
| //nˆ3log2(n)+ 4ˆn + 8n | |
| private static void first(int[] array, int s) { | |
| for (int i = 0; i < array.length; i++) //n^3 | |
| for (int j = 0; j < array.length; j++) | |
| for (int j2 = 0; j2 < array.length; j2++) | |
| Arrays.binarySearch(array, s); //log2(n) | |
| } |
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
| public class Unidirectional { | |
| public static int[][] m = new int[][]{{4, 6, 5}, {2, 8, 1}, {6, 9, 3}}; | |
| private static int r, c; | |
| public static void main(String[] args) { | |
| int minimun = min(3, 4, 5); | |
| int[][] cache = new int[3][3]; | |
| System.out.println(minimun); |
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
| public class puntoCuatro { | |
| // int M = 3; | |
| // int[] s = {3, 5, 2, 7, 19, 8}; | |
| // int[] s = {19, 23, 9, 12}; | |
| public static void main(String[] args) { | |
| Scanner sn = new Scanner(System.in); | |
| int M = sn.nextInt(); | |
| int n = sn.nextInt(); | |
| int s[] = new int[n]; | |
| for (int i = 0; i < n; i++) |
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
| public class puntoCinco { | |
| private static int[] x; | |
| private static int base; | |
| private static int diference; | |
| private static int[] answer = new int[]{0}; | |
| public static void main(String[] args) { | |
| // x = new int[]{3, 5, 7, 9, 11, 15, 17}; | |
| x = new int[]{2, 6, 10, 14, 22, 26}; |
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 Kernell; | |
| import java.util.*; | |
| public class workshopDP { | |
| public static final int SIZE = 1000; | |
| private static String x, y; | |
| private static int L[][]=new int[SIZE][SIZE]; | |
| public static int getLCSLength( final int i, final int j,String x,String y ){ |
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
| public class Punto5 { | |
| // Prueba 1 | |
| // 5 | |
| // 5 | |
| // 45 | |
| // 135 | |
| // 405 | |
| // 1215 | |
| //Prueba 2 |