About 68 results
Open links in new tab
  1. CodingBat - Java - Array1 - firstLast6 - Stack Overflow

    May 30, 2022 · I hope all is well. I've recently solved an algorithm in Coding Bat (Java - Array1 - firstLast6): Problem *Given an array of ints, return true if 6 appears as either the first or last element …

  2. How to tackle the Codingbat String-2 oneTwo challenge?

    Here is the problem statement: Given a string, compute a new string by moving the first char to come after the next two chars, so "abc" yields "bca". Repeat this process for each subsequent group...

  3. java - CodingBat : LoneSum optimization - Stack Overflow

    I have completed this exercise on codingbat successfully, but I want to know is there a better/faster or more elegant solution? Given 3 int values, a b c, returns their sum. However, if one of the

  4. java - catDog string problem at Codingbat.com - Stack Overflow

    Mar 30, 2010 · catDog string problem at Codingbat.com Asked 15 years, 8 months ago Modified 7 months ago Viewed 15k times

  5. java - CodingBat-- coding recursively - Stack Overflow

    I am trying the coding bat problem repeatFront: Given a string and an int n, return a string made of the first n characters of the string, followed by the first n-1 characters of the stri...

  6. Simple 'Make chocolate' logic and solution review - Stack Overflow

    While this code may provide a solution to OP's problem, it is highly recommended that you provide additional context regarding why and/or how this code answers the question. Code only answers …

  7. Solution of twoTwo riddle on codingBat in Java - Stack Overflow

    Jun 1, 2014 · The question is about Solving this problem from codingBat in Java. Problem Statement: Given an array of ints, return true if every 2 that appears in the array is next to another 2. twoTwo({4, …

  8. codingbat Problem: close_far | failing only one test | heeeelp

    Feb 16, 2021 · codingbat Problem: close_far | failing only one test | heeeelp Asked 4 years, 10 months ago Modified 1 year, 9 months ago Viewed 3k times

  9. Struggling with substring() logic for 2 character string on CodingBat

    Aug 21, 2020 · I've worked through it several times, but I can't figure out how CodingBat's solution code correctly returns a two character string. This is their solution: public String frontBack(String str) { ...

  10. python - caught speeding - CodingBat - Stack Overflow

    Jan 3, 2020 · most of you are aware of the 'caught speeding' coding problem on CodingBat. I have tried to solve it as below. i am not quite sure why it did not work there. i have viewed other solutions. and i …