/** * 千分位方法 * @param text * @return */ public static String fmtMicrometer(String text) { DecimalFormat df = null; if(te...
分类:
编程语言 时间:
2015-07-10 18:13:35
阅读次数:
202
bool IsUgly(int number)
{
while (number % 2 == 0)
number /= 2;
while (number % 3 == 0)
number /= 3;
while (number % 5 == 0)
number /= 5;
return (number == 1) ? true : false;
}
接下来只需要按顺序判断每...
分类:
其他好文 时间:
2015-07-10 16:49:26
阅读次数:
117
char FirstNotRepeatingChar(char* pString)
{
if (pString == NULL)
return '\0';
const int tableSize = 256;
unsigned int hashTable[tableSize];
for (unsigned int i = 0; i
hashTable[i] = 0;
char* ...
分类:
其他好文 时间:
2015-07-10 16:40:59
阅读次数:
106
题目:
Merge k sorted
linked lists and return it as one sorted list. Analyze and describe its complexity.
题意:
合并 K 个有序的链表,把他们合并成为一个有序链表。分析并描述它的复杂度。
算法分析:
先将k个链表转化为数组,合并,之后利用Collections.sort()排序。...
分类:
编程语言 时间:
2015-07-10 15:26:45
阅读次数:
113
49 Anagrams链接:https://leetcode.com/problems/anagrams/
问题描述:
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.Hide Tags Hash Table Strin...
分类:
其他好文 时间:
2015-07-10 15:25:09
阅读次数:
130
#include
#include
using namespace std;
long long a[55] = {0,3,6};
long long b[55] = {0,0,0,6};
long long int fun(int x);
long long int funa(int x);
long long int fun(int x){
if(a[x]) return a[x];
...
分类:
其他好文 时间:
2015-07-10 15:13:53
阅读次数:
101
/** * 生成数据文件 * * @param filePath 写入文件的路径 * @param content 写入的字符串内容 * @return */ public boolean writerFile(String content, String url) { bo...
分类:
其他好文 时间:
2015-07-10 15:01:11
阅读次数:
135
要求:求二进制数中1的个数解法1:除、余操作 最常见的方法:使用相除判断余数的方式来进行分析,若求模2 为1,则证明是1,求模2 为0,证明该二进制位置上面的0;/** * 计算二进制中1的个数 O(log2V) * @param v 10进制的数字 * @return 二进制中1的个数...
分类:
其他好文 时间:
2015-07-10 15:00:25
阅读次数:
85
var opt_sex = { theme: 'ios', lang: 'zh', formatValue: function (d) { return d.join(','); }, customW...
分类:
其他好文 时间:
2015-07-10 14:56:14
阅读次数:
118
首先列出几个简单的信息#pragma makr- app版本-(NSString *)getVersionCode{ NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; return [infoDic...
分类:
移动开发 时间:
2015-07-10 14:54:20
阅读次数:
126