๐ŸŒ Apelang Playground ๐Ÿฆ

Apelang Icon

A simulated jungle for the Apelang language. Find the real tribe on GitHub.

Playground Jungle Hackathon

Welcome to the Jungle!

โ–พ

Apelang operates on pure, unadulterated primate instinct. It's simple, it's raw, and it's surprisingly effective. Here are the tools at your disposal.

Note: This playground is a simplified simulation. It supports most of the core syntax but does not include advanced features like summon, forage, inscribe, or tumble/catch blocks.

Core Concepts

  • Variables & Types: Declare with ape. Basic types include number, string, boolean (true, false), and nil.
  • Comments: Use # to leave notes for other apes.
  • I/O: Print to the console with tree and get user input with ask().
  • Thematic Operators: Perform arithmetic with ooh (+), aah (-), eek (*), and ook (/).
  • Functions (Tribes): Group code into reusable blocks with tribe. Use give to return a value.

Data Structures

  • Bunch (Arrays): Create an ordered list of items: ape myBunch = [1, "two", true].
  • Canopy (Maps): Create a key-value store: ape myCanopy = {"food": "banana"}.

Control Flow & Logic

  • Conditionals: Use if/else blocks. Combine conditions with logical operators ripe (AND) and yellow (OR).
  • Loops: Use swing for a set number of repetitions and banana for while-style loops.

The Great Jungle Hackathon

Think your Apelang skills are sharp? Ready to solve some real jungle puzzles? Here's your chance to prove you're the alpha ape and earn some shiny pebbles (or, you know, actual money).

Important: Do not solve these challenges in this playground! It is a simplified simulation and will not work for complex solutions. You must install Apelang locally.

Note: Many of these require a "hacky" solutionโ€”but as long as you can solve it with Apelang, go for it! You're not limited to just these problemsโ€”feel free to tackle even more!

Prerequisites & Tools

To make your hacking easier, we recommend the following:

  • Install Apelang Locally: For the best experience, install the full Apelang compiler.
    git clone https://github.com/duongddinh/apelang.git
    cd apelang
    chmod +x install.sh
    ./install.sh
  • VS Code Extension: If you use VS Code, get the official syntax highlighter for a much better coding experience. Install from Marketplace
  • Helpful Modules: You can use the apebanana package manager to install modules that might aid your quest.
    apebanana install math
    apebanana install string_utils
  • Apelang Documentation: Refresh your knowledge of Ape-speak by visiting the official Apelang docs.

The Challenges

Solve any of the following LeetCode problems using the local Apelang compiler. Your code should be clean, efficient, and well-commented (in Ape-speak, of course).

Array (bunch) & Hash Table (canopy) Problems

  • 1. Two Sum
  • 217. Contains Duplicate
  • 136. Single Number
  • 283. Move Zeroes
  • 169. Majority Element
  • 286. Missing Number

String Manipulation Problems

  • 344. Reverse String
  • 28. Find the Index of the First Occurrence in a String
  • 58. Length of Last Word
  • 14. Longest Common Prefix
  • 383. Ransom Note

๐ŸŒ Earn Your Bananas! ๐ŸŒ

Each valid and correct LeetCode solution gives you a chance to win $3.00 USD.

Send your completed .ape code file as an attachment to support@fragella.com with the subject line "Apelang Hackathon Submission". Include the LeetCode problem number in your email.

Happy hacking, you magnificent primate!