Apple3 Floor and Ceiling of a Binary Search Tree Problem: Given an integer k and a binary search tree, find the floor (less than or equal to) of k, and the ceiling (larger than or equal to) of k. If either does not exist, then print them as None. Here is the definition of a node for the tree. -Summary- 1. if root node is empty we return none value for both floor and ceil. 2. if root node is equal with k, return floor and cell with k value 3. i.. 2020. 6. 19. [Arrays] sudoku2 - Apple, Uber Problem: Sudoku is a number-placement puzzle. The objective is to fill a 9 × 9 grid with numbers in such a way that each column, each row, and each of the nine 3 × 3 sub-grids that compose the grid all contain all of the numbers from 1 to 9 one time. Implement an algorithm that will check whether the given grid of numbers represents a valid Sudoku puzzle according to the layout rules described a.. 2020. 5. 29. [Arrays] rotateImage - Amazon, Microsoft, Apple Problem: Note: Try to solve this task in-place (with O(1) additional memory), since this is what you'll be asked to do during an interview. You are given an n x n 2D matrix that represents an image. Rotate the image by 90 degrees (clockwise). Example For the output should be -Summary- 1. Reverse the matrix first 2. Transpose the matrix to move around the elements. The element will be rotated wit.. 2020. 5. 29. 이전 1 다음