Frage im Vorstellungsgespräch bei Urjanet

In managerial Round write a method for finding substring which has specific given length

Antworten zu Vorstellungsgespräch

Anonym

24. Juli 2017

eg: str.substring(0,givenlength); str.substring(8,givenlength); str.substring(3,givenlength);

1

Anonym

24. Juli 2017

Merge 2 array: create a merge method. int a[]=new int[]{1,2,3}; int b[]=new int[]{4,5,6}; int c[]=merge(a,b); for(int i=0;i

5

Anonym

24. Juli 2017

count the no of each element present in the array: import java.util.*; public class Solution{ public static void countNumber(String input) { HashMap map=new HashMap(); char ch[]=input.toCharArray(); for(char c:ch) { if(map.containsKey(c)) { map.put(c,map.get(c)+1); } else { map.put(c,1); } } System.out.println(map); } public static void main(String args[]) { String input="1212345456"; countNumber(input); } }

1