Lesson 15 of 34
Array Algorithms: Reverse, Search, Sort
10 min 30 XP
java.util.Arrays class-ல் பயனுள்ள methods உள்ளன: Arrays.toString() array-ஐ அழகாக print செய்யும், Arrays.sort() வரிசைப்படுத்தும்.
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.Interview-ல் library இல்லாமல் எழுதச் சொல்வார்கள். Array-ஐ reverse செய்ய: இரண்டு முனைகளிலிருந்தும் swap செய்து நடுவில் சந்திக்கவும் (two pointers).
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.இரண்டு மதிப்புகளை swap செய்ய ஒரு temp variable தேவை.