import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class Zenoti {
/*Zenoti dotnet software engineer*/
/*Online test : Status pass*/
public static void main1(String args[] ) throws Exception {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
while(n > 0){
String str=sc.next();
Map<character> fhMap=new LinkedHashMap();
for(char ch : str.toCharArray()){
fhMap.put(ch, fhMap.getOrDefault(ch,0)+1);
}
StringBuilder sb=new StringBuilder();
for(char ch : fhMap.keySet()){
sb.append(ch);
sb.append(fhMap.get(ch));
}
System.out.println(sb);
n--;
}
}
public static void main2(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter wr = new PrintWriter(System.out);
String S = br.readLine();
String[] out_ = tokenize_string(S);
for (int i_out_ = 0; i_out_ str=new ArrayList();
StringBuilder sb=new StringBuilder();
for(int i=0;i<chr.length if f="=-1)" str.add sb="new" stringbuilder chr sb.append continue string ans="new" for i="0;i<str.size();i++){" return public static void main3 args throws exception scanner sc="new" int n="sc.nextInt();" while>0){
String str=sc.next();
StringBuilder sb=new StringBuilder();
for(char ch : str.toCharArray()){
if(ch >=65 && ch 0) System.out.print(" ");
for (int j = 1; j 0; j--) System.out.print(j +" ");
System.out.println();
}
}
/*Time :O(2^n) Space :O(1) + (call stack space)*/
public int fib(int n ){
if(n memo){
if(nfMax){
sMax=fMax;
fMax=i;
}else sMax=Math.max(sMax,i);
}
System.out.println(fMax +" , "+sMax);
}
public boolean isAnagram(String s, String t){
int[] asciiArr=new int[256];
/*constraints: without using extra loops & extra hashmaps*/
if(s.length()!=t.length()) return false;
for(int i=0; i<s.length i asciiarr for i:asciiarr if>0) return false;
return true;
}
/*sql*/
}
</s.length></chr.length>登录后复制
结果:未选择
以上就是Zenoti SDE-面试经历(4)的详细内容,更多请关注php中文网其它相关文章!
RichardTrugs9 天前
发表在:Java webservice多个参数怎么调用https://t.me/s/TgWin...
Charlesunwip11 天前
发表在:Java webservice多个参数怎么调用https://t.me/s/onewi...
Melvinhaf1 个月前
发表在:07日27日,星期日,在这里每天60秒读懂世界!Get Blockchain Insur...
JosephAnype1 个月前
发表在:07日24日,星期四,在这里每天60秒读懂世界!Get answer on your q...
CurtisPoozy2 个月前
发表在:关于我们Некоторые вебмастера...
Tommypoike4 个月前
发表在:关于我们hi
AmandaIncaboraa5 个月前
发表在:关于我们"我很想找出激励你的东西。 和我聊天 h...
AmandaIncabora25 个月前
发表在:关于我们我在等你的留言! 过来打个招呼! ...
AmandaIncaborac6 个月前
发表在:关于我们让我们今晚难忘...你的地方还是我的? ...
BryanDen7 个月前
发表在:关于我们Самый быстрый и безо...