Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ulises-jeremias/v-daily-coding-problems
V solutions to problems sent by dailycodingproblem.com
https://github.com/ulises-jeremias/v-daily-coding-problems
Last synced: 20 days ago
JSON representation
V solutions to problems sent by dailycodingproblem.com
- Host: GitHub
- URL: https://github.com/ulises-jeremias/v-daily-coding-problems
- Owner: ulises-jeremias
- License: mit
- Created: 2021-07-19T22:05:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-19T22:14:02.000Z (over 3 years ago)
- Last Synced: 2024-10-13T02:10:51.339Z (about 1 month ago)
- Language: V
- Size: 9.77 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# V Daily Coding Problems
V solutions to problems sent by dailycodingproblem.com
## Problem 1
This problem was asked by Apple.
Implement the function fib(n), which returns the nth number in the Fibonacci
sequence, using only O(1) space.[Solution](./solutions/problem_001.v)
## Problem 2
This problem was asked by Facebook.
Given an array of numbers of length N, find both the minimum and maximum using
less than 2 * (N - 2) comparisons.[Solution](./solutions/problem_002.v)
## Problem 3
This problem was asked by Nvidia.
You are given a list of N points (x1, y1), (x2, y2), ..., (xN, yN) representing
a polygon. You can assume these points are given in order; that is, you can
construct the polygon by connecting point 1 to point 2, point 2 to point 3, and
so on, finally looping around to connect point N to point 1.Determine if a new point p lies inside this polygon. (If p is on the boundary of
the polygon, you should return False).[Solution](./solutions/problem_003.v)
## Problem 4
This problem was asked by Amazon.
A tree is symmetric if its data and shape remain unchanged when it is reflected about the root node. The following tree is an example:
Given a k-ary tree, determine whether it is symmetric.[Solution](./solutions/problem_004.v)