From da8f3c92a447ec924b9f9ae5bc182ff2681bc51b Mon Sep 17 00:00:00 2001 From: lichuanming <1465802096@qq.com> Date: Thu, 10 Jun 2021 16:30:39 +0800 Subject: [PATCH] =?UTF-8?q?0739=20=E5=8D=95=E8=B0=83=E6=A0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0739.每日温度.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/problems/0739.每日温度.md b/problems/0739.每日温度.md index 516d068d..1f91e42a 100644 --- a/problems/0739.每日温度.md +++ b/problems/0739.每日温度.md @@ -180,7 +180,36 @@ public: Java: - +```java +/** + * 单调栈,栈内顺序要么从大到小 要么从小到大,本题从大到笑 + *
+ * 入站元素要和当前栈内栈首元素进行比较
+ * 若大于栈首则 则与元素下标做差
+ * 若大于等于则放入
+ *
+ * @param temperatures
+ * @return
+ */
+ public static int[] dailyTemperatures(int[] temperatures) {
+ Stack