Tagcoding

Asteroid Collision Solution – Leetcode coding challenge

A

The following asteroid collision problem is from Leetcode. The problem We are given an array asteroids of integers representing asteroids in a row. For each asteroid, the absolute value represents its size, and the sign represents its direction (positive meaning right, negative meaning left). Each asteroid moves at the same speed. Find out the state of the asteroids after all collisions. If two...

Fun coding challenge: print the American flag

F

Printing is an important part when programming. Printing the US flag to the system console was a small part of “the shape game” for kids, in which the players will select the correct name for a given shape. The flag of the united states Basic Requirements: You are required to print the American flag to the console using just “*” and “=”. The number of stars...

PetaMinds focuses on developing the coolest topics in data science, A.I, and programming, and make them so digestible for everyone to learn and create amazing applications in a short time.

Categories