The 6th Week of ARTS:7-ReverseInteger And 9-PalindromeNumber 有更新!

  |   0 评论   |   0 浏览

Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm ReverseInteger Description Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 120 Output: 21 My Solution package com.silence.arts.leetcode.first; /** * <br> * <b>Function:</b><br> * <b>Author:</b>@author Silenc....

The 7th Week of ARTS:94-Binary Tree Inorder Traversal 有更新!

  |   0 评论   |   0 浏览

Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm Binary Tree Inorder Traversal Description Given a binary tree, return the inorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,3,2] 2. My Solution package com.silence.arts.leetcode.second; import java.util.ArrayList; import java.util.List; /** * <br> * <b>Function:</b><br> * <b&g....

The 8th Week of ARTS:144-Binary Tree Preorder Traversal 有更新!

  |   0 评论   |   0 浏览

Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm Binary Tree Preorder Traversal Description Given a binary tree, return the preorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 2 / 3 Output: [1,2,3] My Solution package com.silence.arts.leetcode.second; import java.util.ArrayList; import java.util.List; /** * <br> * <b>Function:</b><br> * <b>....

记一次线上Nginx响应超时问题 有更新!

  |   0 评论   |   0 浏览

项目背景 线上有两个项目,分别为 tomcat 项目 A,以及一个 SpringBoot 项目 B,项目 A,使用 Nginx 代理转发。 问题描述 从 A 项目中上传一个 30 秒的视频,通过 HTTP 上传到 B 项目中使用 FFmpeg 对其进行一系列解析等动作,然后返回视频的 CDN 地址。 由于此操作过程一般会耗时 5-6 分钟,在本地和测试环境将 http 请求的超时时间 sockettimeout 设置为 10 分钟,可以正常使用。 但是在生成环境下却发现有时能上传成功,有时却不行。 解决 经过多次测试发现,每次上传失败的处理时长大概都是 5 分钟,由于 HttpClient 代码里面默认设置的是 5 分钟,所以一直导致我认为是修改的配置没有生效。最后修改源码,将超时时间默认值改成 20 分钟,发现还是在 5 分钟左右就报错。 这个时候就可以确定肯定是有其他地方有个 5 分钟设置超时时间导致的。然后跟运维的同事一起分析了下 nginx 配置,发现有个 proxy_read_timeout=300s 的设置,这个时候基本上就已经定位问题原因了。 为了确定问题先在没改配置的时候使用 ip 地址访问上传视频,最后正常处理。然后修改配置为 10 分钟,通过域名访问,结果跟预....

The 9th Week of ARTS:16-3Sum Closest 有更新!

  |   0 评论   |   0 浏览

Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm 3Sum Closest Description Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would have exactly one solution. Example: Given array nums = [-1, 2, 1, -4], and target = 1. The sum that is closest to the targ....

The 10th Week of ARTS:206-ReverseLinkedList 有更新!

  |   0 评论   |   0 浏览

Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm Reverse Linked List Description Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL My Solution package com.silence.arts.leetcode.second; /** * <br> * <b>Function:</b><br> * <b>Author:</b>@author Silence<br> * <b>Date:</b....

常用算法笔记 有更新!

  |   0 评论   |   0 浏览

常用算法笔记 @(公众号)[技术点] 快排 package com.silence.arts.leetcode.second; public class QuickSort { public static void main(String[] args) { int[] array = new int[]{10, 5, 3, 1, 7, 2, 8, 0}; quickSort2(array, 0, array.length - 1); for (int element : array) { System.out.print(element + " "); } } public static void quickSort2(int[] arr, int left, int right) { if (left < right) { int position = position(arr, left, right); quickSort2(arr, left, position - 1); quickSort2(arr, position + 1, right); } } public....

The 11th Week of ARTS:Sort List_148 有更新!

  |   0 评论   |   0 浏览

Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm Sort List Description Sort a linked list in O(n log n) time using constant space complexity. Example 1: Input: 4->2->1->3 Output: 1->2->3->4 Example 2: Input: -1->5->3->4->0 Output: -1->0->3->4->5 My Solution package com.silence.arts.leetcode.list; import java.util.ArrayList; import java.util.List; /*....

The 12th Week of ARTS:LinkedListCycle_141 有更新!

  |   0 评论   |   0 浏览

Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm Sort List Description Given a linked list, determine if it has a cycle in it. My Solution package com.silence.arts.leetcode.list; /** * <br> * <b>Function:</b><br> * <b>Author:</b>@author Silence<br> * <b>Date:</b>2018-10-21 23:50<br> * <b>Desc:</b>无<br> */ public c....

The 13th Week of ARTS:Valid Parentheses_20 有更新!

  |   0 评论   |   0 浏览

Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm Sort List Description Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Note that an empty string is also considered valid. My Solution pa....

The 14th Week of ARTS:LinkedListCycle_142 有更新!

  |   0 评论   |   0 浏览

Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm Linked List Cycle II Description Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. My Solution package com.silence.arts.leetcode.list; import java.util.HashSet; import java.util.Set; /** * <br> * <b>Function:</b><br> * <b>Author:<....

The 15th Week of ARTS:KthLargest Element in a Stream_703 有更新!

  |   0 评论   |   0 浏览

Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm KthLargest Element in a Stream Description Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element. Your KthLargest class will have a constructor which accepts an integer k and an integer array nums, which contains initial elements from the stream. For e....

The 16th Week of ARTS:Sliding Window Maximum_239 有更新!

  |   0 评论   |   0 浏览

Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm Sliding Window Maximum Description Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. Return the max sliding window. My Solution package com.silence.arts.leetcode.stack;....

2018年终总结 有更新!

  |   0 评论   |   0 浏览

2018 年终总结 ​ 2018 年即将过去,一年的时间过的是如此的快,回顾自己这一年,无论是工作还是自身的学习都有很大的进步。 工作回顾 ​ 今年是自己工作的第三年,相对于前两年来说,今年的工作的更加得心应手,因为大部分功能自己都参与重构或者构建完成的;而且今年跟业务的接触更加频繁,很多地方都有了更深层次的认识。以前可能只会关注自己代码写的怎么样,功能是否能完成,现在考虑的更多的是为什么要这么做,更多的从业务的层面上去思考去理解。 ​ 技术都是为了业务服务的,在没有业务场景的前提下,技术再厉害也没有发挥的余地。 ​ 这一年也由于对业务更加熟悉了,对接的人也变多了,不管是业务人员,测试人员还是其他人,遇到问题的时候感觉都会习惯性的找到我,让我帮他们排查问题。加上我这个人本身不怎么会拒绝,往往很多时候会被这些琐事压住,事情本身并不复杂,解决起来也很简单,只能说繁琐,往往自己的事情还需要晚上加班处理。但是从另一个方面来说,责任越大,担子越大,想想为什么他们不去找其他人呢?在自己力所能及的范围里面能帮助到别人还是很开心的。 个人成长 ​ 这一年最大的收获是接触到了很多优秀的人,有强哥的纯洁的微....

2019-03-26-加入Java Geek Tech 有更新!

  |   0 评论   |   0 浏览

Java Geek Tech 一个由纯洁的微笑发起的一个团队,共同维护一个公众号 Java 极客技术(Javageektech)。该公众号主要用来分享 Java 开发的一些技能。 文章的作者都是微笑哥知识星球群友写的,有 Java 基础,有 Java 高级特性,从多线程,JVM 等很多方面的技术,也有一些面试经历。主要帮助群友或者其他人成长。 群友都可以投稿,但是必须写满六篇才能加入的运营团队,目前自己投稿了一篇,还要继续努力。 Java Geek Tech One more thing Personal Medium Home Page: https://medium.com/@zhuxiang134 Personal Website: https://zxsilence.cn/