import java.util.ArrayList; import java.math.BigInteger; public class LP1Practice { /** * Da main */ public static void main(String[] args) { //use this for any test code. } /** * This function pulls out all characters of even index * and returns them bundled in a string * @param s the string you are sampling from * @return a string containing all characters, in order, * from s. */ public static String everyOther(String s) { return ""; } /** * This functon tests if the BigInteger passed it is a power of 2. * @param b is a BigInteger * @return true if b is a power of 2 and false otherwise. */ public static boolean isAPowerOf2(BigInteger b) { return false; } /* * This function returns a new array list with * all elements from the array list a that are greater * than or equal to n. * @param a an array list of integers * @param n an integer * @return a new array list with all entries in a that are n or larger. */ public static ArrayList largerThan(ArrayList a, int n) { return null; } /** * This returns the nth Fibonacci number as a BigInteger * @param a positive integer * @return the nth Fibnacci number. * fib(0) -> 0 * fib(1) -> 1 * fib(2) -> 1 etc */ public static BigInteger fibonacci(int n) { return null; } /** * This returns the sum of alll of the gcd's of the elements in the list al * with the given BigInteger b. * @param al a list of BigIntegers * @b a BigInteger * @return the sum of the GCDs of the elemnts in al with b. * Sample a = [34, 21, 65] * b = 13 * returns 5. */ public static BigInteger sumGCD(BigInteger b, ArrayList al) { return null; } }