Write a program in Java to assess a given string whether it complies with following patterns. Return true if a given string complies with these patterns else false. N = N1 + N2 N>= N1 >= N2 where N is the Nth element in the string or element at Nth position; N1 is the (N-1) element in the string & N2 is the (N-2) element in the string. Example 1: 224610 Elements in this string are 2, 2, 4, 6, 10. First Set: 2+2=4 (N2=2; N1=2 & N= 4); Second Set: 2+4=6 (N2=2; N1=4 & N=6); Third Set: 4+6=10 (N2=4; N1=6 & N= 10) Example 2: 1112233558 Elements in this string are 1, 11, 12, 23, 35, 58 Example 3: 1101102203 Elements in this string are 1, 101, 102, 203
Senior Software Engineer Ii Interview Questions
95,624 senior software engineer ii interview questions shared by candidates
What do you understand about micro-services ?
How to find a number is even or odd without using / or % sign
2. Difference between Delegate and Notification?
Name some of the core features of ES6
What would the count for the list of it. public class Test { string Data; int Id; public Test(int id, string data) { Data = data; Id = id; } } static void Main(string[] args) { List<Test> list = new List<Test>(); list.Add(new Test(10, "test")); var d = new Test(10, "test"); if (!list.Contains(d)) list.Add(d); Console.WriteLine("Count of the list is : " + list.Count); Console.ReadLine(); } } What to do to make count 1?
Won't get into specifics more on the coding scenario as it looks like they give the same to everybody, but it's basic and you can write code in any language you want to answer.
How to make a global error class for Retrofit errors?
They give a coding repo 2h prior to the interview, we are allowed to make any changes to the code before the interview and add whatever extra code you want
Why did you leave past organisations? Asked by this HCL Manager.
Viewing 391 - 400 interview questions