Skip to content

Latest commit

 

History

History

Coding Problems

Problems to be solved (Try these problems with collections)

  1. Given a list of integers, find out all the even numbers exist in the list
  2. Given a list of integers, find out all the numbers starting with 1
  3. How to find duplicate elements in a given integers list in java
  4. Given a list of integers, find the maximum/minimun value element present in it
  5. Given a String, find the first non-repeated character in it
  6. Given a String, find the first repeated character in it
  7. Given a list of integers, sort all the values present in it
  8. Given a list of integers, sort all the values present in it in descending order

Nov 16 prbs

  1. Count Characters in the String
"Java is awesome"

J -> 1
a -> 3
v -> 1
i ->1 
s -> 2
w -> 1
e -> 2
o -> 1
  1. Reverse the last half

Input: Apple -> length = 5 -> odd -> last half = ple -> reverse = elp

output: Apelp

Input: Bank -> length = 4 -> even -> last half = nk -> reverse = kn

output: Bakn

  1. Print unique numbers in the list/array

Input: 1, 2, 3, 2, 4, 1, 4

Output: 3 (becoz 3 occurred only one time)

Input: 1, 2, 3, 4, 4, 3

Output: 1 2 (becoz 1 and 2 occurred only one time)

  1. Caps Vowels

Input: porkodi Output: pOrkOdi

(make vowels to the captails letter)

Nov 17

  1. find first repeated char in a string
"Java is awesome"

J -> 1
a -> 3

output: a

"Im from chennai"

output : i
  1. find first non repeated char in a string
"Java is awesome"

output: J

"Im from chennai"

output : f