New Programming Language for DSA
Source: Dev.to
Introduction
Wolf is a new programming language (version 0.1.2) created by a recent B.Tech graduate. It is built using Python and distributed via PyPI, offering a dedicated API for the language. Wolf aims to be easier to use than Python and is designed to be DSA‑friendly, providing built‑in functions for common data‑structure and algorithm patterns.
Installation
pip install wolf1
Running Wolf Programs
You can execute a Wolf source file (.wolf) in two ways:
wolf filename.wolf
or
python -m wolf.main filename.wolf
Features
- Conditional statements and OOP support.
- DSA‑friendly: built‑in functions for 18 common patterns (e.g., two‑pointer, sliding window, binary search, graphs, heap, linked list).
- Indentation‑free syntax: no need for tab/space indentation after conditional statements, unlike Python.
- Convenient one‑liner functions that encapsulate algorithmic logic.
Example Functions
| Function | Description |
|---|---|
findanagram(string) | Returns anagrams of the given string. |
getdfs() | Performs a depth‑first search on a graph. |
heap(elements, k) | Retrieves the top k elements using a heap. |
fibonacci(i) | Computes the i‑th Fibonacci number. |
| … | Many more built‑in utilities are available. |
Syntax Overview
A concise syntax guide is available in the author’s LinkedIn post:
Download
You can obtain Wolf from the following URL: