Pārlūkot izejas kodu

Added some more problems and structure

master
Lachlan Jacob pirms 5 gadiem
vecāks
revīzija
76028e5562
15 mainītis faili ar 73 papildinājumiem un 1 dzēšanām
  1. 3
    0
      125/problem.txt
  2. 2
    0
      175/main.sql
  3. 29
    0
      175/problem.txt
  4. 3
    0
      175/run.sh
  5. 1
    0
      176/main.sql
  6. 1
    0
      176/problem.txt
  7. 3
    0
      176/run.sh
  8. 1
    0
      182/main.sql
  9. 1
    0
      182/problem.txt
  10. 3
    0
      182/run.sh
  11. 15
    0
      66/main.py
  12. 5
    0
      66/problem.txt
  13. 3
    0
      66/run.sh
  14. 2
    1
      README.md
  15. 1
    0
      all.sh

+ 3
- 0
125/problem.txt Parādīt failu

Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.

Note: For the purpose of this problem, we define empty string as valid palindrome.

+ 2
- 0
175/main.sql Parādīt failu

SELECT FirstName, LastName, City, State FROM Person
LEFT JOIN Address ON Person.PersonId = Address.PersonId;

+ 29
- 0
175/problem.txt Parādīt failu

Table: Person

+-------------+---------+
| Column Name | Type |
+-------------+---------+
| PersonId | int |
| FirstName | varchar |
| LastName | varchar |
+-------------+---------+
PersonId is the primary key column for this table.

Table: Address

+-------------+---------+
| Column Name | Type |
+-------------+---------+
| AddressId | int |
| PersonId | int |
| City | varchar |
| State | varchar |
+-------------+---------+
AddressId is the primary key column for this table.


Write a SQL query for a report that provides the following information for each person in the Person table, regardless if there is an address for each of those people:

FirstName, LastName, City, State



+ 3
- 0
175/run.sh Parādīt failu

#!/bin/bash

echo "Can't be botherd making this into a test"

+ 1
- 0
176/main.sql Parādīt failu

SELECT MAX(Salary) AS SecondHighestSalary FROM Employee WHERE Salary != (SELECT MAX(Salary) FROM Employee);

+ 1
- 0
176/problem.txt Parādīt failu

Write a SQL query to get the second highest salary from the Employee table.

+ 3
- 0
176/run.sh Parādīt failu

#!/bin/bash

echo "Can't be botherd making this into a test"

+ 1
- 0
182/main.sql Parādīt failu

SELECT Email FROM (SELECT Email, COUNT(Email) AS cnt FROM Person GROUP BY Email) AS b WHERE cnt > 1;

+ 1
- 0
182/problem.txt Parādīt failu

Write a SQL query to find all duplicate emails in a table named Person

+ 3
- 0
182/run.sh Parādīt failu

#!/bin/bash

echo "Can't be botherd making this into a test"

+ 15
- 0
66/main.py Parādīt failu

class Solution:
def plusOne(self, digits):
numberString = ""
for n in digits:
numberString += str(n)

number = int(numberString) + 1
final = []
for digit in str(number):
final.append(int(digit))
return final

s = Solution()
print("Expected: [1, 2, 4]")
print("Got:", str(s.plusOne([1, 2, 3])))

+ 5
- 0
66/problem.txt Parādīt failu

Given a non-empty array of digits representing a non-negative integer, plus one to the integer.

The digits are stored such that the most significant digit is at the head of the list, and each element in the array contain a single digit.

You may assume the integer does not contain any leading zero, except the number 0 itself.

+ 3
- 0
66/run.sh Parādīt failu

#!/bin/bash

python3 main.py

+ 2
- 1
README.md Parādīt failu



Folder Names will Be Puzzle Numbers and contain: Folder Names will Be Puzzle Numbers and contain:


- `problem.txt` - A plain text file with a problem description.
- `main.<language extension>` will be the code submitted. (Some code may have to be modified to run outside of LeetCode's driver). - `main.<language extension>` will be the code submitted. (Some code may have to be modified to run outside of LeetCode's driver).
- run.sh (This will contain a bash scipt to run/compile+run the code.
- `run.sh` (This will contain a bash scipt to run/compile+run the code.


## Necessary Dependencies ## Necessary Dependencies



+ 1
- 0
all.sh Parādīt failu



for f in *; do for f in *; do
if [ -d ${f} ]; then if [ -d ${f} ]; then
echo ""
echo "Running Problem: $f" echo "Running Problem: $f"
cd $f cd $f
./run.sh ./run.sh

Notiek ielāde…
Atcelt
Saglabāt