MCPcopy Create free account

hub / github.com/danialgoodwin/dev / functions

Functions980 in github.com/danialgoodwin/dev

↓ 1 callersMethodgetDivisors
Return the proper divisors for n or an empty list is n <= 1.
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q21_AmicableNumbers.java:99
↓ 1 callersMethodgetDivisors
Return the proper divisors for n or an empty list is n <= 1.
code-practice/project-euler/in-java/src/com/danialgoodwin/util/FactorUtils.java:43
↓ 1 callersMethodgetDodgeAngle
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/box2d/RunnerUserData.java:27
↓ 1 callersMethodgetDodgePosition
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/box2d/RunnerUserData.java:36
↓ 1 callersMethodgetFirstFibonacciTermWithNdigitsLarge
Return the first term in the Fibonacci sequence to contain n digits, where n >= 1.
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q25_1000DigitFibonacciNumber.java:65
↓ 1 callersMethodgetFirstNDigitsOfSum
Calculate the sum of the list of numbers, then return the first N digits. Space: O(1), time: O(n). A speed improvement would be to only calculate the
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q13_LargeSum.java:47
↓ 1 callersMethodgetFriendshipsByLevel
(Map<String, List<String>> friendships, String friend)
code-practice/career-cup/src/com/anonsage/question/FriendshipLevel.java:45
↓ 1 callersMethodgetGreatestAdjacentProduct
Ideas for improvement: - Check for zeros and skip some indexes - Possibly experiment with lambda for Java 8 Space: O(1), time: (n) @param givenNumber
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q8_LargestProductInSeries.java:78
↓ 1 callersMethodgetHighlyDivisibleTriangularNumber
Returns the first triangle number to have greater than the specified number of factors. Space: O(n), time: O(n n)
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q12_HighlyDivisibleTriangularNumber.java:28
↓ 1 callersMethodgetHitAngularImpulse
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/box2d/RunnerUserData.java:40
↓ 1 callersFunctiongetImageUrl
* @param {string} searchTerm - Search term for Google Image search. * @param {function(string,number,number)} callback - Called when an image has *
platform-chrome/app-extension/practice-image-search/popup.js:57
↓ 1 callersMethodgetJumpingLinearImpulse
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/box2d/RunnerUserData.java:19
↓ 1 callersMethodgetLargestNode
Returns largest node in stack. This is a O(n) operation.
code-practice/LargestStackTest.java:111
↓ 1 callersMethodgetLargestPalindromeFromProductOfTwo3DigitNumbers_v1
Solves via brute force: Tests all combinations of 3-digit numbers as palindrome. Space: O(1), Time: O(n^2)
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q4_LargestPalindromeProduct.java:44
↓ 1 callersMethodgetLargestPrimeFactor_v1
This can be improved to work better with larger numbers. Space: O(n), Time: O(n) @param value the number to factor @return prime factor
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q3_LargestPrimeFactor.java:36
↓ 1 callersMethodgetLargestPrimeFactor_v2
This can be improved to work better with larger numbers. Space: O(n), Time: O(n), with better space than v1. @param value the number to factor @return
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q3_LargestPrimeFactor.java:55
↓ 1 callersMethodgetLargestProductInAGrid
Returns the largest product with `numAdjacent` numbers that are in a single direction (up, down, left, right, or diagonally). To do that, this iterate
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q11_LargestProductInAGrid.java:64
↓ 1 callersMethodgetLeastCommonMultiple
/ Returns the least common multiple of all numbers in list. If list is null or empty, then returns INVALID_INPUT = -1. Note: The current version of t
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q5_SmallestMultiple.java:59
↓ 1 callersMethodgetLinearVelocity
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/box2d/EnemyUserData.java:23
↓ 1 callersMethodgetListOfNames
Return a list of names. If there is an error, then returns an empty list.
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q22_NameScores.java:66
↓ 1 callersMethodgetLongestCollatzSequenceStartNumberViaMemoizeMap
Space: O(n), time: O(n) @param max positive number for max possible starting sequence
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q14_LongestCollatzSequence.java:37
↓ 1 callersMethodgetLongestCommonSubsequence
(String a, String b)
language/java/snippet/PracticeLongestCommonSubsequence.java:14
↓ 1 callersMethodgetMaxIndex
Return the index with the max value. This searches iteratively. If there are multiple max values, then the first one found will be used. @throws java.
code-practice/project-euler/in-java/src/com/danialgoodwin/util/ArrayUtils.java:16
↓ 1 callersMethodgetMaxIndex
Return the index with the max value. This searches iteratively. If there are multiple max values, then the first one found will be used. @throws java.
code-practice/project-euler/in-java/src/com/danialgoodwin/util/CollectionsUtils.java:21
↓ 1 callersMethodgetMaxWorthCakesForWeight_dp_topDown
(final ArrayList<Cake> allCakes, ArrayList<Cake> currentCakes, final int capacityLeft)
code-practice/interview-cake/src/com/danialgoodwin/interviewcake/question/CakeThiefQuestion.java:89
↓ 1 callersMethodgetMaximumPathSum
Return the maximum total from top to bottom of the triangle of digits provided. If the input is null or empty, then returns zero. Space: O(width), ti
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q18_MaximumPathSum1.java:55
↓ 1 callersMethodgetMaximumPathSum
Return the maximum total from top to bottom of the triangle of digits provided. If the input is null or empty, then returns zero. Space: O(width), ti
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q67_MaximumPathSum2.java:55
↓ 1 callersMethodgetMessageForCustomer
(List<Purchase> purchases)
code-practice/career-cup/src/com/anonsage/question/MarketingCampaign.java:49
↓ 1 callersMethodgetMissingNum
(int[] nums)
code-practice/hacker-rank/MissingNumber.java:55
↓ 1 callersMethodgetNthLexicographicPermutation
Return the nth lexicographic permutation. Space: O(log(n)) due to recursive, time: O(log(n)) @param s the list of characters to permutate, should alre
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q24_LexicographicPermutations.java:69
↓ 1 callersMethodgetNthPrime
Space: O(), time: O() @param position which prime @return prime number at nth position
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q7_10001stPrime.java:34
↓ 1 callersMethodgetNumberOfLatticePaths
Return the number of unique lattice/edge paths from corner to corner on a grid of squares. Note: The sum of width and height currently must be less th
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q15_LatticePaths.java:43
↓ 1 callersMethodgetOnlyPrimes
Returns an array of only prime numbers up to max.
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q3_LargestPrimeFactor.java:114
↓ 1 callersMethodgetOrPut
code-practice/project-euler/in-kotlin/src/main/kotlin/LruCache.kt:13
↓ 1 callersMethodgetPermutations
(Set<Character> input)
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q32_PandigitalProducts.java:78
↓ 1 callersMethodgetPrimeFactors
(BigInteger number)
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q26_ReciprocalCycles.java:105
↓ 1 callersMethodgetPrimeFactors
(long value)
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q3_LargestPrimeFactor.java:94
↓ 1 callersMethodgetProduct
Returns the product of all the digits in the array.
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q9_SpecialPythagoreanTriplet.java:45
↓ 1 callersMethodgetProductDiagonalLeftDown
Returns the product of `numAdjacent` numbers in the direction specified. @return product, or 0 if not enough space
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q11_LargestProductInAGrid.java:129
↓ 1 callersMethodgetProductDiagonalRightDown
Returns the product of `numAdjacent` numbers in the direction specified. @return product, or 0 if not enough space
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q11_LargestProductInAGrid.java:116
↓ 1 callersMethodgetProductDown
Returns the product of `numAdjacent` numbers in the direction specified. @return product, or 0 if not enough space
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q11_LargestProductInAGrid.java:104
↓ 1 callersMethodgetProductOfCoefficientsForMaxQuadraticPrimes
Return the product of coefficients, a and b, for the quadratic expression that products the maximum number of primes for consecutive values of n. Spa
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q27_QuadraticPrimes.java:51
↓ 1 callersMethodgetProductRight
Returns the product of `numAdjacent` numbers in the direction specified. @return product, or 0 if not enough space
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q11_LargestProductInAGrid.java:92
↓ 1 callersMethodgetProductsFor1To9Pandigitals
()
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q32_PandigitalProducts.java:54
↓ 1 callersMethodgetPythagoreanTripletForSum
Returns the Pythagorean triplet that adds up to `sum` or null if no such triplet
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q9_SpecialPythagoreanTriplet.java:32
↓ 1 callersMethodgetPythagoreanTripletProductForSum
(int sum)
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q9_SpecialPythagoreanTriplet.java:27
↓ 1 callersMethodgetQuestionName
Override this to set the debug log tag name. There may also be other uses in the future.
code-practice/interview-cake/src/com/danialgoodwin/interviewcake/question/Question.java:9
↓ 1 callersMethodgetQuestionName
Override this to set the debug log tag name. There may also be other uses in the future.
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Question.java:9
↓ 1 callersMethodgetRandomEnemyType
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/util/RandomUtils.java:9
↓ 1 callersMethodgetRegions
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/enums/EnemyType.java:55
↓ 1 callersMethodgetRows
(DatabaseConnection connection)
language/java/app-practice/ssh-and-database-connection/src/com/danialgoodwin/practice/Main.java:44
↓ 1 callersMethodgetRunningPosition
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/box2d/RunnerUserData.java:32
↓ 1 callersMethodgetSumOfAllMultiplesOf3And5_v1
Space: O(1), Time: O(n) @param below find only multiples below this number @return sum, which may overflow
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q1_MultiplesOf3And5.java:34
↓ 1 callersMethodgetSumOfAllMultiplesOf3And5_v2
Space: O(1), Time: O(n), but faster than v1 because this only iterates over the multiples and has no other checks. @param below find only multiples be
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q1_MultiplesOf3And5.java:49
↓ 1 callersMethodgetSumOfAmicableNumbers
Return the sum of the amicable numbers for n.
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q21_AmicableNumbers.java:37
↓ 1 callersMethodgetSumOfDiagonalNumbersInSpiral
Return the sum of the numbers on the diagonals in a 1001 by 1001 spiral square. Space: O(1), time: O(n) @return sum of numbers on diagonal
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q28_NumberSpiralDiagonals.java:45
↓ 1 callersMethodgetSumOfDigitPowers
(int power, int lowBound, int highBound)
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q30_DigitFifthPowers.java:41
↓ 1 callersMethodgetSumOfDigits
Return the sum of digits of the input number. Space: O(n), time: O(n). An optimization in space would be to iterate through each character in the stri
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q16_PowerDigitSum.java:28
↓ 1 callersMethodgetSumOfEvenFibonacciNumbers
Space: O(1), Time: O(n). @param max the maximum value for fibonacci numbers in sequence @return sum, which may overflow
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q2_EvenFibonacciNumbers.java:33
↓ 1 callersMethodgetSumOfPrimes
Space: O(n), time: O(n) @param max primes from 2 to this number @return sum of primes up to below
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q10_SummationOfPrimes.java:42
↓ 1 callersMethodgetSumSquareDifference
Solves via brute force. Space: O(), time: O() @param numbers list of numbers to compare @return sum
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q6_SumSquareDifference.java:41
↓ 1 callersMethodgetZeros
(int numZeros)
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q26_ReciprocalCycles.java:95
↓ 1 callersFunctionget_choice_v4
(turn: int)
code-practice/codingame.com/codingame-sponsored-contest/app.py:176
↓ 1 callersFunctionget_i_value
(c1, c2, c3, c4)
code-practice/codingame.com/codingame-sponsored-contest/app.py:71
↓ 1 callersFunctionget_initial_position
(water_board: [])
code-practice/codingame.com/challenge__ocean_of_code/ocean_challenge/out.py:580
↓ 1 callersFunctionget_initial_position
(water_board: [])
code-practice/codingame.com/challenge__ocean_of_code/ocean_challenge/app.py:220
↓ 1 callersFunctionget_modules_from_import_line
(line)
code-practice/codingame.com/challenge__ocean_of_code/ocean_challenge/combine_py_files.py:85
↓ 1 callersMethodget_move
(self)
code-practice/codingame.com/challenge__ocean_of_code/ocean_challenge/out.py:497
↓ 1 callersMethodget_move
(self)
code-practice/codingame.com/challenge__ocean_of_code/ocean_challenge/app.py:137
↓ 1 callersMethodget_shot
(self)
code-practice/codingame.com/challenge__ocean_of_code/ocean_challenge/out.py:455
↓ 1 callersMethodget_shot
(self)
code-practice/codingame.com/challenge__ocean_of_code/ocean_challenge/app.py:95
↓ 1 callersMethodhit
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/actor/Runner.java:96
↓ 1 callersMethodinsertIntoSorted
(int[] ar)
code-practice/hacker-rank/algorithms/sorting/InsertionSort1.java:14
↓ 1 callersMethodinsertionSortPart2
(int[] ar)
code-practice/hacker-rank/algorithms/sorting/InsertionSort2.java:14
↓ 1 callersMethodinteger
(self)
compiler/practice/minimal-calculator-python/calc-interpreter-5-to-postfix.py:34
↓ 1 callersMethodinteger
(self)
compiler/practice/minimal-calculator-python/calc-interpreter-5.py:34
↓ 1 callersMethodinteger
(self)
compiler/practice/minimal-calculator-python/calc-interpreter-4.py:34
↓ 1 callersMethodinteger
(self)
compiler/practice/minimal-calculator-python/calc-interpreter-5-to-lisp.py:34
↓ 1 callersMethodinteger
(self)
compiler/practice/minimal-calculator-python/calc-interpreter-3.py:31
↓ 1 callersMethodinteger
(self)
compiler/practice/minimal-calculator-python/calc-interpreter-6.py:34
↓ 1 callersMethodinterpret
(self)
compiler/practice/minimal-calculator-python/calc-interpreter-5-to-postfix.py:172
↓ 1 callersMethodinterpret
(self)
compiler/practice/minimal-calculator-python/calc-interpreter-5.py:166
↓ 1 callersMethodinterpret
(self)
compiler/practice/minimal-calculator-python/calc-interpreter-5-to-lisp.py:173
↓ 1 callersMethodinterpret
(self)
compiler/practice/minimal-calculator-python/calc-interpreter-6.py:186
↓ 1 callersMethodinterpret
()
compiler/practice/minimal-calculator-java/Calc.java:232
↓ 1 callersMethodisAbundant
(int n)
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q23_NonAbundantSums.java:71
↓ 1 callersMethodisDodging
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/actor/Runner.java:92
↓ 1 callersMethodisExistsPathHelper
(int[][] matrix, int startX, int startY, int stopX, int stopY, boolean[][] visited)
code-practice/career-cup/src/com/anonsage/question/MatrixGraphTraverse.java:74
↓ 1 callersMethodisFunny
(String in)
code-practice/hacker-rank/algorithms/strings/FunnyString.java:12
↓ 1 callersMethodisHit
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/actor/Runner.java:101
↓ 1 callersMethodisOverlappingTimes
(Pair pair1, Pair pair2)
code-practice/interview-cake/src/com/danialgoodwin/interviewcake/question/MergingRangesQuestion.java:51
↓ 1 callersMethodisPal
(String s)
code-practice/code-fights/MakePalidrome.java:75
↓ 1 callersMethodisPalindrome
Returns true if input is a palidrone, otherwise false. This treats negative numbers just like positive numbers.
code-practice/project-euler/in-java/src/com/danialgoodwin/projecteuler/question/Q4_LargestPalindromeProduct.java:104
↓ 1 callersMethodisSingleRifleShuffle
Returns true if input deck is a single rifle shuffle, otherwise false. Deck sizes of 3 or less will always return true because regardless of the numbe
code-practice/interview-cake/src/com/danialgoodwin/interviewcake/question/SingleRifleShuffleQuestion.java:106
↓ 1 callersFunctionis_palindrome
(num)
code-practice/project-euler/in-python/4--largest-palindrome-product.py:7
↓ 1 callersMethodis_water
(self, x: int, y: int)
code-practice/codingame.com/challenge__ocean_of_code/ocean_challenge/Board.py:11
↓ 1 callersMethodjump
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/actor/Runner.java:66
↓ 1 callersMethodlanded
()
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/actor/Runner.java:73
↓ 1 callersFunctionlargest_product
(numAsStr: str, numDigits: int)
code-practice/project-euler/in-python/8--largest-product-in-a-series.py:64
↓ 1 callersMethodleftBoundsReached
(float delta)
game/libgdx/app/martian-run-simple/core/src/com/danialgoodwin/game/martianrunsample/actor/Ground.java:52
← previousnext →301–400 of 980, ranked by callers