原创 RabbitMQ從入門到精通----交換器詳解

RabbitMQ交換器詳解 正如我們所理解的,當我們發送消息到RabbitMQ中,它的流程爲: 發送到交換器 交互器根據Routing key(路由鍵)發送至相關隊列 在RabbitMQ中一共提供四種交換器(Exchange)

原创 求數組中兩個元素加起來等於指定的數

1.問題描述 Given an array of integers, return indices of the two numbers such that they add up to a specific target. Y

原创 7. Reverse Integer

問題 Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input

原创 mysql寫入中文亂碼

MySql系列:中文寫入數據庫出現錯誤java.sql.SQLException: Incorrect string value: ‘\xE5\xxxx’ for column ‘xxxx’ at row 1及其解決方法 在將kft-a

原创 Next Greater Element I

1.問題描述 You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find a

原创 122. Best Time to Buy and Sell Stock II

問題 Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find

原创 122. Best Time to Buy and Sell Stock II

問題 Find the largest palindrome made from the product of two n-digit numbers. Since the result could be very large, yo

原创 53. Maximum Subarray

問題 Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For examp

原创 67. Add Binary

問題 Given two binary strings, return their sum (also a binary string). For example, a = “11” b = “1” Return “100”. 描

原创 java源碼RandomAccess

package java.util; /** * Marker interface used by <tt>List</tt> implementations to indicate that * they support fa

原创 設計模式-----觀察者模式

觀察者模式 定義 觀察者模式(又被稱爲發佈-訂閱(Publish/Subscribe)模式,屬於行爲型模式的一種,它定義了一種一對多的依賴關係,讓多個觀察者對象同時監聽某一個主題對象。這個主題對象在狀態變化時,會通知所有的觀察者對象,使他

原创 122. Best Time to Buy and Sell Stock II

問題 Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Given a =

原创 136. Single Number

問題 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm

原创 求整數可以被自身的各個位進行整除

1.問題描述 問題解決 主要爲對left與reght進行遞增遍歷 class Solution { public List<Integer> selfDividingNumbers(int left, int right) {

原创 Longest Uncommon Subsequence I

1.問題 Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The