Ad
  • Custom User Avatar

    oh, thank you so much, sorry for the stupid error

  • Custom User Avatar

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

  • Custom User Avatar

    nice kata! maybe too easy for 4 kyu, but still enjoyed resolving it, and very useful to train about oop

  • Custom User Avatar

    sorry for the stupid question, but what if a player ran out of cards in his hand? does he lose immediately? I think I don't understand...

  • Custom User Avatar

    sorry if i ask to you, but i updated a bit the code, and on my own it works, i think there are some strange cases that i can' handle, but i tried all the sample test and they work fine, can you give me an hint? :)

  • Custom User Avatar

    hi, when i try the code on my pc it works fine, but when i run it on codewars, it always return an IndexError: IndexError: too many indices for array, i can't figure out why. can someone help me?
    this is my code:

    import numpy as np
    import warnings
    
    warnings.filterwarnings('error')
    
    class Sudoku(object):
    	  def __init__(self, data):
    		  self.data = data
    	  def is_valid(self):
    		  try:
    			  arr = np.array(self.data)
    			  arr.shape
    		  except Warning:
    			  return False
    		  for row in self.data:
    			  if len(set(row)) != len(row):
    				  return False
    		  for i in range(len(self.data)):
    			  if len(set(arr[:, i])) != len(arr[:, i]):
    				  return False
    		  return True
    
  • Custom User Avatar

    yeah, thx, i fixed that, but it still doesn't work with a lot of random tests

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    hi everyone, i am struggling optimizing the algorithm, can someone send me some hints? :)

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

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