[Top]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://en.wikibooks.org/wiki/Japanese/Transcribing_English_to_Japanese | |
import os | |
import sys | |
sys.path.append(os.path.abspath('./English-to-IPA')) | |
from pykakasi import kakasi | |
import romkan | |
import eng_to_ipa as ipa | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?> | |
<?xml-stylesheet type="text/css" media="screen" href="http://rss.cnn.com/~d/styles/itemcontent.css"?> | |
<rss version="2.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xmlns:media="http://search.yahoo.com/mrss/"><channel> | |
<title>CNN.com</title> | |
<link>http://www.cnn.com/?eref=rss_topstories</link> | |
<description>CNN.com delivers up-to-the-minute news and information on the latest top stories, weather, entertainment, politics and more.</description> | |
<language>en-us</language> | |
<copyright>© 2011 Cable News Network LP, LLLP.</copyright> | |
<pubDate>Thu, 14 Apr 2011 22:18:26 EDT</pubDate> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Set; | |
public class RestoreLotteryNumber { | |
static void restoreLotteryNumbers(String s, List<String> result, Set<String> seen, | |
String number, int count, int index) { | |
if (count > 7) { return; } | |
if (count == 7 && number.length() == (s.length() + 6)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Description: | |
Given a string, find the length of the longest substring T that contains at most k | |
distinct characters. | |
Examples: | |
Input: s = "eceba", k = 2 | |
Output: 3 -- 'ece' is the longest | |
Input: s = "aa", k = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Description: | |
Given a non-empty array of digits representing a non-negative integer, plus one to the | |
integer. The digits are stored such that the most significant digit is at the head of | |
the list, and each element in the array contain a single digit. You may assume the | |
integer does not contain any leading zero, except the number 0 itself. | |
Examples: | |
Input: [1,2,3] | |
Output: [1,2,4] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Description: | |
Given a matrix of m x n elements (m rows, n columns), return all elements of the | |
matrix in spiral order. | |
Examples: | |
Input: | |
[ | |
[ 1, 2, 3 ], | |
[ 4, 5, 6 ], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Description: | |
There is a new alien language which uses the latin alphabet. However, the order among | |
letters are unknown to you. You receive a list of non-empty words from the dictionary, | |
where words are sorted lexicographically by the rules of this new language. Derive the | |
order of letters in this language. | |
- You may assume all letters are in lowercase. | |
- You may assume that if a is a prefix of b, then a must appear before b in the given dictionary. | |
- If the order is invalid, return an empty string. | |
- There may be multiple valid order of letters, return any one of them is fine. |