• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
javisp91 Avatar
Name:Unknown
Clan:Unknown
Member Since:Mar 2017
Last Seen:Dec 2020
Profiles:
    Following:1
    Followers:0
    Allies:0
    View Profile Badges
    Ad
    Would You Pass the Google SQL Interview? Test Yourself with These 7 Concepts
    Study up for your next SQL interview with these interview questions.
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (18)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • farhanaditya
      • commented on "Exclamation marks series #11: Replace all vowel to exclamation mark in the sentence" kata
      • 4 years ago

      What do you mean by "Symbols in uppercase"?

    • Custom User Avatar
      • fuckhtml
      • commented on "Exclamation marks series #11: Replace all vowel to exclamation mark in the sentence" kata
      • 7 years ago

      Why dont you add symbols in uppercase?

    • Custom User Avatar
      • javisp91
      • commented on "Multiple of index" kata
      • 8 years ago

      Oh of course! Thanks.

    • Custom User Avatar
      • Chrono79
      • commented on "Multiple of index" kata
      • 8 years ago

      indexOf returns the first occurence of a number, your code won't work if the numbers are not unique.
      Why are you using indexOf at all? You already have the index in a var.

    • Custom User Avatar
      • javisp91
      • commented on "Multiple of index" kata
      • 8 years ago

      This comment is hidden because it contains spoiler information about the solution

    • Custom User Avatar
      • javisp91
      • commented on "Possiblities Array" kata
      • 8 years ago

      You're right, thanks for clarifying it.

    • Custom User Avatar
      • Chrono79
      • commented on "Possiblities Array" kata
      • 8 years ago

      Try writing in english (the common language in CodeWars). What happens if the array is empty in your code?

    • Custom User Avatar
      • ethanfwalters
      • created a question for "Possiblities Array" kata
      • 8 years ago

      This comment is hidden because it contains spoiler information about the solution

    • Custom User Avatar
      • slamas
      • commented on "Possiblities Array" kata
      • 8 years ago

      Hola, no entiendo por que no me pasa los test ramdom y edge. Los sample los pasa ok

      Lo he hecho en eclipse y lo he probado con varios casos y devuelve el valor correcto...

      lo que se pide es que si el array contiene todos los numeros entre 0 y length-1 devuelva true

      alguien que me diga donde esta el error?

      public class Solution {

      public static boolean isAllPossibilities(int[] a) {
      	int i;
      	boolean esta = true;
      	boolean alguno;
      	for(i=0;i<a.length;i++) {
      		alguno=false;
      		for(int valor:a) {
      			if(i==valor) {
      				alguno = true;
      				break;
      			}
      		}
      		if(alguno==false){
      			esta=false;
          break;
      		}
      				
      	}
      return esta;
      }
      

      }

    • Custom User Avatar
      • Chrono79
      • created a question for "Possibilities Array" kata
      • 8 years ago

      Why doing 100 random tests with a set of only 24 different inputs?

    • Custom User Avatar
      • Chrono79
      • created a suggestion for "Possiblities Array" kata
      • 8 years ago

      Add a fixed edge test case like the one @javisp91 mentioned below: [0, 0, 2, 3]

    • Custom User Avatar
      • Chrono79
      • commented on "Possiblities Array" kata
      • 8 years ago

      If your function returns true in that case, your code is not ok. That it passes the tests means the tests aren't hard enough and more tests (possible edge cases like you mentioned) should be added to prevent faulty solutions pass.

    • Custom User Avatar
      • javisp91
      • commented on "Possiblities Array" kata
      • 8 years ago

      This comment is hidden because it contains spoiler information about the solution

    • Custom User Avatar
      • Chrono79
      • commented on "Possiblities Array" kata
      • 8 years ago

      I don't understand your comment, the 1 is missing there. So by definition that's not an array of all possibilities. There are a lot of arrays that are not an AoAP (arrays with repeated values is a subset of those).

    • Custom User Avatar
      • javisp91
      • commented on "Possiblities Array" kata
      • 8 years ago

      Hello! I'd just like to say it wouldn't work if there were a duplicate in the array:
      isPossibilities([0, 0, 2, 3]);

      You'd get 0 as the minimum number, and then 3 would be equal to the arr.length - 1.

    • Loading more items...
    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...