krahets/hello-algo

Code Transpilation to multiple progamming languages (Help Wanted)

krahets opened this issue · 61 comments

Tip

We seek help translating the code from one programming language to another.
Feel free to contribute in programming languages not listed here, such as PHP, R. Ruby, Kotlin, etc.

Contributing Guideline

  • Select a reference language: Python or Java are the preferred reference languages since their codebase has been thoroughly tested.
  • Maintain code consistency: Align your code structure, naming conventions, and comments with those in the reference language to minimize discrepancies.
  • Test the code: Ensure your code produces the same output as the reference code. Recommend utilizing tools like Diffchecker to compare the outputs.
  • Format the code: Before opening the pull request, check your code formatting against existing chapters for consistent indentation, comment style, and naming conventions. Standard code formatting tools are recommended.
  • PR examples:

Code Reviewers

If you have extensive programming experience and are interested in reviewing code, please reach out via WeChat at krahets-jyd . We dedicate our thanks to all code reviewers on the landing page and of this project.

Language Reviewer
Java @krahets
C++
Python @krahets
Go #222 @Reanon
JavaScript #120 @justin-tse
TypeScript #121 @justin-tse
C# @hpstory
C #425 @Gonglja
Swift @nuomi1
Rust @night-cruise
Ruby @khoaxuantu
Dart @gvenusleo
Kotlin @curtishd
Zig @codingonion

I can help translate part of C

I can help translate part of C

Thanks, @kalaersun ! Looking forward to your code.

I can help translate part of go about "Array and Linked List" and "Sorting"

I can help translate part of go about "Array and Linked List" and "Sorting"

Thanks, @lkgGitHub !

Please get in touch with @Reanon as maybe he is working on the remaining Go codes.

(You can check codes at https://github.com/krahets/hello-algo/tree/master/codes/go compared with .../master/codes/java)

I can help translate part of go about "Array and Linked List" and "Sorting"

@lkgGitHub, You can do it! Chapter Array/LinkedList or Sorting are available. If you pull request, i will review you golang code. Beside, before you pull request, you should check if other pull request to Golang code. Thank you for participating in Golang Translation😁.

I can help translate part of TypeScript

I will try to translate the part of Array and Linked List.

I think I can translate the remaining part of Chapter Array and LinkedList to JavaScript.

msk397 commented

I can help translate the part of Insertion Sort and Quick Sort to Go

I can translate the part of Sorting to TypeScript.

I can help translate part of C# start with Array.

I can help translate part of Go

I can translate the Chapter of Tree to TypeScript.

msk397 commented

Can I help translate the Chapter of Hashing using C++, Python and Go ? I find that nobody seems to have done this part

Can I help translate the Chapter of Hashing using C++, Python and Go ? I find that nobody seems to have done this part

Feel free to create a pull request. I will add your ID to the form.

请问C语言部分我可以一起进行创作吗?

请问C语言部分我可以一起进行创作吗?

@huawuque404 非常欢迎!请阅读本文 contribution guidelines ,以及可以参考过往 pull request 的提交方式

好嘞!🤝

Considers add Rust code example? I want to provide help.

Considers add Rust code example? I want to provide help.

Sure. Feel free to push a PR

Considers add Rust code example? I want to provide help.

Sure. Feel free to push a PR

I will create a new issue for Rust code translation. It helps assign tasks for those who want to participate.

@Loner1024 I've added Rust to the table.

gyt95 commented

The project was forked more than ten days ago and now it is finally here. I want to help translate the JavaScript and TypeScript versions of the "Space Time Tradeoff" section~

十几天前fork了项目现在终于来了,我想帮忙翻译 《权衡时间与空间》一节的 JavaScript 和 TypeScript 两个版本~

msk397 commented

I'm sorry, I clicked the wrong button by mistake🤣

gyt95 commented

I've done "Space Time Tradeoff" section but why the status is still brewing?

I've done "Space Time Tradeoff" section but why the status is still brewing?

My bad, I’ll update it.

a16su commented

我来写python的二叉树部分

@a16su
I’ve added your ID to the table.

MolDuM commented

I'd like to join this with the C language. But I haven't seen a folder of C. Is that mean I could start from creating a new folder?

I'd like to join this with the C language. But I haven't seen a folder of C. Is that mean I could start from creating a new folder?

Yes, feel free to create a folder for the C code

@krahets Thanks for mentioning me here. I've also translated the binary search into Typescript and fixed several doc bugs, but before the next PR, I hope you can review & merge #136 to prevent it from conflicting so.

I can help translating the part of linear search and binary search into JavaScript.

I can translate the binary search into Typescript.

大佬,go还有哪里没翻译?我也来试试

大佬,go还有哪里没翻译?我也来试试

可以看下表格和源代码文件夹哈

nuomi1 commented

This project is very good, can I add Swift sample code to it?

This project is very good, can I add Swift sample code to it?

Yes! Feel free to create a pull request.

oh, I submitted pr without seeing this discussion. Fortunately, no one claimed the array part of golang. I want to complete the code example contribution of the go array part. : - )

I can do about C part content.

I can translate the linear search into Typescript.

嗨,我可以写 c 部分
linked_list.c✅

I want to translate the heap into C++

ZJKung commented

I want to translate the remained part(heap,graph and Basic Operation of Graph) of C#

我可以写typescript 和js

哈喽,我可以帮忙写chapter_stack_and_queue 部分中array_stack 和array_queue的 Rust 代码

Hi @gvenusleo @JeffersonHuang ! The Dart codes are almost covering all the sections. I'm wondering added the codes to the HTML documents, which is more accessible to the readers.

Could you please doubly check and test all the Dart codes and make sure it consistent with the Java codes(or Python codes)? Thanks!

Hi @gvenusleo @JeffersonHuang ! The Dart codes are almost covering all the sections. I'm wondering added the codes to the HTML documents, which is more accessible to the readers.

Could you please doubly check and test all the Dart codes and make sure it consistent with the Java codes(or Python codes)? Thanks!

I've checked all the Dart codes and modified some of them to match the Java output. Please see #522 .

By the way, due to the built-in mechanisms of the language and random numbers, some of the output may not be exactly the same.

Thank you very much.

Thanks. @gvenusleo ! I've added the Dart codes to the documents in #529 .

  1. Could you help test the modified dart code file array.dart and linked_list.dart ?
  2. Could you fill in all the empty code blocks such as L159 of linked_list.dart ?

Thanks. @gvenusleo ! I've added the Dart codes to the documents in #529 .

  1. Could you help test the modified dart code file array.dart and linked_list.dart ?
  2. Could you fill in all the empty code blocks such as L159 of linked_list.dart ?

Hi, @krahets ! I have modified some Dart codes including array.dart and linked_list.dart , and then filled in the empty code bloacks in the documents. Please see #543 .

Hi @sjinzh , @night-cruise! I think it is time to add Rust code to the documents. I found that some code lacks of comments, such as array_queue.rs. Could you recheck the Rust code thoughouly? When finished, I will release them to docs.

Hi @sjinzh , @night-cruise! I think it is time to add Rust code to the documents. I found that some code lacks of comments, such as array_queue.rs. Could you recheck the Rust code thoughouly? When finished, I will release them to docs.

OK.

Hi @sjinzh , @night-cruise! I think it is time to add Rust code to the documents. I found that some code lacks of comments, such as array_queue.rs. Could you recheck the Rust code thoughouly? When finished, I will release them to docs.

OK, I will check the rust code.

Nigh commented

Hi @krahets , I have translated C code in chapter_greedy in #755

I can help translate c++, TS, Js codes

Hello @krahets , the translation for iteration and recursion in Zig is ready, please check: #804 Thanks!

Hi @krahets , is there a plan to add the language of Ruby?

@memorycancel Yes, we welcome PRs in any coding language, and the code will be deployed on the page when the completion level is reached.

@memorycancel Yes, we welcome PRs in any coding language, and the code will be deployed on the page when the completion level is reached.

OK!I can help, can you give some links, something like a TO-DO list which help kick-off a new language ?

OK!I can help, can you give some links, something like a TO-DO list which help kick-off a new language ?

@memorycancel Please read the Contribution Guideline before start the journey. Just coding in a new folder codes/ruby/ and I'll handle other work.

Here's some PR examples: #632, #681, #696.

Hello @krahets, I would love to help transpiling to Ruby, maybe starting with "Array & Linked List" chapter would be great!