instruction
stringlengths
71
95.1k
I have used Stacks to check for brackets mismatch. (Parentheses matching problem using Stack algorithm) Any suggestions on how to improve the code? I have tried various examples and it works without error but I feel there is a lack of specificity. How do I work on that? Side note: I think there's a stack reference ty...
I have comma-delimited files like these, where the first field is sorted in increasing order: Case 1 ( 1st file ) : abcd,1 abcd,21 abcd,122 abce,12 abcf,13 abcf,21 Case 2 ( and another file like this ) : abcd,1 abcd,21 abcd,122 What I want to do is convert the first file to like this : abcd 1,21,122 abce 12 abcf 13,...
I am currently developing a Unity-based multiplatform game (PC, iOS, Android) in a small team. This is the code we have created for the character actions inside the game. I am looking for feedback on the code itself as well as tips on how some Unity features could be used better. This is my first time developing a game...
I just recently began going over number systems again, granted I didn't pay very much attention to it the first time for lack of understanding its importance (I've only been coding for a year and some change). Below this paragraph of text I have a simple Binary to Decimal converter, and I was wondering if there's a bet...
This is an implementation of the Sieve of Eratosthenes : It takes advantages of the fact that all primes from 5 and above can be written as 6X-1 or 6X+1, For better space complexity, it uses a pretty accurate upperbound. Better estimations of the upper bound can be found here. I've observed a very slight increase in p...
I wrote code which calculates: Decile threshold for every decile group Total income in the decile group Number of persons Share of decile in total income (%) Tax Share of tax (%) But unfortunately I didn't wrote with function like e.g apply, lapply, aggregate or similar function, so my code had around 150 lines. Can ...
Code review/feedback is requested and appreciated for the following open-source automatic differentiation C++ header-only library released under the Boost License. I am the author. https://github.com/pulver/autodiff This library facilitates the calculation of nth-order single and multi-variable derivatives of functions...
I'm trying to implement equality for all types that share same base. Consider std::vector<unique_ptr<Shape>> and that we want to check if a certain given Shape& is equal to a certain shape managed in the vector. The idea is to have a generic solution through a base class, without relying on the exact content of the der...
For a little game of mine I have created a Key.h file that should allow representation of a key press combination. A key combination is basically some key represented by its virtual key code stored in int _keyand the state of modifier keys - shift, control, alt and windows keys. In case that key combination is used for...
I'm given this method, and requested to analyze what it does, and minimize its complexity (both time and space). All values are known to be larger than zero. public static boolean search(int[] a, int num) { for(int i = 0; i < a.length; i++) for(int j = i; j < a.length; j++) { int res = 0; ...
Below is my attempt at a doubly-linked list in Python (3): class LinkedListNode: def __init__(self, value): self.value = value self.left = None self.right = None class LinkedList: def __init__(self): self.head = self.tail = None self.size = 0 def get_first(self): ...
I wrote the next code chunk to save all the allowed positions from a 3x3 matrix, it's working but I think it could be better. Besides something similar happens in my Randomizer class, although I admit it's messy. public class MatrixRegistry : MonoBehaviour { private int matrixVolume; private int matrixCount; ...
I've been experimenting more with webcrawling and hence have started to get a better understanding compared to my previous questions. Right now, my code scraps from a car forum on each page and iterates through every pages. What would you recommend to improve on? import requests from bs4 import BeautifulSoup, SoupStrai...
I have text inside a variable that I need to separate in paragraphs, and at the same time respect the manual breaklines. This is my code: {description.split('\n\n').map(paragraph => ( <p> {paragraph.split('\n').map( (line, index) => index > 0 ? ( ...
You might consider this question a follow-up of: BigInteger check in C from a string Although, this time, I used C++. I am on Linux Mint 19.1 with the compiler version: g++-8 (Ubuntu 8.2.0-1ubuntu2~18.04) 8.2.0 I tried to push myself hard in C, but it obviously requires one of: more skill / experience lower-level ap...
I am practicing move semantics and placement new by writing a custom Vector class but I am not confident that I use them right. I would really appreciate some pieces of advice regarding my code. Here is my Vector header #ifndef VECTOR_VECTOR_H #define VECTOR_VECTOR_H #include <iostream> #include <utility> #include <it...
I'm writing a small FIX client in Python (2.7, constraint I cannot waive for now, unfortunately). There will be multiple sockets, connecting to different ports, so I thought I'd create a SocketManager to keep a list of sockets and have select.epoll register() them all. Each socket is wrapped by a ThinSocketWrapper clas...
I have coded up the layout using the following Dribbble shot: https://dribbble.com/shots/5382121-Nike-Future To help get better at layouts. This is using a mix of Grid and Flexbox, but an area where I think I may need to revisit is the play button which is using the old method of position: absolute to veritally align ...
I'm building a Summary page for merchant activity in a marketplace with react and redux. The application has already a structure where there is a "MerchantContianer" class MerchantContainer extends Component { render() { const merchList = []; for(let key in this.props.merchants) { for(let id in this.pro...
I'm an engineer working with a deformable membrane that is attached to actuators. The goal is to move the membrane from one shape to another, without ripping the membrane. This imposes "neighbor rules" which state the maximum deviation between neighboring actuators cannot exceed some value, or the membrane will rip. ...
This is an image representation of my code below: This is what they do: CellWithImageX: Subclasses of UITableViewCell. They have an image and an loading indicator. Only 1 can be shown at the time. ImageRequester: Downloads the images and gives ImageCache a callback when it's done. FileExplorer: Saves the images. Image...
I have only recently started learning python and the below is my attempt to create an 'interest rate' object which, given one of several types of interest/discount rate, gives the user access to all of the other corresponding rates that are equivalent to this. This looks as follows: import math class InterestRate: ...
I recently did problem 1.7 Rotate Matrix in Cracking the Coding Interview. I realized my code is very different than what is in the book and also from what I'm finding online (I'm having trouble following the code in the book). I just want to know if the code I wrote would be appropriate in an interview setting or woul...
I was wondering if I could solve the problem here (mostly unrelated) using only simple binary operators since it is just mapping 100 different inputs to a boolean. For this I wrote this, but I have no real way to test, and I was also hoping it could be faster. #include <iostream> #define MIN(a,b) ((a) < (b) ? (a) : (b)...
I am solving the Prime Reduction challenge on Kattis. Consider the following process, which we’ll call prime reduction. Given an input x: if x is prime, print x and stop factor x into its prime factors p1, p2, …, pk let x = p1 + p2 + ⋯ + pk go back to step 1 Write a program that implements prime reduction. Input Inp...
Task : With the page_type and currentpage param I made this code that returns the web script of the web page with active class on the current page through aspx behind code. Is there a better and a shorter way of code that works just like the code below? (The difference is the else if(page_type == sales) script.append ...
I'm looking to learn more about data structures, time complexity, and efficient algorithms. I have solved the Left Rotation Problem on HackerRank using JavaScript. I am looking to see ways to optimize the time complexity. I feel like I have a lot to learn, as don't grok Big O. function main() { const nd = readLine(...
This is a basic_string implementation that has SSO. It's not done, but the fundamental operations are all there (append, erase, resize, reserve, push_back/pop_back). Proper iterators and my own char_traits impl will be added eventually. #include <string> template<typename CharType, typename Traits = std::char_traits<C...
The following code uses a context manager to store and load variables into files. However, it's very annoying to have to set the value property of what is yielded by the context manager (loaded.value). I would like to Not have to define a new class like LoadedValue Set the yielded value of the context manager (loaded)...
I have the following function in the database to do string manipulation: create or replace FUNCTION convert_string ( input_string IN VARCHAR2 ) RETURN VARCHAR2 AS output_string VARCHAR(8); BEGIN IF (input_string IS NULL) THEN output_string := ''; ELSIF (NOT (SUBSTR(input_string, 6, 1) >= '0' AND S...
The problem is as below: The primes 3, 7, 109, and 673, are quite remarkable. By taking any two primes and concatenating them in any order the result will always be prime. For example, taking 7 and 109, both 7109 and 1097 are prime. The sum of these four primes, 792, represents the lowest sum for a set of four primes ...
For this equation, I need to count possible solutions: $$ a + b^2 + c^3 + d^4 \le S $$ $$0\le a,b,c,d \le S$$ I tried the following approach: Integer S=Integer.parseInt(br.readLine()); // get maximum possible value of a,b,c,d which satisfy equation int a=S; int b=(int) Math.sqrt(a); ...
I have simple class with the public build method I want to test. Currently I assert all values it returns in every test. Is it a good practice or I should write one test for static values and in other tests only check values which change depending on input? Implementation class FiltersAttachment: TYPE_OPTIONS = [ ...
So, I wanted to have the count for number of pairs of same integer there are in an array for which I used a HashMap Input contains two lines: Integer n: Signifies the size of input Input numbers separated by white space character: E.g 4 6 6 7 7 8 7 6 4 For the same input, Expected Output: 3 import java.util.Has...
I tried solving the problem in the following manner; I am just a beginner and wanted to know my mistakes and a more efficient way with better time complexity (if any). public class d3 { public static void main(String[] args){ String Search="loop"; String[] letters = Search.split("") ; int counter; ...
Here's my Queue implementation in ES6, class Queue{ constructor(){ this.head = null; this.tail = null; } offer(item){ const p = new Node(item); if(!this.head){ this.head = p; this.tail = p; return; } this.tail.next = p; ...
Synopsis: I wanted something for macOS (and Linux; maybe eventually Windows) that would simply wait for the user to connect a storage device and automatically select, or otherwise output the information to be used, read, manipulated, etc. In its current form, it just prints to the shell, but you could assign the outpu...
In reference to my previous code: User class: getting user data, logging in, secure CSRF session handling I re-wrote my SystemUser class, without the DI container (for now), I'm still trying to figure out how to structure my code to work with dependency injections container rather than a singletone. I wrote my code b...
In order to improve my understanding of C++ template meta-programming, SFINAE, references, and overall class design, I've tried to implement a Maybe<T> class in C++. Of course, the class is heavily based off of Haskell's Maybe Monad, and has the same functionality. I am aware that std::optional<T> pretty much does the ...
I've written a little piece of code to filter Firewall-Connection-Events by a certain group of IPs. But the code can't keep up since the input is fairly huge. I am looking for ways to make this code more efficient in order to handle the Firewall-Connection-Events. [READ_CLIENTS] The code starts with an empty list (clie...
Here I asked this question: My goal is to go through the list of all English words (separated by '\n' characters) and find the longest word which doesn't have any of these characters: "gkmqvwxz". And I want to optimize it as much as possible I updated the code with the help of suggestions from answers, but I s...
This is an implementation to simulate the basic functionality of unique_ptr. This doesn't provide features like custom deleter and make_unique(). I would really appreciate any feedback to improve the below code, any other api's that I should be providing etc. my_unique_ptr.h #ifndef MY_UNIQUE_PTR_H_ #define MY_UNIQUE_P...
I created a basic Hangman game that uses a text file to select a secret word. Are there any areas for improvement? import random secret_word = [''] user_list = [] number_of_tries = 5 guessed_letters = [] user_tries = 0 user_guess = '' def select_word(): global secret_word, user_list with open('secret_words....
This code is for a board game program, which works by placing the user on a grid which then tasks the user with finding all the treasure chests. Each chest landed on gives 10 gold. However, landing on a bandit means all your gold is taken. There are also different difficulties. The end score is then given once the user...
Introduction I decided to try Kotlin because of its forgiving nature to long-time Java users. I implemented a few introductory sorting algorithms and would like to have them reviewed, not just to ensure that I'm applying Kotlin correctly, but also to improve my style and get rid of any potential bugs. I have made use o...
I created a simple program to simulate the Ant's path. The Ant moves north, west, east and south. Each time the Anth moves to an "uncharted" location, I build a Square and give it a color. Each time the Ant steps in a square, the square changes color and the Ant rotates 90° and keeps her track. I use a Stack where I p...
I am very new to Java and its collections and I'm trying to figure out "best" way to populate an ArrayList<Byte> in Java. In particular, I'm trying to take a 32 bit number, divide it into bytes, and put it into big-endian order into the list. I'm not particularly interested in hyper-optimizing in this case; I'd rathe...
I participate in competitive programming contests, and I found myself implementing and re-implementing graphs constantly. So I decided to create a reusable implementation of a Graph class, and implement some common methods for it, including DFS, BFS, and Dijkstras. Are there any edge cases that my code misses? Is there...
I would like your feedback on any improvements that can be made to this Hangman game I have written in C. Specifically, improvements in terms of runtime and code organization. This game was a nice way for me to learn more about the features of the C language, specifically pointers, and thus I have heavily commented the...
My code can generate HTML table strings well, but it depends on JSON.NET. I'm converting IEnumerable to an HTML table string using Json.NET but I think I shouldn't. void Main() { var datas = new[] { new {Name="Test"} }; var array = datas.ToArray().ToHtmlTable(); //Run Success var set = datas.ToHashSet().ToH...
Can following code be called insertion sort? I tried implementation according to my underdtanding... #include<iostream> void insertionSort(int* array,int length){ for(int unsortedIndex=1; unsortedIndex<length;unsortedIndex++){ for(int sortedIndex=0; sortedIndex<unsortedIndex; sortedIndex++){ ...
I have inherited the maintenance of a DXL script (for IBM Doors). In this, I came across various examples of stuff that make me scratch my head. Take this example: int key = 3 print key Running this in Doors, results in the expected output: 3. However, in the documentation, we see that key is also the name of a functi...
I used vtk python examples to write this function where it produces two lines with respect to a reference point like [0, 0, 0]. This function will return an actor where it can be used later in a render scene. Here's my actor producer function (most of the code is not mine): import vtk import random as rnd def two_lin...
Developer Assignment - Family And Relations Going through the old stuff in his attic, Indiana comes across a chart which looks like a family tree of multiple generations which shows his ancestors. Excited by the discovery, he decides to digitize the family tree and utilize it to identify relationships of a perso...
I was just tempted to write a similar piece of code to the one presented in this answer on SO (posted below). The problem is having to discriminate between different cases where exactly one case is true. In my experience switch statements are usually use to match the value of an expression against various constants. B...
Problem Given the following data: [ { "users": [ { "id": "07bde76f-aff0-407d-9241-a12b323d4af8", "transactions": [ { "category": "purchase" }, { "category": "unknown" } ] }, { "id": "40aa040f-7961-4e0...
I'm learning SQL using python library pymysql. I wanted to make an INSERT statement that will update 3, 5 or 10 columns using the same code by just passing the Database name, the Columns name and the Values. Thus I made this: def insert_statement(db,cols,values): separator = "," separator.join(cols) stateme...
Please review my generic implementation of the Knuth-Morris-Pratt algorithm. Its modified to search a source of indeterminate length in a memory efficient fashion. namespace Code { using System; using System.Collections; using System.Collections.Generic; using System.Linq; /// <summary> /// A g...
I am modelling a game which can be single (player1 vs player2) or double (pair 1 vs pair 2, where each pair contains 2 players) and each game has a score. The game is group and date based e.g. Group A on date_n can contain n games, on date_m can contain m games. In firestore, I use a game collection which looks like th...
It's a simple app that uses a public API to display data. It works as is, but I'm seeing a lot of spaghetti code that my limited experience can't fix on its own. import React, { Component } from "react"; import Spinner from "./components/common/Spinner"; import "../src/App.css"; class App extends Component { constru...
As an exercise, I wrote a program to decrypt a PDF file. The only thing that is known about the encryption password is that it is a single English word (all capital or lowercase). The program uses a dictionary file containing over 45000 words to unlock the file. It looks like this: dictionary.txt AARHUS AARON ABABA AB...
I would like to ask how I can make my code more simple and effective. I know that this code can be 100% better. I am supposed to load number for each array and then take the 2 arrays (4*3 and 3*4) and multiply them into 3*3 array. The main point is making thescanf_s for both int a and int b in one "piece of code." #inc...
I've tried solving the following HackerRank question: Write a function blur_image() that takes as a parameter an image in the form of a nested list A and blurs it by averaging each pixel value with four of its neighboring pixels (Top, Bottom, Right, and Left). Note: not all of the neighbors are available in boundary ...
I recently had to repeatedly iterate over an array but increment the index to start from each time. Since this is quite cumbersome in comparison to a normal for loop I made a small template function that does this for me: #include <algorithm> #include <iostream> template<typename TSize, typename TFunc> void for_start(...
In my program I am transferring image files continuously through QTCPSocket for each frame I am creating new connection which I believe causes the performance problems. But I couldn't transform my code into single connection one. Everything works fine I can transfer images continuously but frame rate seems lower than I...
The DocumentClient is an object that accesses CosmosDb, but Microsoft recommends its kept as a Singleton class. I'm relying on System.Lazy to ensure thread safety. In addition, I want to be able to overwrite my DocumentClient when I need to test. Is this correct? public sealed class DocumentClientSingleton { public...
I have a text based Tic-Tac-Toe game with a simple AI element that will take winning moves and block losing moves. The one piece of criticism I received was that I was 'hard coding' too much. I can see this, for example, in check_computer_win. How can I use a dictionary to cut down on hard coding? What are some of the ...
I am a rookie of coding and I have written a c++ procedure which calls the Eigen library to do the linear operation of the matrix. Please help me to improve the efficiency of the loop. #include <iostream> #include <fstream> #include <Eigen/Dense> #include <time.h> using namespace std; int main() { // Weight coeffi...
At the moment I'd like recommendation where I can change and what I can use to improve on simplicity and modularity. If I'm practicing good naming conventions as to provide clean readable code. Any critique is much appreciated. import time import re import requests from bs4 import BeautifulSoup, SoupStrainer import pa...
I've been working through the book Head First C# and this is an exercise from chapter 7, which is about interfaces and abstract classes. Note that the class design was mandated by the authors, I'm open to suggestions to improve. I'd like a review on any and all aspects. My code ended up quite a bit different than the ...
Note: I wasn't trying to follow the POSIX getdelim signature exactly. I needed to add the consume argument for a project I'm working on. I am pretty new to writing C. It would be great to get some feedback on whether best practices are being followed. Some things I learned about while writing this code (which might be ...
I am a relatively novice programmer, and I am taking steps into graphics programming. I am writing a quick pong clone and want to cap the FPS to save system resources. This is how I have implemented this (I've omitted other code for brevity) #include <stdio.h> #include <stdbool.h> #include "SDL.h" #include "Windows.h" ...
I try to implement a thread safe queue with the interrupt function (interrupt all threads who are blocking to take data from queue). #include <queue> #include <mutex> #include <chrono> #include <thread> #include <cstdint> #include <iostream> #include <condition_variable> /** * throw the exception when waiting is inte...
I recently wrote a matrix module in C++. During the development process I quoted some source code and found a problem. For example, matrix multiplication: This way is suitable for all N×N matrices: void multiplyMatrix(const float32* a, const float32* b, float32* dst, int32 aColumns, int32 bColumns, ...
I am trying to design some classes which I intent to use as a framework. I would like them to be compliant to SOLID design principles. I had a basic structure and then I implemented Strategy design pattern and tried adding dependency injection as well. Would like this to be reviewed so that I know if my understanding i...
So I've been working on a generator for Pascal's triangle in Python. Now, I wouldn't call myself a Python god, so my program is a lot longer than the very confusing ones on the internet. It's more of a logical approach to creating the triangle. Here's the program: def double_chunker(lst): leng = len(lst) for i in r...
Following the successful review of my previous implementation. Please review my new, generic implementation of the Knuth-Morris-Pratt algorithm. Its modified to search a source of indeterminate length in a memory efficient fashion. namespace Code { using System; using System.Collections.Generic; using Syste...
This snippet allows to up and down TCP server via Flask endpoints. I'm seriously concerned about global variables here. And asking for review this code. The main idea is to be able to up/down TCP server by request to the Flask web service, we need it for testing purposes. import socket from flask import Flask import t...
Question- My approach I noticed that the minimum of a row is when t=k-one of the numbers of that row. Suppose in the above sample case, t=4 which is 6-2. Since we have to find the minimum maximum testing all k-no will give the solution. Any tips to improve this technique as for cases where each number is unique and n...
I have written a solution to a DM::OJ exercise to find the next Prime Number after a given number (input). I'm seeking to optimize it so that it will run for any number up to 1000000000 in 2 seconds or less. Here is my code: from functools import reduce num = int(input()) def factors(n): return set(reduce(li...
Somebody asked me to create a code that orders unique numbers of an array according to their frequency, ie: {1,3,3,4,4,4,4,4,2,2,5,5,5,5} to {4,5,3,2,1} I'm a beginner and only started learning C last week so my code probably isn't optimal. I managed to get it in just over 100 lines without worrying too much about sp...
I would like to know if this is a good solution. This code works but is it efficient enough as i have seen some solutions with \$O(1)\$ time complexity. import java.util.Scanner; public class RotateArray { public static void main(String[] args) { Scanner s = new Scanner(System.in); int n = s.ne...
I have written a solution to the Slot Machines challenge on DM::OJ: Martha takes a jar of quarters to the casino with the intention of becoming rich. She plays three machines in turn. Unknown to her, the machines are entirely predictable. Each play costs one quarter. The first machine pays 30 quarters every 35th time ...
One of the dream idea to build typewriting in ReactJS. The code seems to be working, still there are something looks not that great in the code Looking for better solution (best practice) in the function like animationManager() Demo: https://codesandbox.io/s/qk4591q1kw index.js import React from "react"; import React...
In the last couple of days I have been programming a chess move generator in Rust from scratch. While it's intent is to be later used in a fully functional engine, where the speed of the move-generation isn't as important, I have had quite some fun optimizing the move-generator. Now, my engine reaches about 85 million ...
I would like to plot the following function: $$ \begin{align} \Lambda(\delta\tau) &\equiv\ \chi(\delta\tau, 0) = \frac{1}{T_i} \int_0^{T_i} a(t_0+t')a(t_0+t'+\delta\tau) dt' \\ &= \begin{cases} 1 - \frac{\left|\delta\tau\right|}{\tau_c}, &\left|\delta\tau\right| \le \tau_c(1+\frac{\tau_c}{T_i}) \\ -\frac{\tau_c}{...
I have a very simple Python script. All it does is open two data files from a given directory, read the data, make a series of plots and save as PDF. It works, but it is very slow. It takes almost 20 seconds for data files that have 50-100 lines and <30 variables. import numpy as np import matplotlib.pyplot as plt from...
The rules: The points rolled on each player’s dice are added to their score. If the total is an even number, an additional 10 points are added to their score. If the total is an odd number, 5 points are subtracted from their score. If they roll a double, they get to roll one extra die and get the number of points roll...
I have 2 list containing some Objects (Fruit class). I am using a 3rd list to add these elements based on following 2 criteria. I want every object in the 1st list added to 3rd list. But if I have a matching object in the 2nd list (matching based on id and isChecked), I want to add the object from the 2nd list to the...
I have a circle-growth algorithm (line-growth with closed links) where new points are added between existing points at each iteration. The linkage information of each point is stored as a tuple in a list. That list is updated iteratively. QUESTIONS: What would be the most efficient way to return the spatial order of ...
I am learning C++ and I made a simple stack class using a (reversed) linked-list to test my knowledge. Are there any problems with the following code, or any suggestions to improve it? I want to make sure I am getting things correct in the beginning so I don't make the same mistakes again in the future - especially mem...
I'm looking for feedback on how this can be improved. Basically what I'm trying to do is check if the cache has the object, else check from the database. I have a list of ids, then I separate them based on whether they already exist in the cache or not, based on the date as well. One list fetches from the cache, the ot...
Here is a variation on a theme: fizzbuzz. After providing this answer recently, I decided to practice some VueJS skills with outputting the values and conditionally applying styles based on the value. The specific styles are as follows: red border for Fizz blue border for Buzz purple border for FizzBuzz And then I de...
I have this code that reads a file and after processing a few lines writes the output to a second file: num_reads = 7 with open('data.txt') as read_file: with open('new_data.txt', 'w') as write_file: while (True): lines = [] try: # expect errors if the number of lines in the f...
This is a follow up to my previous Code Review, and I have incorporated feedback I received in this revision of the code, along with some other improvements. I would appreciate your feedback on this code, specifically the practice of placing project-wide constants in config.h, the count_missing_letters method which use...
I have a stripe payment form and when I use different forms that get hidden, I must use separate IDs for the form to appear. I have found a way to do this but looking to simplify the code if this is possible. I have a page that has listings for purchase. Each listing can have variants. Because of this, I need to create...
I know you must've been already tired of Python decorators, but this one seems new! There is a common practice of making decorators with arguments. But Flat is better than nested, so let's flatten it up: def decorator_with_args(arg): def wrapper(*args, **kwargs): print('decorated with arg: {}'.format(arg))...
I'm using C# .NET Core 2.1 and Excel lib DotnetCore.NPOI I'm converting xls file to xlsx by loading xls and copying sheet by sheet, cell by cell to xlsx - How can I improve performance / ram usage here? private string ConvertToXSLX(string path) { using (var fs = File.OpenRead(path)) { var result = XLS_...
I have already resolved several others using Application.Index with Application.WorksheetFunction.Match and reduced time to perform from about 7-8 seconds to milliseconds. But I feel there is still room for improvement. Should I use an array with Index and Match? I was also told to use Scripting.Dictionary, but I am l...
I have been trying to solve "Wildcard Matching" on leetcode. I know there are more "manual" ways to solve this without using the RE library. But I would like to know if passing the time limit is possible without having to manually create a pattern finder from scratch. Currently this code times out at test case 1708 (ou...