Giter VIP home page Giter VIP logo

jadijadi / practical-programming-practices Goto Github PK

View Code? Open in Web Editor NEW
155.0 8.0 65.0 306 KB

A collection of programming exercises to help you practice your new language

License: MIT License

Python 7.17% Rust 5.10% JavaScript 6.90% PHP 3.85% TypeScript 6.90% C# 5.34% C 9.02% Java 7.68% Go 9.61% Ruby 0.89% Dart 2.00% Common Lisp 8.35% R 1.59% C++ 11.34% Kotlin 1.67% Swift 1.48% Jupyter Notebook 9.92% Julia 0.19% Shell 1.00%

practical-programming-practices's Introduction

Practical-Programming-Practices

A collection of programming exercises to help you practice your new language

If you want to contribute to any of the solutions, please read the CONTRIBUTORS.md first.

practical-programming-practices's People

Contributors

abedi0 avatar abzrg avatar alisharify7 avatar amirkhaksar avatar ariyonaty avatar bkouhi avatar daniel-hnr avatar ehsanghaffar avatar fakher-alavi avatar jadijadi avatar kasrakazemi avatar kehiy avatar mahyarfardin avatar mamad-1999 avatar matinsoleymni avatar mehrdad-mixtape avatar mohammadlashkari avatar mojtabasediqi avatar mostafa-nematpour avatar msython avatar noobforal avatar parham-dev27 avatar qprimee avatar sadeq-yaqobi avatar sajadzirak avatar salar-soltanpoor avatar sina-sparkn avatar thehxdev avatar thenerdone avatar x0der00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

practical-programming-practices's Issues

an Alternative Approach for the "Dizzy"

Dear Jadi,
I am expressing my appreciation for the code you wrote.

The code you gave was well-structured and showed your proficiency. Your efforts to create a simple and effective solution to the problem did not go unnoticed.

Upon reviewing your code, I was impressed with how you populated the 'answer' array based on the keys. It was a concise and memory-efficient approach that delivered the desired output accurately.

Your code inspired me to explore alternative solutions to the same problem. I took a different approach to the task and thought it might be beneficial to share it with you. Here is my code:

s = "T4 l16 _36 510 _27 s26 _11 320 414 {6 }39 C2 T0 m28 317 y35 d31 F1 m22 g19 d38 z34 423 l15 329 c12 ;37 19 h13 _30 F5 t7 C3 325 z33 _21 h8 n18 132 k24"

s_sorted = []

for l in s.split(" "):
    s_sorted.append([
        l[0],
        int(l[1:])
    ])

s_sorted.sort(key=lambda x: x[1])

key = ""

for l in s_sorted:
    key += l[0]

print("Sorted List:", s_sorted)
print("Resulting Key:", key)

breakdown

In this code, I focused on sorting the elements in the keys based on the numeric values following the first character. I used a list called s_sorted to store each element's first character and corresponding numeric value.

After extracting and sorting the elements using a lambda function as the sorting key, I created the key string, which contains the characters from the sorted elements. This ensured that the 'key' line represents the correct order of the features based on the numeric values.

Your code inspired me to make my solution more efficient and capable of handling more extensive input while maintaining simplicity and readability.

If you have any feedback or suggestions about my alternative approach, I'd be glad to hear them from you.

I am looking forward to more coding discussions and sharing ideas in the future.

Best regards,
Alex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.