在吃飯聽到這首歌,很喜歡主唱細膩的聲線,MV在說男女遇到災難時的反應,但我想是在說更普羅大眾的-當感情遇到考驗時你還會選擇繼續相信對方嗎?
155. Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
push(x) – Push element x onto stack.
pop() – Removes the element on top of the stack.
top() – Get the top element.
getMin() – Retrieve the minimum element in the stack.
Example 1:
1 | Input |
Explanation
1 | MinStack minStack = new MinStack(); |
328. Odd Even Linked List
Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.
You should try to do it in place. The program should run in O(1) space complexity and O(nodes) time complexity.
Example 1:
1 | Input: 1->2->3->4->5->NULL |
Example 2:
1 | Input: 2->1->3->5->6->4->7->NULL |
資料結構與演算法
ヨルシカ-パレード
最近上班聽日文歌發現有首不錯聽,小提琴聲讓人感受到油然而生的希望,Shvara吵著說要學,所以就來研究一下。
這首歌在說走到跟男朋友一起經過的大街,想到以前種種,景物依舊,人事已非,但還是因為不想忘記這段回憶而掙扎。[加油啊(吶喊
我想這種感覺就是物の哀れ吧。