Skip to content

Commit

Permalink
Add pinterest problem
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnyoodles committed Jun 20, 2017
1 parent 6f6e017 commit 335e271
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions java/interview/column-layout.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* @Company Pinterest
*
* Given a number of columns and an array of pin objects, return an array containing the optimal height of each column.
* A pin object is defined as:
*
* class Pin {
* int height;
* }
*
* The optimal heights for the column will minimize the height of the largest column.
*/
public int[] columnLayout(int k, Pin[] pins) { }


/**
* Part two will expand on the pin object to be:
*
* class Pin {
* int height;
* int width;
* }
*
* You are also given the width of the column, so that any pin that does not equal the column's width
* must be resized proportionally to fit the column.
*/
public int[] columnLayout(int k, int width, Pin[] pins) { }

0 comments on commit 335e271

Please sign in to comment.