employer cover photo
employer logo

Kony Interview Question

Given a string, konylabsinterview write a program to return bool if a given pattern matches.pattern example - kon*lab*terview*

Interview Answers

Anonymous

Apr 10, 2015

public class Test{ public static void main(String args[]){ String Str = new String("konylabsinterview"); System.out.print("Return Value :" ); System.out.println(Str.matches("kon(.*)lab(.*)terview(.*)")); } }

1

Anonymous

Sep 18, 2014

Use KMP

Anonymous

Dec 23, 2014

Hi, Please see if you can provide the details of the question posed in the context of binary search tree. Thanks.

Anonymous

Dec 23, 2014

Hi, Please see if you can provide the details of the question posed in the context of binary search tree. Thanks.

Anonymous

Apr 10, 2015

//IsSubstring("Interview Question", "Que") returns true public static bool IsSubstring(string s, string sub) { char[] str = s.toCharArray(); char[] substr = sub.ToCharArray(); int pos,subpos=0; bool check = false; for (pos=0;pos<=str.length();pos++) // for repeating the process of matching the substring across the entire string. { for(subpos=0;subpos