From 335e271cff447e59ed177d7a89ff58db7e0c42e3 Mon Sep 17 00:00:00 2001 From: Vincent Le Date: Tue, 20 Jun 2017 16:13:01 -0700 Subject: [PATCH] Add pinterest problem --- java/interview/column-layout.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 java/interview/column-layout.java diff --git a/java/interview/column-layout.java b/java/interview/column-layout.java new file mode 100644 index 0000000..0f4846a --- /dev/null +++ b/java/interview/column-layout.java @@ -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) { }