Valid Sodoku Problem
FinderDing
by Terry
4M ago
Valid Sodoku LeetCode Problem Given a matrix determine if it’s a valid Sodoku board. Based on the following rules Each row must contain the digits 1-9 without repeating Each column must contain the digits 1-9 without repeating Each 3×3 sub-box must contain the digits without repeating To use as our test case we will have two Sodoku boards, 1 that is valid and 1 that is not. Board_true <- matrix(c( "5","3",".",".","7",".",".",".",".", "6",".",".","1","9","5",".",".",".", ".","9","8",".",".",".",".","6",".", "8",".",".",".","6",".",".",".","3", "4",".",".","8",".","3",".",".","1", "7 ..read more
Visit website
Longest Common Prefix
FinderDing
by Terry
4M ago
Longest Common Prefix LeetCode Problem Create a function to find the longest common prefix from an array of strings. Return the longest common prefix from the strings, if there is no common prefix return “”. Longest_Common_Prefix <- function(strs){ x <- strsplit(strs, "") # find the smallest word for loop iteration y <- lapply(x, length) imax <- min(unlist(y)) Current_Prefix = "" Prefix = "" for(i in 1:imax){ Current_Prefix <- substr(strs[1], start = 1, stop = i) if(all(startsWith(strs, Current_Prefix))) { Prefix <- Current_Prefix } } Prefix } > ..read more
Visit website
Add Two Numbers
FinderDing
by Terry
4M ago
Add two numbers LeetCode Problem Add two numbers and return the sum assuming the following The numbers are non-negative integers or empty. The digits are stored in reverse order where each node contains a single digit Example: List 1 (l1) = (2,4,3) List 2 (l2) = (5,6,4) Expected results = 708 (342 + 465) Add_Two_Numbers <- function(l1, l2){ x <- as.numeric(paste(rev(l1), collapse = "")) + as.numeric(paste(rev(l2), collapse = "")) unlist(strsplit(as.character(x), "")) } > Add_Two_Numbers(l1 = c(2,4,3),l2 = c(5,6,4)) [1] "8" "0" "7 ..read more
Visit website
Two Sum in R
FinderDing
by Terry
4M ago
Two Sum LeetCode Problem Given an array of integers and a target, return the index of the two numbers that add to the target. Assuming: Each input has exactly one solution An element can only be used once You can return the index positions in any order Two Sum Function two_sum_for <- function(nums, target){for(i in 1:length(nums)){for(j in 1:length(nums)){if(j == i){next}if (sum(nums[i], nums[j] ) == target) {first <- isecond <- jindexes <- c(first,second)return(indexes)}}}} Example: Integers = (2,7,11,15) Target = 9 > two_sum_for(nums = c(2,7,11,15), target = 9) [1 ..read more
Visit website
Tierney and Technology
FinderDing
by EPH
5M ago
Many companies are rolling out new policies for interacting with artificial intelligence. Some of these new policies and training efforts list assurances that the technology should be viewed as a way to enhance productivity, and not as a means for eliminating current jobs.  Presumably this is an effort to avoid panic. How the affected employee perceives the new direction may stand in stark contrast with the presented policies. A quick glance at the latest bulk of technology Layoffs would give someone pause. Automation isn’t coming around the bend, it is already here. It has been here for ..read more
Visit website
Time will tell
FinderDing
by EPH
11M ago
Working when Traveling can be a pain or it can be less painful. I wouldn’t say it’s a pleasure, but there is often some satisfaction when everything works out well and you can be productive. How you travel determines what you need or think you need to support the tasks and challenges you may face when you are away from your home base or office.  It’s a lot easier for me to take a lot of things with me if I’m using my own vehicle, but even that can present an issue if you’re not always with your vehicle.  What do you leave in your vehicle and what do you take with you from your v ..read more
Visit website
Man machine mud – it’s all good.
FinderDing
by EPH
1y ago
It’s another rainy grey spring day and everything is damp or soaking wet. On the positive side, the grass is green and growing so the amount of mud one might track into their home is not as big a problem as it was only a few weeks ago. If you wish to stomp around outside then a good pair of muck boots would be appropriate for the current conditions. It is boring weather. There are no great torrents of rain, thunder claps or lightning flashes to liven things up to where I would consider the weather conditions slightly more interesting. It’s a dull drippy wet nuisance more than anything else. I ..read more
Visit website
Cold of Winter 2022
FinderDing
by EPH
1y ago
Heating costs go up, wages don’t, temperatures fall and anything that is available is more expensive. People are lowering the temperature settings in their homes and offices to deal with the increased burden on their finances even as snow storms disrupt daily life. Winter and notably this holiday season may be difficult as the year draws to a close for many. You may be giving or getting a little less in the way of gifts this year than previous seasons. Hopefully you won’t be going deep into debt trying to keep up. Going out to eat has already been scaled way back for most families. Driving les ..read more
Visit website
As October ends
FinderDing
by EPH
1y ago
The days have grown colder and darker the closer we get to November. The winter forecast calls for cold temperatures and snow. The last few winters have been on the mild side, but this year we may return to what some would call normal winter conditions. With the price of heating increasing and poor economic conditions affecting everyone, it could be a difficult time for many. It’s almost Halloween and there’s enough scary news to send shivers down anyone’s spine. It has been a strange ride these past few years, and it appears that things will continue to get weirder and wilder. A lot of people ..read more
Visit website
Shine on
FinderDing
by EPH
1y ago
The future is starting to look promising for bicycle repairmen and diesel generator manufacturers. Now that companies are demanding their workers return to the office and get back to running the roads polluting the air, increasing the amount of daily highway carnage, an opportunity arises. We can push employees into fossil fuel alternatives and take credit for battling the global warming conundrum. Get a bike and start peddling your way to work. We may even have a surplus of bicycles discover-able by Google maps that we can leverage. Yes walking may be a practical option for some, but the big ..read more
Visit website

Follow FinderDing on FeedSpot

Continue with Google
Continue with Apple
OR