## String to Integer (AtoI – ASCII to Integer)

Objective: Implement atoi, which converts string to an integer. Rules for converting string to an integer. If the string is null or empty, Integer will be 0. The first character of string may represent...

Skip to content
# Tagged: Beginner

##
String to Integer (AtoI – ASCII to Integer)

##
Find all Prime Numbers less than equal to N | Set 1

##
Find third largest element in a given array

##
Find duplicates Characters in the given String

##
Sum of all Unique elements in a given array

##
Java program to find the largest element in array

##
Find three smallest elements in a given array

##
Stack Java Class – Explained

##
Infix, Postfix and Prefix Notations/Expressions

##
Count Set bits in a given Number

##
Check if array contains all unique or distinct numbers.

##
Product of all Unique elements in a given array.

##
Reverse a given number – Java Code

##
Check if given number is perfect square – O(√N) Solution

##
Find first three largest elements in a given array

@tutorialhorizon

Objective: Implement atoi, which converts string to an integer. Rules for converting string to an integer. If the string is null or empty, Integer will be 0. The first character of string may represent...

Objective: Given a number N, Write a program to find all prime numbers which are between 0 and N. Prime Number : A prime number is a natural number that has exactly two distinct...

Objective: Given an array of integers, write an algorithm to find the third largest element in the array. Example: Int [] a = { 6, 8, 1, 9, 2, 1, 10} Output: Third largest...

Objective: Given a string, write an algorithm to find all the duplicate characters in the string and print its count. Example: Input String: tutorial horizon Output: Duplicate Characters: r – 2 t – 2...

Objective: Given an array of integers that contains duplicates as well. Write a program to find the sum of all unique elements in the array. This problem is also referred to as find the...

Objective– Given an array of numbers, write a java program to find the largest element in the given array. Example: int [] a = {1, 5, 3, 9, 2, 8, 2} Largest Element: 9...

Objective: Given an array of integers, write an algorithm to find the three smallest elements in the array. Example: Int [] a = { 6, 8, 1, 9, 2, 10}; Output: 1, 2, 6...

Earlier we saw about Stack and its implementation using Linked List. Java has a built in class for Stack. In this article we will discuss about it in detail. First brief about Stack. What...

Infix, Postfix and Prefix notations are most common ways of writing expressions. Infix notation: Example: (A+B) Infix notation is commonly used in arithmetic formula or statements, the operators are written in-between their operands. An...

Objective: Given a Number, find all the set bits in that number. Example: Number: 23 Set bits: 4 (10111) Number: 15 Set bits: 4 (1111) Number: 21 Set bits: 3 (10101) Approach: Check the...

Objective: Given an array of integers, write a program to check if array contains all unique numbers. Example: Integer [] arrA = { 1, 2, 3, 6, 4, 9, 8}; Output: Array has all...

Objective: Given an array of integers which contains duplicates as well. Write a program to find the product of all unique elements in the array. This problem is also referred as find the product...

Objective: Given a number, write a java program to reverse a number Example: Given Number: 1234 Output: 4321 Given Number: 1020 Output: 201 Approach: Using loop Keep divide the number by 10 and add...

Objective: Given a number, write a program to check if given number is perfect sqaure. Example: N = 16 Output: True N = 32 Output: False Approach: Naive Approach: If N = 1 return...

Objective: Given an array of integers, write an algorithm to find the first three largest elements in the array. Example: Int [] a = { 6, 8, 1, 9, 2, 1, 10}; Output: 10,...

%d bloggers like this: