由买买提看人间百态

topics

全部话题 - 话题: wordlength
(共0页)
c********l
发帖数: 8138
1
来自主题: JobHunting版 - Leetcode的系统真是弱爆了
//MITBBS' article system will mess up the source code
// You may probably need to re-arrange the line breaks
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class Solution {

public static void main(String[] args) {
Solution sol = new Solution();
String[] dictStrArr = new String[] {
"dose","ends","dine","jars","prow","soap","guns","hops","
cray","hove","ella","hour","lens","j... 阅读全帖
c********l
发帖数: 8138
2
简洁不是最终极的目标,有时候需要reduce runtime complexity
见我之前写的
http://www.mitbbs.com/article/JobHunting/32658475_3.html
//MITBBS' article system will mess up the source code
// You may probably need to re-arrange the line breaks
// by coupondeal@mitbbs
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class Solution {

public static void main(String[] args) {
Solution sol = new Solution();
String[] dictStrA... 阅读全帖
n**********s
发帖数: 9
3
来自主题: JobHunting版 - text justification 有人ac吗
看看你漏了什么
public class Solution {
public ArrayList fullJustify(String[] words, int L) {
ArrayList result=new ArrayList();
ArrayList currentLine=new ArrayList();
int i=0;
while(i currentLine=new ArrayList();
int len=0;
int wordLength=0;
int wordCount=0;
do {
len+=words[i].length()+1;
wordLength+=words[i].lengt... 阅读全帖
j**7
发帖数: 143
4
来自主题: JobHunting版 - A家on-site SDE 杯具
Amazon的第四道面试题跟CodeEval上面的一道题几乎一样。可惜面试的时候没有检查到
bug.
https://www.codeeval.com/open_challenges/59/
public class Main {
/**
* @param args
*/
static StringBuilder build=new StringBuilder();
public static void main(String[] args) {
// TODO Auto-generated method stub

telephone("4155230");
}
static void telephone(String input)
{
telephone(input,0,"");
build.deleteCharAt(build.length()-1);
System.out.println(build.toString());
}
... 阅读全帖
z*****n
发帖数: 7639
5
来自主题: EE版 - 怎么产生随机数?
You cannot get digit every cycle, every cycle produces
ONLY one bit.
Accept/reject is better if wordlength is short. Say if
you need digits 0-9(or 1-10), you can run 4 cycles and
get a 4-bit random number. Then accept only the ones
you are interested.
g*****d
发帖数: 210
6
请问大家
一般digital filter里怎么决定wordlength跟SNR??
比如说一个half band decimation filter, fin=fs/8
有5个17-bit multiplier, 16-bit input data
这样snr怎么算
thanks a lot & happy new year
(共0页)