Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new question about List Ordering Mayhems #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions questions/The-List-Ordering-Mayhem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# List Ordering Mayhem

## Question

Welcome to **List Ordering Mayham**! Here is the problem statement:

> You are given an unordered list of the knights of players playing a chess game, each have their own x and y axes of the position they are on the board. Your task is to write a function that returns the correct descending order of y/number value in the list of the knights on the chessboard.


## Inputs/Outputs
Example Input:
```python
list = [[F,5], [G,2], [C,9], [A,7], [E,1]]
```

Expected Output:
```python
list = [[E,1], [G,2], [F,5], [A,7], [C,9]]
```


## Marking Criteria:
- Achieve an efficient solution
- Achieve an elegant / easy to read solution
- Document your code ensuring good readability
- Use good code design patterns and practicies within your code
- Use good naming conventions throught your code
- Attempt to get a relativly low time complexetiy if possible / O(log(n)) or O(n) is preferable


## Example Code

```python
function generateOrderedList(list l):
Comment on lines +31 to +34
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool question! Maybe provide some more sample code to make the solution more doable for beginners

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But, as others have suggested, maybe you could've added a sample solution

>>>
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Could also be an interesting question when it comes to learning about objects/classes (e.g ordering the y-val then outputting the ordered x-vals or something like that)