Objective: Given an array of bird sighting where every element represents a bird type id, determine the id of the most frequently sighted type. If more than 1 type has been spotted that maximum amount, return the smallest of their ids.
The Objective: A person wants to determine the most expensive computer keyboard and USB drive that can be purchased with a give budget. Given price lists for keyboards and USB drives and a budget, find the cost to buy them. If it is not possible to buy both items, return -1.
The Objective: There is a large pile of socks that must be paired by color. Given an array of integers representing the color of each sock, determine how many pairs of socks with matching colors there are.
Objective: You are choreographing a circus show with various animals. For one act, you are given two kangaroos on a number line ready to jump in the positive direction (.i.e. toward positive infinity);
You have to figure out a way to get both kangaroos at the same location…
Today I will be discussing how I solved, The Pads, Hacker Rank Challenge using Oracle SQL.
Query an alphabetically ordered list of all names in OCCUPATONS, immediately followed by the first letter of each profession as a parenthetical.
For example: AnActorName(A), ADoctorName(D),AProfessorName(P), and ASingerName(S).
There are total of [occupation_count] [occupation]s.
where [occupation_count] is the number of occurrences of an occupation in OCCUPATIONS and [occupation] is the lowercase occupation name. …
Today I will be going over how I solved the Hacker Rank Challenge, Binary Tree Nodes, using SQL.
The Objective is to write a query to find the node type of Binary Tree ordered by the value of the node. Output one of the following for each node.
Root: if node is root node
Leaf: if node is leaf node
Inner: if node is neither root nor leaf node
BST table contains two columns: N and P, where N represents the value of a node in Binary Tree, and P is the parent of N.
Today I will be reviewing how I solved the Hacker Rank Challenge, Weather Observation Level Medium, using SQL.
The Objective is to Query the median of the Northern Latitudes(Lat_N) from STATION and round the answer to 4 decimal Places.
Fields — Type
(ID — Number,
CITY — Varchar2,
STATE — Varchar2,
LAT_N — Number,
LONG_W — Number)
I used the medium function, which finds the middle values in a list of numbers. Then I used the round function to round to the nearest decimal place.
This is what the final results will look like.
This was another fun challenge and I can’t wait to solve it using other languages. Until next time!
There is a really cool challenge on Hacker Rank called ‘Ollivander’s Inventory’. It is of medium difficulty and you can use various languages to solve the problem. I chose to solve this problem in language I’m very familiar with, SQL (Oracle).
The Objective is Hermione decides the best way to choose a wand for Ron Weasly is by determining the minimum number of gold galleons needed to buy each non-evil wand of high power and age.
Write a query to print the id, age, coins_needed, and power of the wands that Ron’s interested in, sorted in order of descending power…
Highly organized & motivated Software Engineer with an application analyst/data analyst background.