cosmos icon indicating copy to clipboard operation
cosmos copied to clipboard

max frequency character in string

Open Madhupatel08 opened this issue 6 years ago • 3 comments

This is a(n):

  • [ ] New algorithm
  • [ ] Update to an existing algorithm
  • [ ] Error
  • [ ] Proposal to the Repository

Details:

1.Take as input String.

Write a function that print the character with maximum frequency.

Example(To be used only for expected output):

Input: aabbbccccccc

output c note:without using any predefined function Take as input str, a string. We are concerned with all the possible subsequences of str. E.g. “abcd” has following subsequences “”, “d”, “c”, “cd”, “b”, “bd”, “bc”, “bcd”, “a”, “ad”, “ac”, “acd”, “ab”, “abd”, “abc”, “abcd”.

a. Write a recursive function which returns the count of subsequences for a given string. Print the value returned.

b. Write a recursive function which returns an ArrayList of subsequences for a given string. Print the value returned.

c. Write a recursive function which prints all possible subsequences for a given string (void is the return type for function).

Example(To be used only for expected output): Input: abc output 8 [, a, b, ab, c, ac, bc, abc]

c b bc a ac ab abc

Write a function that toggles the case of all characters in the string and then print that String.

Example(To be used only for expected output):

Input: AbCs

output aBcS 1.Take an input N, the size of array. 2.Take N more inputs and store that in an array. 3.Take an input "Target", a number

Write a function which prints all pairs of numbers which sum to target.

Example(To be used only for expected output): Input: 6 3 1 9 7 5 -1 8 Output: -1 and 9 1 and 7 3 and 5 complexity O(n) write a code for this for: 1.Take an input N, the size of array. 2.Take N more inputs and store that in an array. 3.Take an input "Target", a number

Write a function which prints all pairs of numbers whose sum to target. all input will be distinct to each other and no two input will be same.

Example(To be used only for expected output): Input: 6 3 1 9 7 5 -1 11 Output: -1, 3 and 9 -1, 5 and 7 1, 3 and 7 complexity:o(n^2)

Madhupatel08 avatar Apr 12 '20 13:04 Madhupatel08

@arnavb , Please assign me this issue.

vijay-jaisankar avatar Apr 19 '20 14:04 vijay-jaisankar

@arnavb , Please assign me this issue. Will implement in java

anahita-singla avatar May 05 '20 23:05 anahita-singla

please assign me this issue. I will do it in java.

shubha028 avatar May 11 '20 06:05 shubha028