Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
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
47 changes: 47 additions & 0 deletions 47 Seminar 3/Homework/Problem1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Find min/max number in array

## Find max
Given an array of integers find the biggest integer.

---
Sample input:
``` java
[1,2,1,51,2]
```
Sample output:
``` java
51
```
---
Sample input:
``` java
[1000,2,200, -5124]
```
Sample output:
``` java
1000
```
---

## Find min
Given an array of integers find the smallest integer.

---
Sample input:
``` java
[1,2,1,51,2]
```
Sample output:
``` java
1
```
---
Sample input:
``` java
[1000,2,200, -5124]
```
Sample output:
``` java
-5124
```

23 changes: 23 additions & 0 deletions 23 Seminar 3/Homework/Problem2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Longest string in array
Given array of strings, find the string with the most characters.

There can be more than one string with the most characters. In such case, print all strings with the max length.

---
Sample input:
``` java
["gosho", "PeSho", "StaMAT", "Roki 5", "Baba Dobrinka", "Devata ot Gladalupe"]
```
Sample output:
```
Devata ot Gladalupe
```
---
Sample input:
``` java
["gosho", "PeSho", "StaMAT", "Roki 5"]
```
Sample output:
```
StaMAT, Roki 5
```
25 changes: 25 additions & 0 deletions 25 Seminar 3/Homework/Problem3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Reverse words in a string
Given a string, return a new string that has all the words in reversed order.t all strings with the max length.

---
Sample input:
``` java
"This is a string sentense"
```
Sample output:
```
sihT si a gnirts esnetnes
```
---
Sample input:
``` java
"My second sentence to reverse"
```
Sample output:
```
yM dnoces ecnetnes ot esrever
```

<details><summary>Hint</summary>
Use the string method <i>.split()</i> to make an array of strings and then assemble them back.
</details>
23 changes: 23 additions & 0 deletions 23 Seminar 3/Homework/Problem4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Find longest sequesnce of repeating numbers
Given an array of integers, return the integers that repeats sequentially the most times.

In case, there is more than one numbers with the same number of reapeating times, return the first.

---
Sample input:
``` java
[6, 5, 2, 2, 5, 6, 7, 5, 5]
```
Sample output:
```
2
```
---
Sample input:
``` java
[-12, -4, 5, 5, 5, 6, 7, 12, 12, 12, 12, 5, 5, 5]
```
Sample output:
```
12
```
23 changes: 23 additions & 0 deletions 23 Seminar 3/Homework/Problem5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Find longest sequesnce of progressing sequential numbers
Given an array of integers, return the longest progresing sequence.

In case there are more than one progressing sequence repeating same max number of times, return the first.

---
Sample input:
``` java
[500, 5, 6, 7, 1, 2]
```
Sample output:
```
5,6,7
```
---
Sample input:
``` java
[-4, -5, 0, 2, 100, 0, 1, 2, 3]
```
Sample output:
```
-5, 0, 2, 100
```
23 changes: 23 additions & 0 deletions 23 Seminar 3/Homework/Problem6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Find longest sequesnce of progressing non-sequential numbers
Given an array of integers, return the longest non-sequential progressing sequence.

In case there are more than one progressing sequence repeating same max number of times, return the first.

---
Sample input:
``` java
[1, 0, 500, 5, 6, 7, 1, 2]
```
Sample output:
```
1, 5,6,7
```
---
Sample input:
``` java
[-4, -5, 0, 2, 100, -2, 0, 1, 2, 3]
```
Sample output:
```
-4, 0, 0, 1, 2, 3
```
Morty Proxy This is a proxified and sanitized view of the page, visit original site.