All Questions
7 questions
2
votes
1
answer
493
views
CCC '19 S5:Triangle: The Data Structure
This problem is from [CCC2019]: https://dmoj.ca/problem/ccc19s5/ (Canadian Computing Contest 2019) and I have implemented it in C++.
I used sequence [A054237]: https://oeis.org/A054237/table to ...
4
votes
3
answers
426
views
Find the first missing positive integer in an array of integers
The problem is the one explained in Given an unsorted integer array, find the first missing positive integer
Given an unsorted integer array, find the first missing positive
integer.
For ...
3
votes
2
answers
522
views
Non repeating character in Java
Given a string s consisting of lowercase Latin Letters, find the
first non repeating character in s.
Input:
The first line contains T denoting the number of testcases. Then
follows ...
1
vote
2
answers
966
views
Star Elements implementation in Java
Given an unsorted array. The task is to find all the star and super
star elements in the array. Star are those elements which are strictly
greater than all the elements on its right side. Super ...
2
votes
2
answers
521
views
Greater on the right side in Java
Given an array of integers, replace every element with the next
greatest element (greatest element on the right side) in the array.
Since there is no element next to the last element, replace it ...
2
votes
2
answers
7k
views
Program to shorten URL and decode it back to get original URL
TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL.
Design the encode and ...
2
votes
1
answer
721
views
Max Increase to Keep City Skyline in Java
In a 2-dimensional array grid, each value grid[i][j] represents the height of a building located there. We are allowed to increase the height of any number of buildings, by any amount (the amounts can ...