Skip to content

Commit 9e751c5

Browse files
committed
build(deps): update latest
1 parent a04240c commit 9e751c5

File tree

43 files changed

+4760
-1455
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4760
-1455
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ charset = utf-8
1010
trim_trailing_whitespace = true
1111
insert_final_newline = true
1212

13-
[*.{py,cs}]
13+
[*.{py,cs,rs,java}]
1414
indent_size = 4
1515

1616
[*.txt]

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ obj
1313
bin
1414
*.out
1515
*.exe
16+
target
1617

1718
# testing
1819
coverage

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Gitpod will automatically setup an environment for you.
4646

4747
#### Prerequisites
4848

49-
- [Node.js](https://nodejs.org/) >= 16.0.0
49+
- [Node.js](https://nodejs.org/) >= 18.0.0
5050
- [npm](https://npmjs.com/) >= 8.0.0
5151
- [Docker](https://www.docker.com/)
5252

Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import java.util.Scanner;
22

33
public class Solution {
4-
public static void main(String[] args) {
5-
String line;
6-
Scanner scanner = new Scanner(System.in);
7-
while(scanner.hasNextLine()) {
8-
line = scanner.nextLine();
9-
System.out.println("Hello, " + line + "!");
4+
public static void main(String[] args) {
5+
String line;
6+
Scanner scanner = new Scanner(System.in);
7+
while (scanner.hasNextLine()) {
8+
line = scanner.nextLine();
9+
System.out.println("Hello, " + line + "!");
10+
}
11+
scanner.close();
1012
}
11-
}
1213
}

challenges/hello-world/solutions/rust/function/Cargo.lock

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "rust_application"
3+
version = "1.0.0"
4+
edition = "2021"
5+
6+
[dependencies]

challenges/hello-world/solutions/rust/function/solution.rs

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
use std::io::{self, BufRead};
2+
3+
fn main() {
4+
let stdin = io::stdin();
5+
for line in stdin.lock().lines() {
6+
println!("Hello, {}!", line.unwrap());
7+
}
8+
}

challenges/slugify/solutions/python/function/solution.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
string = input()
22

3-
def isalphanum(character: str)->bool:
3+
4+
def is_alphanumeric(character: str) -> bool:
45
is_lowercase_letter = ord(character) >= ord('a') and ord(character) <= ord('z')
56
is_upper_letter = ord(character) >= ord('A') and ord(character) <= ord('Z')
67
is_digit = ord(character) >= ord('0') and ord(character) <= ord('9')
78
return is_upper_letter or is_lowercase_letter or is_digit
89

9-
string = string.strip(' ')
10-
string = string.strip('-')
10+
11+
string = string.strip(' ').strip('-')
1112
answer = ""
1213
current = ""
1314

1415
for character in string:
15-
if character == ' ' or (character == '-' and len(current)>0):
16+
if character == ' ' or (character == '-' and len(current) > 0):
1617
answer += current
1718
answer += '-'
1819
current = ""
19-
elif isalphanum(character):
20+
elif is_alphanumeric(character):
2021
current += character
2122

2223
answer += current

challenges/sorting-algorithms/solutions/rust/bubble-sort/Cargo.lock

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "rust_application"
3+
version = "1.0.0"
4+
edition = "2021"
5+
6+
[dependencies]

challenges/sorting-algorithms/solutions/rust/bubble-sort/solution.rs

-25
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
use std::io::{self, BufRead};
2+
3+
fn main() {
4+
let mut numbers: Vec<i64> = Vec::new();
5+
let stdin = io::stdin();
6+
for line in stdin.lock().lines().skip(1) {
7+
let line = line.unwrap();
8+
let number: i64 = line.trim().parse().unwrap();
9+
numbers.push(number);
10+
}
11+
bubble_sort(&mut numbers);
12+
for number in numbers {
13+
println!("{}", number);
14+
}
15+
}
16+
17+
pub fn bubble_sort<T: Ord>(array: &mut [T]) {
18+
for index1 in 0..array.len() {
19+
for index2 in 0..array.len() - 1 - index1 {
20+
if array[index2] > array[index2 + 1] {
21+
array.swap(index2, index2 + 1);
22+
}
23+
}
24+
}
25+
}

challenges/sorting-algorithms/solutions/rust/function/Cargo.lock

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "rust_application"
3+
version = "1.0.0"
4+
edition = "2021"
5+
6+
[dependencies]

challenges/sorting-algorithms/solutions/rust/function/solution.rs

-15
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use std::io::{self, BufRead};
2+
3+
fn main() {
4+
let mut numbers: Vec<i64> = Vec::new();
5+
let stdin = io::stdin();
6+
for line in stdin.lock().lines().skip(1) {
7+
let line = line.unwrap();
8+
let number: i64 = line.trim().parse().unwrap();
9+
numbers.push(number);
10+
}
11+
numbers.sort();
12+
for number in numbers {
13+
println!("{}", number);
14+
}
15+
}

challenges/sorting-algorithms/solutions/rust/insertion-sort/Cargo.lock

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "rust_application"
3+
version = "1.0.0"
4+
edition = "2021"
5+
6+
[dependencies]

challenges/sorting-algorithms/solutions/rust/insertion-sort/solution.rs

-25
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
use std::io::{self, BufRead};
2+
3+
fn main() {
4+
let mut numbers: Vec<i64> = Vec::new();
5+
let stdin = io::stdin();
6+
for line in stdin.lock().lines().skip(1) {
7+
let line = line.unwrap();
8+
let number: i64 = line.trim().parse().unwrap();
9+
numbers.push(number);
10+
}
11+
insertion_sort(&mut numbers);
12+
for number in numbers {
13+
println!("{}", number);
14+
}
15+
}
16+
17+
pub fn insertion_sort<T: Ord>(array: &mut [T]) {
18+
for index in 1..array.len() {
19+
let mut index2 = index;
20+
while index2 > 0 && array[index2] < array[index2 - 1] {
21+
array.swap(index2, index2 - 1);
22+
index2 -= 1;
23+
}
24+
}
25+
}

challenges/sorting-algorithms/solutions/rust/merge-sort/Cargo.lock

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "rust_application"
3+
version = "1.0.0"
4+
edition = "2021"
5+
6+
[dependencies]

challenges/sorting-algorithms/solutions/rust/merge-sort/solution.rs

-52
This file was deleted.

0 commit comments

Comments
 (0)