Skip to content

Commit 42f842b

Browse files
author
Мето Трајковски
committed
Deleted some bad chars
1 parent 3ab72a7 commit 42f842b

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

Linked Lists/is_ascending_ll.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'''
22
Ascending Linked List
33
4-
Determine whether the sequence of items is ascending so that its each element is strictly larger
5-
than (and not merely equal to) the element that precedes it. Return True if that is the case, and
6-
return False otherwise.
4+
Determine whether the sequence of items is ascending so that its each element is strictly larger
5+
than (and not merely equal to) the element that precedes it. Return True if that is the case, and
6+
return False otherwise.
77
88
Input: -5 -> 10 -> 99 -> 123456
99
Output: True

Linked Lists/max_difference_subll.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'''
22
Maximum Difference Sub-Linked List
33
4-
Given a linked list of integers, find and return the sub-linked list of k consecutive elements where
4+
Given a linked list of integers, find and return the sub-linked list of k consecutive elements where
55
the difference between the smallest element and the largest element is the largest possible.
6-
If there are several sub-linked lists of k elements in items so that all these sub-linked list have
6+
If there are several sub-linked lists of k elements in items so that all these sub-linked list have
77
the same largest possible difference, return the sub-linked list that occurs first.
88
99
Input: 42 -> 17 -> 99 -> 12 -> 65 -> 77 -> 11 -> 26, 5

Other/postfix_evaluate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
Postfix Evaluate
33
44
When arithmetic expressions are given in the familiar infix notation 2 + 3 * 4, we need to use
5-
parentheses to force a different evaluation order than the usual PEMDAS order determined by
6-
precedence and associativity. Writing arithmetic expressions in postfix notation (also known as
7-
Reverse Polish Notation) may look strange to us humans accustomed to the conventional infix
5+
parentheses to force a different evaluation order than the usual PEMDAS order determined by
6+
precedence and associativity. Writing arithmetic expressions in postfix notation (also known as
7+
Reverse Polish Notation) may look strange to us humans accustomed to the conventional infix
88
notation, but is computationally much easier to handle, since postfix notation allows any evaluation
99
order to be expressed without using any parentheses at all! A postfix expression is given as a list of
10-
items that can be either individual integers or one of the strings '+' ​, ​'-' ​, ​'*' and '/' for the four
10+
items that can be either individual integers or one of the strings '+', '-', '*' and '/' for the four
1111
possible arithmetic operators. Calculate the result of the postfix expression.
1212
1313
Input: [2, 3, '+', 4, '*']

Other/safe_squares_rooks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'''
22
Safe Squares from Rooks
33
4-
On a generalized n-by-n chessboard, there are some number of rooks, each rook represented as a
5-
two-tuple (row, column) of the row and the column that it is in. (The rows and columns are
6-
numbered from 0 to n-1.) A chess rook covers all squares that are in the same row or in the same
7-
column as that rook. Given the board size n and the list of rooks on that board, count the number of
4+
On a generalized n-by-n chessboard, there are some number of rooks, each rook represented as a
5+
two-tuple (row, column) of the row and the column that it is in. (The rows and columns are
6+
numbered from 0 to n-1.) A chess rook covers all squares that are in the same row or in the same
7+
column as that rook. Given the board size n and the list of rooks on that board, count the number of
88
empty squares that are safe, that is, are not covered by any rook.
99
1010
Input: [(1, 1), (3, 5), (7, 0), (7, 6)], 8

Strings/reverse_vowels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'''
22
Reverse Vowels
33
4-
Given a text string, create and return a new string constructed by finding all its vowels (for
5-
simplicity, in this problem vowels are the letters in the string 'aeiouAEIOU') and reversing their
4+
Given a text string, create and return a new string constructed by finding all its vowels (for
5+
simplicity, in this problem vowels are the letters in the string 'aeiouAEIOU') and reversing their
66
order, while keeping all non-vowel characters exactly as they were in their original positions.
77
88
Input: 'Hello world'

0 commit comments

Comments
 (0)