Python 3 Easy to Understand.. O(n)t ime and Space (100% memory 93%time)
\tclass Solution:\n    def queensAttacktheKing(self, queens: List[List[int]], king: List[int]) -> List[List[int]]:\\n        \n        #Converting the array int
\tclass Solution:\n    def queensAttacktheKing(self, queens: List[List[int]], king: List[int]) -> List[List[int]]:\\\n        \n        #Converting the array into set for O(1) ---> Search\n        Queens = set()\n        \n        for  i,j in queens:\n            Queens.add((i,j))\n        \n        \n        #To store the result\n        ans=[]\n        \n        \n           \n        \n        #Recursive code\n        def check(x,y,xPosition,yPosition):\n            \n            #Base Case\n            \n            if x>=8 or y>=8 or x<0 or y<0:\n                return\n            \n            #Check whether the co-ordinate is present in the set or not\n            if (x,y) in Queens:\n                #If present add to ans and return\n                ans.append([x,y])\n                return\n            #if not present go to the next coordinate \n            # (xPosition and yPosition has value 0 1 -1 to decide the 8 direction  )\n            return check(x+xPosition,y+yPosition,xPosition,yPosition)\n        \n        \n        #x and y co-ordinate of king\n        xKing,yKing = king\n        \n        \n        #All Eight Direction\n        \n        check(xKing,yKing,0,1)            \n        check(xKing,yKing,0,-1)            \n        check(xKing,yKing,1,0)           \n        check(xKing,yKing,-1,0)            \n        check(xKing,yKing,1,1)            \n        check(xKing,yKing,-1,-1)            \n        check(xKing,yKing,-1,1)            \n        check(xKing,yKing,1,-1)   \n        \n        \n        # return ans\n        return ans\n\t\t\n\t\t# Please Upvote if you understand the code..\n\t\t\n\t\t\'\'\'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\t   _____ ___                     __                 ________  __           __\n\t  / ___//   | __  ______ _____  / /_____ _____     / ____/ / / /___  _____/ /_\n\t  \\__ \\/ /| |/ / / / __ `/ __ \\/ __/ __ `/ __ \\   / / __/ /_/ / __ \\/ ___/ __ \\\n\t ___/ / ___ / /_/ / /_/ / / / / /_/ /_/ / / / /  / /_/ / __  / /_/ (__  ) / / /\n\t/____/_/  |_\\__, /\\__,_/_/ /_/\\__/\\__,_/_/ /_/   \\____/_/ /_/\\____/____/_/ /_/\n\t\t\t   /____/\n\n             **************************************************\n                   _  _  ____  ____  ____  ____  ____  ____\n                  / )( \\(  __)(  _ \\(  __)(  _ \\(  __)(  __)\n                  \\ /\\ / ) _)  )   / ) _)  )   / ) _)  ) _)\n                  (_/\\_)(____)(__\\_)(__)  (__\\_)(____)(____)\n\n            ***************************************************\n\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\'\'\'\n\n            \n        \n
['Recursion', 'Python3']