The Wayback Machine - http://web.archive.org/web/20201115163702/https://github.com/shahkv95/Lilliputian-Codes
Skip to content

This repository contains various use cases / source codes. The task is to shorten the code. In doing so, optimisation / time and space complexity doesn't play any role and can be ignored. The source code needs to be reduced to the least number of characters. Make the code short, shorter, shortest, more shorter, most shortest, and (most) ^ infini…

master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Welcome to the world of Lilliputs of Code 💻


Lilliputians of code

The main aim of this repository is to come down to shortest code snippet. In the process of doing so, one can ignore time and space complexity. Make sure the code works (so that you can drink some coffee) and it has the least characters (as caffeine is not good for health as well).

Repository Directory structure:

  • Root Directory (Lilliputian-Codes)
  • Use Cases
  • Lilliput code files (waiting for you)

Open Source Helpers

Lilliputians

Example of King of Lilliput Code

Print its own source code:

print(open(__file__).read()) 

When the above code will be run in python3, the same code will be the output

  • Output of the program:
print(open(__file__).read()) 

Additional Points 📝

  • Sometimes one-liner codes can be longer than multi-liner in consideration of number of characaters.
  • If you are just copying & pasting it from some source, don't forget to refer & acknowledge the site.
  • NOTE: Refering from some other source is a good practice to improve your code.
  • In some of the use cases, sample code is given. It is just for reference, it's not necessary to shorten that particular code itself if in case if it is an algorithm based usecase. It means that you can use any techniques for use cases like linear search, binary search etc. But in case of a random specific code snippet given, shorten that particular code itself.
  • You can ulter the print commands.
    1. For example: print("Yes, the number is present in the array") can be written as print("Yes") {to decrease count of characters}

Instead of doing this:

tmp = y
y = x
x = tmp

Do this:

x,y=y,x

Instead of:

a = Function_name(value)
print(a)

Do this:

print(Function_name(value))

Rules for raising a PR:

  1. Understand the main aim of the repository.
  2. Fork the repository. You can clone/download the repository as well.
  3. Check the avalaible issues.
  4. Tag the author asking for permission on which you wish to work on.
  5. After getting the approval to work on a particular issue, start working on the issue.
  6. After making the required commits, raise a PR.
  7. Don't forget to refer the issue for which you r raising the PR for.
  8. Wait for the approval.
  9. If there would be any conflicts, you would be inforomed about the same.
  10. If everything seems correct, hurray you have done it.

  • You will get a chance to mention the name of the coffee you like to have.

Star the repository for easy access

A step towards making less caffeine coffee community with Lilliputian code

About

This repository contains various use cases / source codes. The task is to shorten the code. In doing so, optimisation / time and space complexity doesn't play any role and can be ignored. The source code needs to be reduced to the least number of characters. Make the code short, shorter, shortest, more shorter, most shortest, and (most) ^ infini…

Topics

Resources

License

Releases

No releases published

Sponsor this project

Packages

No packages published
You can’t perform that action at this time.