归档 2016年10月

Java Swing绘制正弦/余弦波形图

下面的Java代码实现了正弦、余弦波形图的绘制,main方法位于DataWindow.java中。

DataPanel.java

import java.awt.Color;
import java.awt.Graphics;
import java.text.DateFormat;
import java.util.ArrayList;

import javax.swing.JPanel;

public class DataPanel extends JPanel {

    private static final long serialVersionUID = -9039511286331044798L;

    private int index ...

继续阅读

[LeetCode]All O`one Data Structure

题目描述:

LeetCode 432. All O`one Data Structure

Implement a data structure supporting the following operations:

  1. Inc(Key) - Inserts a new key with value 1. Or increments an existing key by 1. Key is guaranteed to be a non-empty string ...

继续阅读

LeetCode Weekly Contest 9解题报告

LeetCode Weekly Contest 9是LeetCode举办的第八场正式周赛,共4道题目,比赛时长2.5小时。

比赛链接:https://leetcode.com/contest/leetcode-weekly-contest-9/

题解列表:

LeetCode 422. Valid Word Square

LeetCode 423. Reconstruct Original Digits from English

LeetCode 424. Longest Repeating Character Replacement

LeetCode 425. Word Squares

[LeetCode]Longest Repeating Character Replacement

题目描述:

LeetCode 424. Longest Repeating Character Replacement

Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Find the length of a longest substring containing ...

继续阅读

每日归档

上个月

下个月

归档