Skip to content

ByteLegendQuest/java-sort-by-multiple-fields

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ByteLegend Challenge of JavaIsland: OOP, Polymorphism

English

File Filter

Complete the src/main/java/com/bytelegend/Point.java's sort() method to sort a list of Point. Point represents a point in 2D coordinate system, where x and y represent the horizontal and vertical coordinates respectively.

Sort a list of Point in ascending order of x first and then y. For example, a sorted list: (-1, 1) (1, -1) (2, -1) (2, 0) (2, 1). Hint: you can use Collections.sort() method.

  • You can accomplish this challenge via any way below:
    • Recommended for beginners: run git clone https://github.com/ByteLegendQuest/java-sort-by-multiple-fields to download the code, finish the challenge in your local IDE, then copy/paste/submit the answer in web editor.
    • Very unrecommended: you can click here to download zipped code if you don't like git operations.
    • Or: if you are confident enough to write code in web editor directly, go ahead.
    • Or: if you are familiar with GitHub, you can fork the repo, finish the challenge and create a pull request.
  • The bot will check your PR and tell you if you accomplish the challenge.
  • Go back to ByteLegend and continue your hero journey.

Good luck!

If you need any help, feel free to join the Discord Community or contact us via contact@bytelegend.com.

Note: we only allow you to modify the following files. Any changes to files other than the following files will be rejected:

  • src/main/java/com/bytelegend/Point.java
简体中文

按照多重字段排序

完成src/main/java/com/bytelegend/Point.java中的sort()方法,对一组Point进行排序。Point类代表了一个二维坐标点,其中xy分别代表了坐标的横纵坐标。

按照先xy,从小到大的顺序对Point进行排序。例如排序后的结果为:(-1, 1) (1, -1) (2, -1) (2, 0) (2, 1)。提示:你可以使用Collections.sort()`方法。

  • 你可以使用以下任意一种方法完成挑战:
    • 初学者推荐:运行git clone https://git.bytelegend.com/ByteLegendQuest/java-sort-by-multiple-fields将代码下载到本地,在本地使用IDE调试完成后复制到网页编辑器里提交。
    • 非常不推荐:如果你实在不喜欢git命令行操作,你可以点击这里直接下载打包好的代码
    • 或者:如果你非常自信不需要下载代码到本地调试,可以使用网页编辑器直接提交。
    • 或者:如果你对GitHub非常熟悉,你可以fork这个仓库、完成挑战后,创建一个Pull Request。
  • 机器人将会检查你的答案,告诉你你是否通过了挑战。
  • 回到字节传说,然后继续你的英雄旅程。

祝你好运!

如果你需要任何帮助,欢迎加入官方玩家QQ群(在首页右下角的联系 & 关于菜单里可以找到入群方式)或者Discord社区,或email至contact@bytelegend.com

注意:我们只允许您修改以下文件,任何对其他文件的修改都会被拒绝:

  • src/main/java/com/bytelegend/Point.java
繁體中文

文件過濾器

完成src/main/java/com/bytelegend/Point.javasort()方法對Point列表進行排序。 Point表示二維坐標系中的一個點,其中xy分別表示水平和垂直坐標。

先按x的升序排序Point列表,然後y 。例如,一個排序列表: (-1, 1) (1, -1) (2, -1) (2, 0) (2, 1) 。提示:您可以使用Collections.sort()方法。

  • 您可以通過以下任何方式完成此挑戰:
    • 推薦給初學者:運行git clone https://github.com/ByteLegendQuest/java-sort-by-multiple-fields下載代碼,在本地 IDE 中完成挑戰,然後在網頁編輯器中復制/粘貼/提交答案.
    • 非常不推薦:如果你不喜歡git操作,可以點擊這裡下載壓縮代碼
    • 或者:如果您有足夠的信心直接在 Web 編輯器中編寫代碼,請繼續。
    • 或者:如果你熟悉 GitHub,你可以 fork倉庫,完成挑戰並創建一個拉取請求。
  • 機器人會檢查你的 PR 並告訴你是否完成了挑戰。
  • 回到ByteLegend繼續你的英雄之旅。

祝你好運!

如果您需要任何幫助,請隨時加入Discord 社區或通過contact@bytelegend.com聯繫我們。

注意:我們只允許您修改以下文件。對以下文件以外的文件的任何更改都將被拒絕:

  • src/main/java/com/bytelegend/Point.java
Español

Filtro de archivos

Complete el método sort() de src/main/java/com/bytelegend/Point.java para ordenar una lista de Point . Point representa un punto en el sistema de coordenadas 2D, donde x e y representan las coordenadas horizontal y vertical respectivamente.

Ordene una lista de Point en orden ascendente de x primero y luego y . Por ejemplo, una lista ordenada: (-1, 1) (1, -1) (2, -1) (2, 0) (2, 1) . Sugerencia: puede usar el método Collections.sort() .

  • Puede lograr este desafío de cualquier manera a continuación:
  • El bot verificará tu PR y te dirá si logras el desafío.
  • Regrese a ByteLegend y continúe su viaje de héroe.

¡Buena suerte!

Si necesita ayuda, no dude en unirse a la comunidad de Discord o contáctenos a través de contact@bytelegend.com .

Nota: solo le permitimos modificar los siguientes archivos. Cualquier cambio en los archivos que no sean los siguientes archivos será rechazado:

  • src/main/java/com/bytelegend/Point.java
العربية

مرشح الملف

أكمل src / main / java / com / bytelegend / Point.java طريقة sort() لفرز قائمة Point . تمثل Point نقطة في نظام الإحداثيات ثنائي الأبعاد ، حيث تمثل x و y الإحداثيات الأفقية والرأسية على التوالي.

قم بفرز قائمة Point بترتيب تصاعدي من x أولاً ثم y . على سبيل المثال ، قائمة مرتبة: (-1, 1) (1, -1) (2, -1) (2, 0) (2, 1) . تلميح: يمكنك استخدام طريقة Collections.sort() .

  • يمكنك إنجاز هذا التحدي بأي طريقة أدناه:
    • موصى به للمبتدئين: قم بتشغيل git clone https://github.com/ByteLegendQuest/java-sort-by-multiple-fields لتنزيل الكود ، وإنهاء التحدي في IDE المحلي الخاص بك ، ثم نسخ / لصق / إرسال الإجابة في محرر الويب .
    • غير موصى به على الإطلاق: يمكنك النقر هنا لتنزيل رمز مضغوط إذا كنت لا تحب عمليات git .
    • أو: إذا كنت واثقًا بدرجة كافية لكتابة التعليمات البرمجية في محرر الويب مباشرةً ، فابدأ.
    • أو: إذا كنت معتادًا على GitHub ، فيمكنك تفرع الريبو وإنهاء التحدي وإنشاء طلب سحب.
  • سيتحقق الروبوت من العلاقات العامة الخاصة بك ويخبرك إذا أنجزت التحدي.
  • ارجع إلى ByteLegend وتابع رحلة بطلك.

حظا طيبا وفقك الله!

إذا كنت بحاجة إلى أي مساعدة ، فلا تتردد في الانضمام إلى مجتمع Discord أو الاتصال بنا عبر contact@bytelegend.com .

ملاحظة: نسمح لك فقط بتعديل الملفات التالية. سيتم رفض أي تغييرات يتم إجراؤها على الملفات بخلاف الملفات التالية:

  • src/main/java/com/bytelegend/Point.java
Português

Filtro de arquivo

Complete o método sort() de src/main/java/com/bytelegend/Point.java para classificar uma lista de Point . Point representa um ponto no sistema de coordenadas 2D, onde x representam as coordenadas horizontal y vertical respectivamente.

Classifique uma lista de Point em ordem crescente de x primeiro e depois y . Por exemplo, uma lista ordenada: (-1, 1) (1, -1) (2, -1) (2, 0) (2, 1) . Dica: você pode usar o método Collections.sort() .

  • Você pode realizar este desafio de qualquer maneira abaixo:
    • Recomendado para iniciantes: execute git clone https://github.com/ByteLegendQuest/java-sort-by-multiple-fields para baixar o código, termine o desafio em seu IDE local e copie/cole/envie a resposta no editor da web .
    • Muito não recomendado: você pode clicar aqui para baixar o código zipado se não gostar das operações do git .
    • Ou: se você estiver confiante o suficiente para escrever código diretamente no editor da web, vá em frente.
    • Ou: se você estiver familiarizado com o GitHub, você pode fazer o fork do repo , finalizar o desafio e criar uma pull request.
  • O bot verificará seu PR e informará se você cumprir o desafio.
  • Volte para ByteLegend e continue sua jornada de herói.

Boa sorte!

Se precisar de ajuda, sinta-se à vontade para se juntar à Comunidade Discord ou entre em contato conosco via contact@bytelegend.com .

Nota: só permitimos que você modifique os seguintes arquivos. Quaisquer alterações em arquivos que não sejam os arquivos a seguir serão rejeitadas:

  • src/main/java/com/bytelegend/Point.java
Bahasa Indonesia

Filter Berkas

Lengkapi metode sort() src/main/Java/com/bytelegend/Point.java 's sort() untuk mengurutkan daftar Point . Point mewakili suatu titik dalam sistem koordinat 2D, di mana x dan y masing-masing mewakili koordinat horizontal dan vertikal.

Urutkan daftar Point dalam urutan menaik dari x terlebih dahulu dan kemudian y . Misalnya, daftar yang diurutkan: (-1, 1) (1, -1) (2, -1) (2, 0) (2, 1) . Petunjuk: Anda dapat menggunakan metode Collections.sort() .

  • Anda dapat menyelesaikan tantangan ini melalui cara apa pun di bawah ini:
    • Direkomendasikan untuk pemula: jalankan git clone https://github.com/ByteLegendQuest/java-sort-by-multiple-fields untuk mengunduh kode, selesaikan tantangan di IDE lokal Anda, lalu salin/tempel/kirim jawabannya di editor web .
    • Sangat tidak direkomendasikan: Anda dapat mengklik di sini untuk mengunduh kode zip jika Anda tidak menyukai operasi git .
    • Atau: jika Anda cukup percaya diri untuk menulis kode di editor web secara langsung, silakan.
    • Atau: jika Anda terbiasa dengan GitHub, Anda dapat melakukan fork repo , menyelesaikan tantangan, dan membuat permintaan tarik.
  • Bot akan memeriksa PR Anda dan memberi tahu Anda jika Anda menyelesaikan tantangan.
  • Kembali ke ByteLegend dan lanjutkan perjalanan pahlawan Anda.

Semoga berhasil!

Jika Anda memerlukan bantuan, jangan ragu untuk bergabung dengan Komunitas Discord atau hubungi kami melalui contact@bytelegend.com .

Catatan: kami hanya mengizinkan Anda untuk mengubah file berikut. Setiap perubahan pada file selain file berikut akan ditolak:

  • src/main/java/com/bytelegend/Point.java
Français

Filtre de fichiers

Complétez la méthode sort() de src/main/java/com/bytelegend/Point.java pour trier une liste de Point . Point représente un point dans le système de coordonnées 2D, où x et y représentent respectivement les coordonnées horizontales et verticales.

Trier une liste de Point dans l'ordre croissant de x d'abord puis y . Par exemple, une liste triée : (-1, 1) (1, -1) (2, -1) (2, 0) (2, 1) . Astuce : vous pouvez utiliser la méthode Collections.sort() .

  • Vous pouvez accomplir ce défi de n'importe quelle manière ci-dessous:
    • Recommandé pour les débutants : exécutez git clone https://github.com/ByteLegendQuest/java-sort-by-multiple-fields pour télécharger le code, terminez le défi dans votre IDE local, puis copiez/collez/soumettez la réponse dans l'éditeur Web .
    • Très déconseillé : vous pouvez cliquer ici pour télécharger le code compressé si vous n'aimez pas les opérations git .
    • Ou : si vous êtes suffisamment confiant pour écrire du code directement dans l'éditeur Web, continuez.
    • Ou : si vous êtes familier avec GitHub, vous pouvez forker le dépôt , terminer le défi et créer une demande d'extraction.
  • Le bot vérifiera votre PR et vous dira si vous accomplissez le défi.
  • Retournez à ByteLegend et continuez votre voyage de héros.

Bonne chance!

Si vous avez besoin d'aide, n'hésitez pas à rejoindre la communauté Discord ou à nous contacter via contact@bytelegend.com .

Remarque : nous vous autorisons uniquement à modifier les fichiers suivants. Toute modification de fichiers autres que les fichiers suivants sera rejetée :

  • src/main/java/com/bytelegend/Point.java
日本語

ファイルフィルター

src / main / java / com / bytelegend / Point.javasort()メソッドを完了して、 Pointのリストをソートします。 Pointは2D座標系のポイントを表し、 xyはそれぞれ水平座標と垂直座標を表します。

Pointのリストをxの昇順で並べ替え、次にyの順に並べ替えます。たとえば、ソートされたリスト: (-1, 1) (1, -1) (2, -1) (2, 0) (2, 1) 。ヒント: Collections.sort()メソッドを使用できます。

  • この課題は、以下のいずれかの方法で達成できます。
    • 初心者に推奨: git clone https://github.com/ByteLegendQuest/java-sort-by-multiple-fieldsを実行してコードをダウンロードし、ローカルIDEでチャレンジを終了してから、Webエディターで回答をコピー/貼り付け/送信します。
    • 非常に推奨されていませんgit操作が気に入らない場合は、 ここをクリックしてzipコードをダウンロードできます。
    • または:Webエディターで直接コードを記述できる自信がある場合は、先に進んでください。
    • または:GitHubに精通している場合は、リポジトリをフォークしてチャレンジを終了し、プルリクエストを作成できます。
  • ボットはPRをチェックし、チャレンジを達成したかどうかを通知します。
  • ByteLegendに戻り、ヒーローの旅を続けてください。

幸運を!

ヘルプが必要な場合は、 Discordコミュニティに参加するか、contact @bytelegend.comからお問い合わせください。

注:変更できるのは次のファイルのみです。次のファイル以外のファイルへの変更は拒否されます。

  • src/main/java/com/bytelegend/Point.java
Русский

Фильтр файлов

Выполните метод sort() src/main/java/com/bytelegend/Point.java , чтобы отсортировать список Point . Point представляет собой точку в двумерной системе координат, где x и y представляют горизонтальные и вертикальные координаты соответственно.

Отсортируйте список Point в порядке возрастания сначала x , а затем y . Например, отсортированный список: (-1, 1) (1, -1) (2, -1) (2, 0) (2, 1) . Подсказка: вы можете использовать метод Collections.sort() .

  • Вы можете выполнить эту задачу любым способом, указанным ниже:
  • Бот проверит ваш PR и сообщит, выполнили ли вы задание.
  • Вернитесь в ByteLegend и продолжайте свое героическое путешествие.

Удачи!

Если вам нужна помощь, присоединяйтесь к сообществу Discord или свяжитесь с нами по адресу contact@bytelegend.com .

Примечание: мы разрешаем вам изменять только следующие файлы. Любые изменения в файлах, кроме следующих файлов, будут отклонены:

  • src/main/java/com/bytelegend/Point.java
Deutsch

Dateifilter

Vervollständigen Sie die Methode sort() von src/main/java/com/bytelegend/Point.java , um eine Liste von Point zu sortieren. Point stellt einen Punkt im 2D-Koordinatensystem dar, wobei x und y die horizontalen bzw. vertikalen Koordinaten darstellen.

Sortieren Sie eine Liste von Point in aufsteigender Reihenfolge von x zuerst und dann von y . Zum Beispiel eine sortierte Liste: (-1, 1) (1, -1) (2, -1) (2, 0) (2, 1) . Hinweis: Sie können die Methode Collections.sort() verwenden.

  • Sie können diese Herausforderung auf eine der folgenden Arten meistern:
  • Der Bot überprüft Ihre PR und teilt Ihnen mit, ob Sie die Herausforderung meistern.
  • Gehen Sie zurück zu ByteLegend und setzen Sie Ihre Heldenreise fort.

Viel Glück!

Wenn Sie Hilfe benötigen, können Sie sich gerne der Discord Community anschließen oder uns über contact@bytelegend.com kontaktieren .

Hinweis: Wir erlauben Ihnen nur, die folgenden Dateien zu ändern. Alle Änderungen an anderen Dateien als den folgenden Dateien werden abgelehnt:

  • src/main/java/com/bytelegend/Point.java
한국어

파일 필터

src/main/java/com/bytelegend/Point.javasort() 메소드를 완료하여 Point 목록을 정렬하십시오. Point 는 2D 좌표계의 한 점을 나타내며 xy 는 각각 수평 및 수직 좌표를 나타냅니다.

먼저 x 의 오름차순으로 Point 목록을 정렬한 다음 y 를 정렬합니다. 예를 들어, 정렬된 목록: (-1, 1) (1, -1) (2, -1) (2, 0) (2, 1) . 힌트: Collections.sort() 메서드를 사용할 수 있습니다.

  • 아래 방법을 통해 이 챌린지를 완료할 수 있습니다.
    • 초보자를 위한 권장 사항: git clone https://github.com/ByteLegendQuest/java-sort-by-multiple-fields 를 실행하여 코드를 다운로드하고 로컬 IDE에서 챌린지를 완료한 다음 웹 편집기에서 답변을 복사/붙여넣기/제출합니다. .
    • 매우 권장하지 않음: git 작업이 마음에 들지 않으면 여기를 클릭하여 압축 코드를 다운로드 할 수 있습니다.
    • 또는 웹 편집기에서 직접 코드를 작성할 만큼 자신이 있다면 계속 진행하십시오.
    • 또는 GitHub에 익숙하다면 리포지토리를 분기 하고 챌린지를 완료하고 풀 요청을 생성할 수 있습니다.
  • 봇은 PR을 확인하고 도전 과제를 달성했는지 알려줍니다.
  • ByteLegend 로 돌아가 영웅 여정을 계속하세요.

행운을 빕니다!

도움이 필요하면 언제든지 Discord 커뮤니티 에 가입하거나 contact@bytelegend.com 을 통해 문의하세요.

참고: 다음 파일만 수정할 수 있습니다. 다음 파일 이외의 파일에 대한 변경 사항은 거부됩니다.

  • src/main/java/com/bytelegend/Point.java
Italiano

Filtro file

Completa il metodo sort() di src/main/java/com/bytelegend/Point.java per ordinare un elenco di Point . Point rappresenta un punto nel sistema di coordinate 2D, dove x rappresentano rispettivamente le coordinate orizzontali y verticali.

Ordina un elenco di Point in ordine crescente di x prima e poi y . Ad esempio, un elenco ordinato: (-1, 1) (1, -1) (2, -1) (2, 0) (2, 1) . Suggerimento: puoi usare il metodo Collections.sort() .

  • Puoi portare a termine questa sfida in qualsiasi modo di seguito:
    • Consigliato per i principianti: esegui git clone https://github.com/ByteLegendQuest/java-sort-by-multiple-fields per scaricare il codice, completa la sfida nel tuo IDE locale, quindi copia/incolla/invia la risposta nell'editor web .
    • Molto sconsigliato: puoi fare clic qui per scaricare il codice zippato se non ti piacciono le operazioni git .
    • Oppure: se sei abbastanza sicuro da scrivere il codice direttamente nell'editor web, vai avanti.
    • Oppure: se hai familiarità con GitHub, puoi eseguire il fork del repository , completare la sfida e creare una richiesta pull.
  • Il bot controllerà il tuo PR e ti dirà se hai superato la sfida.
  • Torna a ByteLegend e continua il tuo viaggio da eroe.

In bocca al lupo!

Se hai bisogno di aiuto, non esitare a unirti alla community di Discord o contattaci tramite contact@bytelegend.com .

Nota: ti permettiamo solo di modificare i seguenti file. Eventuali modifiche ai file diversi dai seguenti file verranno rifiutate:

  • src/main/java/com/bytelegend/Point.java

About

Challenge of JavaIsland: OOP, Polymorphism

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 15

Languages