!code wars - august!

:raising_hand_woman: :raising_hand_man: ARE. YOU. READY??? :loudspeaker: :loudspeaker: :loudspeaker:

This time, we will have 2 separate levels of Code Wars on Community for both DS and FSR programs! :grin:

15 Likes

Hi everyone! :wave:

Here is the gist of the event :point_down: :point_down: :point_down:

:white_check_mark: Friday (25th August) - :student:Beginners Level (FSR and DS) :hourglass:
:white_check_mark: Saturday (26th August) - :ninja: Advanced Level (FSR and DS) β†’ Deadline 29th August 11:30 PM.

:raised_hands: The projects for Code Wars will be made live on Friday by 6 PM. EVERYONE is WELCOMED to try any of the projects based on your skill-level! :index_pointing_at_the_viewer: :index_pointing_at_the_viewer:

~ The winners will be declared by 2nd September and they will receive the official Certificates in mail by the end of the week. ~ :blush:

:crossed_swords: WHY CODE WARS? :thinking:

~ Code Wars is a great way of engaging with your batch mates and testing your knowledge and skills. These projects will help you build confidence and give you an idea about IRL projects you’d have to do in professional spaces. This is a monthly activity and all are welcomed to try :grin:

:cowboy_hat_face: Don’t be shy and participate with everyone else! Don’t forget to tag us on social media platforms and share your accomplishments! :space_invader:

:right_anger_bubble: More information about the Code Wars projects will be shared soon, stay tuned !!! :dash:

8 Likes

I’m new to code wars so can you tell me what kind of question will be given… like im from fsr batch so will i get a coding question from dsa or something like that or i will get any website or design to create

Hi @rish3ha , you can scroll through previous iterations of Code Wars in this category to understand more.

But each project will be different for different programs. Information about the projects will be made live on Friday.

This time, there will be two different levels of projects students can participate in. One for beginners where people can use HTML,CSS,JavaScript and React. The other level is for thos who know advanced topics from NodeJS. This is for FSR. What kind of project it will be, will be disclosed on Friday.

But participants would have to either code in a set time, or create a project on GitHub or similar platforms and share the links here within the given deadline.

Again, you are free to go through the previous Code Wars posts that you can find in this Category. I hope this helps!

3 Likes

:loudspeaker: GET READY EVERYONE!

:checkered_flag: ~ For FSR Beginners - we will have interesting coding problems to solve! The questions will be made available on Friday 6 PM. You will have 2 hours to complete the coding on GitHub or VSCode and share the link on this post by 8 PM. FSR students will use JavaScript to write and solve the coding problems. :checkered_flag:

:checkered_flag: ~For DS Beginners - The questions will be made available on Friday 6 PM. You will have 2 hours to complete the coding on GitHub or VSCode and share the link on this post by 8 PM. DS students will use Python to write and solve the coding problems.

:triangular_flag_on_post:/// For FSR Advanced - We will share a project question with parameters on Friday around 6:30 PM. You will have to make the project and share the link to your project by replying here within 29th August, 11:30 PM. You will need MongoDB and NodeJS to do this project.

:triangular_flag_on_post: /// For DS Advanced - We We will share a project question with parameters on Friday around 6:30 PM. You will have to make the project and share the link to your project by replying here within 29th August, 11:30 PM. You will need Data Wrangling concepts to do this project.

:flags: ALL THE BEST EVERYONE!!! :tada:

cc @sumanth.medishetti special thanks for designing the questions :tada:

5 Likes

:loudspeaker: :loudspeaker: :loudspeaker: THE CODE WARS BEGINS :flags:

:checkered_flag: Beginners :checkered_flag:

:white_check_mark: Solve all of the following questions between 6-8 PM and share your link in this post by 8 PM today!

β†’ For DS STUDENTS - USE PYTHON TO SOLVE THE QUESTIONS :mega:
β†’ For FSR STUDENTS - USE JAVASCRIPT TO SOLVE THE QUESTIONS :mega:

*** No submissions after 8 PM today will be considered. ALL SUBMISSIONS need to be shared to this thread as replies!
*** All submission should mention their batchcode when sharing the links here!

Question 1 β†’

Armstrong Numbers β†’

For a given 3 digit number, find whether it is Armstrong number or not. An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Return β€œYes” if it is a Armstrong number else return β€œNo”.
NOTE: 371 is an Armstrong number since 33 + 73 + 13 = 371

Example 1:

Input: N = 153Output: "Yes"Explanation: 153 is an Armstrong numbersince 13 + 53 + 33 = 153.Hence answer is "Yes". 

Example 2:

Input: N = 370Output: "Yes"Explanation: 370 is an Armstrong numbersince 33 + 73 + 03 = 370.Hence answer is "Yes".

Your Task:
You dont need to read input or print anything. Complete the function armstrongNumber() which takes n as input parameter and returns β€œYes” if it is a armstrong number else returns β€œNo”…

Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)

Constraints:
100 ≀ n <1000

Question 2 β†’

Find duplicates in an array - >

Given an array a of size N which contains elements from 0 to N-1, you need to find all the elements occurring more than once in the given array. Return the answer in ascending order. If no such element is found, return list containing [-1].

Note: The extra space is only for the array to be returned. Try and perform all operations within the provided array.

Example 1:

Input:N = 4a[] = {0,3,1,2}Output: -1Explanation: There is no repeating element in the array. Therefore output is -1.

Example 2:

Input:N = 5a[] = {2,3,1,2,3}Output: 2 3 Explanation: 2 and 3 occur more than once in the given array.

Your Task:
Complete the function duplicates() which takes array a[] and n as input as parameters and returns a list of elements that occur more than once in the given array in a sorted manner.

Expected Time Complexity: O(n).
Expected Auxiliary Space: O(n).

Constraints:
1 <= N <= 105
0 <= A[i] <= N-1, for each valid i

Question 3 β†’

Reverse a linked list β†’

Given a linked list of N nodes. The task is to reverse this list.

Example 1:

Input:LinkedList: 1->2->3->4->5->6Output: 6 5 4 3 2 1Explanation: After reversing the list, elements are 6->5->4->3->2->1. 

Example 2:

Input:LinkedList: 2->7->8->9->10Output: 10 9 8 7 2Explanation: After reversing the list,elements are 10->9->8->7->2.

Your Task:
The task is to complete the function reverseList() with head reference as the only argument and should return new head after reversing the list.

Expected Time Complexity: O(N).
Expected Auxiliary Space: O(1).

Constraints:
1 <= N <= 104

cc. @sumanth.medishetti special thanks for designing the questions :tada:

2 Likes

:loudspeaker: :loudspeaker: :loudspeaker: THE CODE WARS BEGINS :flags:

:triangular_flag_on_post: Advanced :triangular_flag_on_post:

:ninja: FOR DS PARTICIPANTS ~~

:white_check_mark: Answer the following questions for the dataset given below using Numpy, Pandas, Matplotlib, and Seaborn only. PowerBI and Excel are not to be used!

bangalore.csv (8.6 KB)

Questions:

  1. What are the top 10 hotels with the highest price points. List out the hotels and draw a graph to show the comparison between them.
  2. What are the top 10 hotels with the highest Ratings. List out the hotels and draw a graph to show the comparison between them.
  3. What are the bottom 10 hotels with the lowest price points. List out the hotels and draw a graph to show the comparison between them.
  4. What are the bottom 10 hotels with the lowest ratings. List out the hotels and draw a graph to show the comparison between them.
  5. How many hotels are there with an Excellent rating description. How many hotels are there with a Very Good rating description?

:point_right: DEADLINE - 29th August 11:30 PM.

*** The links need to be shared in this post as replies within the deadline, no submissions will be considered after the expiration of deadline.

:ninja: For FSR PARTICIPANTS ~~

:white_check_mark: Create a URL shortener using NodeJS -

Functional Requirements

  1. Users should be able to generate a shorter URL (up to 15 characters long) from the original URL
  2. The short link should redirect the users to the original link

Design Parameters

  1. URL redirection needs to happen in real-time with minimal latency
  2. Shortened links should not be predictable

Special Parameters

  1. The service should be REST API accessible
  2. How many times the URL is visited
  3. Users can specify the expiration time of the URL

:point_right: DEADLINE - 29th August 11:30 PM.

*** The links need to be shared in this post as replies within the deadline, no submissions will be considered after the expiration of deadline.

My batch id : DS250723

Question 1

Question 2

Question 3

2 Likes

Batch Code: FSR230523

Codepen links:

question1 link: https://codepen.io/Vishal-Kumar25/pen/vYvNeeo?editors=1111
question2 link: https://codepen.io/Vishal-Kumar25/pen/ExGVwEe?editors=1112
question3 link: https://codepen.io/Vishal-Kumar25/pen/gOZaGZr?editors=1112

Thankyou!

1 Like

Batch Code:FSR230523

2 Likes

Batch Code-DS240623

3 Likes

Batch Code: FSR230523

2 Likes

Batch Code : DS100723

code war : Google Colab

1 Like

BatchCode:- FSR060523

codepen:- THE CODE WARS (codepen.io)

1 Like

Batch Code : DS240623
afsalmafaa/Code_War (github.com)

3 Likes

Used code python
For basic level code wars
Batch : DS100723

1 Like

Batch : DS100723

1 Like

FSR-CODEWARS-AUGUST 2023!:dart:
Batch Code-FSR060523

:jigsaw: Levelling Up Coding Skills with These CodeWars Challenges!:star2: Check if it’s an Armstrong number, Find Duplicates in an array, and Reverse a Linked List! Click the link below to dive in and conquer these coding quests! :computer:
Link-1::fire:https://codepen.io/Akshitha-Annaram/full/XWomVKd
Link-2::fire:Impressive CodeWars Questions (codewars-august–akshithaannaram.repl.co)

#CodeWarsChallenge #CodingFun
Thank you!

2 Likes

DS100723

Question 1 : Armstrong no

a = int(input(""))

def armstrongNumber(no):
    num1 = no // 100
    num2 = (no // 10) % 10
    num3 = no % 10

    armstrong = (num1**3) + (num2**3) + (num3**3)

    if armstrong == no:
        return "Yes"
    else:
        return "No"
    
b = armstrongNumber(a)
print(b)
1 Like
1 Like