Fix package declarations (#2576)

This commit is contained in:
Aitor Fidalgo Sánchez
2021-10-16 16:43:51 +03:00
committed by GitHub
parent 60a0c23544
commit 2b7a977cc8
42 changed files with 68 additions and 55 deletions

View File

@ -1,3 +1,5 @@
package DynamicProgramming;
// Given N dice each with M faces, numbered from 1 to M, find the number of ways to get sum X.
// X is the summation of values on each face when all the dice are thrown.
@ -14,9 +16,6 @@ Following is implementation of Dynamic Programming approach. */
// Code ---->
// Java program to find number of ways to get sum 'x' with 'n'
// dice where every dice has 'm' faces
import java.util.*;
import java.lang.*;
import java.io.*;
class DP {
/* The main function that returns the number of ways to get sum 'x' with 'n' dice and 'm' with m faces. */

View File

@ -1,7 +1,4 @@
package test;
import java.io.*;
import java.util.*;
package DynamicProgramming;
/**
* Algorithm explanation https://www.educative.io/edpresso/longest-palindromic-subsequence-algorithm

View File

@ -1,7 +1,4 @@
package test;
import java.io.*;
import java.util.*;
package DynamicProgramming;
/*
* Algorithm explanation https://leetcode.com/problems/longest-palindromic-substring/

View File

@ -15,9 +15,6 @@ Subset1 = {7, 46} ; sum of Subset1 = 53
Subset2 = {36, 40} ; sum of Subset2 = 76
*/
import java.io.*;
import java.util.*;
public class MinimumSumPartition {
public static int subSet(int[] arr) {
int n = arr.length;

View File

@ -1,4 +1,7 @@
package DynamicProgramming;
import java.util.Scanner;
/**
* @file
* @brief Implements [Palindrome
@ -16,9 +19,6 @@ package DynamicProgramming;
* "aba | b | bbabb | ababa"
* @author [Syed] (https://github.com/roeticvampire)
*/
import java.util.Scanner;
public class PalindromicPartitioning {
public static int minimalpartitions(String word){
@ -31,7 +31,7 @@ public class PalindromicPartitioning {
int[] minCuts = new int[len];
boolean[][] isPalindrome = new boolean[len][len];
int i, j, k, L; // different looping variables
int i, j, L; // different looping variables
// Every substring of length 1 is a palindrome
for (i = 0; i < len; i++) {

View File

@ -1,3 +1,5 @@
package DynamicProgramming;
// Java program to find length of the shortest supersequence
class ShortestSuperSequence {

View File

@ -1,3 +1,5 @@
package DynamicProgramming;
public class Sum_Of_Subset {
public static void main(String[] args){