Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Interview-Questions 2. Given a string and a number ?n?, find the ?n?th distinct repeating character.

Have Programming Question? Ask it here!
 
 
 


nisanth
2. Given a string and a number ?n?, find the ?n?th distinct repeating character.
2 Answer(s)      3 years and 3 months ago
Posted in : Java Interview Questions


  1. Given a string and a number ?n?, find the ?n?th distinct repeating character. For example, Input: Abracadabra, 1 Abracadabra, 2 Abracadabra, 3 Abracadabra, 4

Output a b r null


Advertisement
View Answers

April 28, 2011 at 5:27 PM


Please let me know what is n here? And the values 1,2,3,4 represents what?



April 28, 2011 at 7:06 PM


in exam he given me like this

--> Given a string and a number â??nâ??, find the â??nâ??th distinct repeating character.

For example, Input:

Abracadabra, 1

Abracadabra, 2

Abracadabra, 3

Abracadabra, 4

Output

a

b

r

null



Related Tutorials/Questions & Answers:
2. Given a string and a number ‘n’, find the ‘n’th distinct repeating character.
2. Given a string and a number ?n?, find the ?n?th distinct repeating character.    Given a string and a number ?n?, find the ?n?th distinct repeating character. For example, Input: Abracadabra, 1 Abracadabra, 2 Abracadabra, 3
plz give me program to this: Given a string and a number ‘n’, find the ‘n’th distinct repeating character.
plz give me program to this: Given a string and a number ?n?, find the ?n?th distinct repeating character.    Given a string and a number ?n?, find the ?n?th distinct repeating character. For example, Input: Abracadabra, 1
Advertisements
find the given input is integer or string
find the given input is integer or string  simple coding for to check the given input value is integer or no.If the given value is integer display... CheckValue { public boolean checkIfNumber(String in) { try
find all unique character in string using java
find all unique character in string using java  example: hello how are you. output should be waryu
Replace Character in String
in a given string. To replace a character with the given character in sting first... find then replace the "oldChar" with newChar (character name to replace...;String before  repalce\n"+string);   while(i<
Find number of words begin with the specified character
Count number of words begin with the specified character In this section, you... character from the string. To do this, we have allowed the user to input a sentence or a string and a character to search. Using StringTokenizer class, we have break
In data structure in java how to parse the given string and counts the member of character that match the given data?
In data structure in java how to parse the given string and counts the member of character that match the given data?  Design a parser that parse the given string and counts the member of character that match the given data.using
Find Character form String example
() method to find out the character in the string with the help of index position... .style1 { font-size: medium; } Find characters from String example in Action Script3:- String maintain a index position for every character
Write a method which will remove any given character from a string?
Write a method which will remove any given character from a string? In this example we will describe remove any given character from a string.... Example of remove any given character from a string
Write a program to find a factorial in any given number
Write a program to find a factorial in any given number This programming tutorial will teach you how to write a factorial of any given number... number less than or equal to n. For example  4! = 4 * 3 *2 * 1
java program
java program  Given a string and a number n, find the n th distinct repeating character
Find out the prime number
to find out whether a given number is prime or not. Here we have used the 'for loop' statement and given the required condition for a prime number. As we know... Find out the prime number      
find the first character is vowel or not
find the first character is vowel or not  hi friend, can u plz send me javascript code for find the wether the first character is a vowel or not. 2) check wether the last character is same as the first character or not 3) check
Write a java program that encrypt and decrypt some string by adding or removing 2 on each character.
2 on each character.  Write a java program that encrypt and decrypt some string by adding or removing 2 on each character. Example 1 : Please Enter Your String : Mamoun Please Enter Your Choice : 1. Encryption. 2. Decrypt ion
java
java  Given a string and a number ?n?, find the ?n?th distinct repeating character. For example, Input: Abracadabra, 1 Abracadabra, 2 Abracadabra, 3 Abracadabra, 4 Output: a b r null
J2ME count character into string
J2ME count character into string  i am new in J2ME, my problem is how to count character into number, i had been research google for almost 2 days... Next cmd button, next pages will display ans:10 character erm...these 2 days
Find out last character of array
Find out last character of array  How we can find out the last character of array in java program
Primary number
); System.out.print("Enter N:"); int n=input.nextInt(); find(n); } static void find(int n){ int i=0,count=2; if(n==1) { return; } if(n==2) { return
Primary number
); System.out.print("Enter N:"); int n=input.nextInt(); find(n); } static void find(int n){ int i=0,count=2; if(n==1) { return; } if(n==2) { return
Writes the given character into buffer at the given index.
Writes the given character into buffer at the given index. In this tutorial you will see how to write the given character into buffer at the given index. The put (int index, char c) allow to write a character at particular index
how to find the eigenvalue and eigenvector of n*n matrix in java
how to find the eigenvalue and eigenvector of n*n matrix in java  I m the new beginner in java and want to find eigenvalue and eigenvector of n*n matrix.where n is vary from n=4,5,6...... pls help me that would be appreciable
How to display string or character
How to display string or character  how to print character or a word without using array concept
how to find inverse of n*n 2d array in java
how to find inverse of n*n 2d array in java  I reached upto code of printing the matrix as: Assume that matrix is square matrix where row=column code is: public class ReadContents{ public static void main(String args
count the repeated character in one string
count the repeated character in one string  to find the how character occurrence in one String (for example the string is -java means there is 2... java.util.*; class CountCharacters { public static void main(String[] args) throws
How to round a number to n decimal places in Java
How to round a number to n decimal places in Java  How to round a number to n decimal places in Java
how to find the given date is sunday
how to find the given date is sunday  how to find the given date... java.util.*; import java.text.*; class CheckDay{ public static void main(String...(); SimpleDateFormat f = new SimpleDateFormat("EEEE"); String day
Removing character from a string in sql.
Removing character from a string in sql.  How to remove or replace character from a string
extracting phone number n storing in excel
extracting phone number n storing in excel  i need a program to open a doc file n extract phone numbers from it and store it in a excel sheet?? plz do reply and help me out with the problem
extracting phone number n storing in excel
extracting phone number n storing in excel  i need a program to open a doc file n extract phone numbers from it and store it in a excel sheet?? plz do reply and help me out with the problem
A program to find the sum of odd number
A program to find the sum of odd number In this section you will learn how to find the sum of odd number in the series up to the given number in java...=sin.nextInt(); for(int i=1;i<n;i++) { if(i%2!=0) sum=sum+i
program on factorial of a given number in java
program on factorial of a given number in java  please tell me, how to write program on factorial of a given number in java
program on factorial of a given number in java
program on factorial of a given number in java  please tell me, how to write program on factorial of a given number in java
Compare String with given String arraylists.
Compare String with given String arraylists.  I have one String for example abcThirtyFour. i have two arraylists of string. one contains one, two.... i was thinking of comparing given string with both the arraylists. but, i
Removing character from a string in sql.
Removing character from a string in sql.  Removing special characters from a string in sql
Get Character from String
Get Character from String     .... Description of the code: 1. First declare and initialize string. 2. use method toCharArray() to convert string to character array. 3. Retrieve character from
Java: String Exercise 2
Java: String Exercise 2 Name ______________________ Assume the following: String s, t, h, a; String n, e; int i; h = "Hello"; s = " How are you...("c") 19__________"a".compareTo("A") 20__________s.trim().charAt(2) String
Determining the Character Boundaries in a Unicode String
Determining the Character Boundaries in a Unicode String In this section,  you will learn how to determine the character boundaries in a string. By determining the character boundaries, you will be able to break the string
Find Successively Repeated Character using Java
Find Successively Repeated Character using Java In this section, we are going to find the successively repeated character using Regular Expression...;Main_Class{ public static void main(String[] args
MySql find and replace string
MySql find and replace string  How to find and replace string or special characters in MySql & PHP?   Find and Replace String PHP $result = preg_replace('/\band\b/i', 'foo', $subject
Java Remove a character from string
to remove a particular character from the string. In the given example, we have...Java Remove a character from string In this tutorial, you will learn how to remove a character from the string. There are several methods for examining
String Exercise 2 - Answers
Java: String Exercise 2 - Answers Name ______________________ Assume the following:> String s, t, h, a; String n, e; int i; h = "Hello"; s = " How are you? "; a = "abc"; n = null; e = ""; Give the values of the following
servlet code for finding the table for given number
servlet code for finding the table for given number  servlet code for finding the table for given number?   Here is a an example...="../TableServlet"> <table> <tr><td>Enter a number to find its table:<
Convert string into character array
Description: This tutorial demonstrate how to convert a string into array of char. The toCharArray() method converts string to a new character array...;{   public static void main(String[] args) {  
PHP get character from String
PHP Get Character From String To get sub string from a String we can use substr() method. Structure of this method is : string substr (string $var..., 2); $d = substr($string, 50); $e = substr($string, 5, 4); $f = substr
Count distinct value in HQL.
?   count(distinct fieldName) returns number of distinct value... = sessionFactory.openSession(); String countHql = "Select count(distinct salary..._ from employee employee0_ Number of Employee having distinct salary : 3
how to find largest number? - Java Interview Questions
how to find largest number?  this is my java coding: import...); } } i don't know how to add code to find the largest number.. please help... want to find the greater number which user enter on the console? Thanks
Help me on the given problem of String
Help me on the given problem of String  class Test { string s1="Hello",s2="lo"; System.out.println((s1=="Hel"+"lo")); System.out.println((s1=="Hel"+lo)); } The above program prints true
Repeating Rows And Column
repeating rows and column   ...; and then by use of setRepeatingRowsAndColumns() method we create the repeating rows... HSSFWorkbook.   In this example we are going to create a sheet and set repeating
USE ARRAY TO FIND THE LARGEST NUMBER AND OCCURRENCE
USE ARRAY TO FIND THE LARGEST NUMBER AND OCCURRENCE  i have some... it is: write a program that reads 10 numbers from the keyboard. find the largest number and count the occurrence of the largest number number entered from the keyboard
STRUTS 2 Could not find action or result
STRUTS 2 Could not find action or result  hiii..i am new to struts 2... on my log: WARNING: Could not find action or result There is no Action... where application_id in (select distinct application_id from applicationmenu
 

 

 

DMCA.com