Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
2 votes
1 answer
131 views

I’m trying to solve the following Leetcode problem: You are given a 2D integer array intervals where intervals[i] = > [starti, endi] represents all the integers from starti to endi inclusively. A ...
3 votes
1 answer
200 views

I am sitting on a LeetCode problem, specifically Minimum Time to Repair Cars. You get a list of how many mechanics you have and how many cars you need to fix. Each mechanic has a rank, and he takes ...
1 vote
4 answers
420 views

I recently had an interview where I was asked to solve a modified version of this question on leetcode. Instead of checking if the string is valid you are supposed to count the minimum number of ...
13 votes
6 answers
422 views

I'm an electrician working toward becoming an electrical engineer. I have some basic knowledge of Python and am trying to automate a tedious process we often face in the field. In 3-phase electrical ...
1 vote
1 answer
113 views

Does anyone know any LeetCode, Codeforces or anything like the following programming problem?: Imagine you have "n" slots, from 1 to "n" with "s" being your starting ...
1 vote
1 answer
232 views

I'm working through "Competitive Programming 4" by "Halim et al." and in the topic "Greedy algorithms", I was solving the following problem on Kattis: fridge. The goal ...
4 votes
1 answer
288 views

I am looking at solutions to the LeetCode problem 3474. Lexicographically Smallest Generated String: You are given two strings, str1 and str2, of lengths n and m, respectively. A string word of ...
-1 votes
2 answers
70 views

Problem Description: Xiaoming has n energy balls, which are arranged from left to right. Each energy ball has an energy value v_i. Now, Xiaoming can perform the following 4 types of operations on this ...
2 votes
1 answer
163 views

It is a famous question which asked about finding longest nondecreasing subsequence from a given array. The question is well studied and have O(n log n) time complexity solutions. I have encountered a ...
0 votes
1 answer
57 views

I am attempting https://open.kattis.com/problems/distributingseats This problem has been listed as a classical greedy problem in the Competitive Programming Book by Steven & Felix https://cpbook....
musashi's user avatar
  • 21
0 votes
1 answer
285 views

Suppose I have several tasks with uneven lengths. For example, let k=8 and w(k)=[4,5,3,10,1,1,1,3]. How would I assign these to N=3 workers such that any tasks assigned to a given worker are ...
Zaya's user avatar
  • 346
3 votes
0 answers
59 views

A graph G(V,E) is defined by a set of vertices V and a set of edges E. Given W⊆V, find a connected subgraph G'(V',E') of G that satisfies the following conditions: i) ∀p∈V,∃p'∈V' such that p′ is ...
2 votes
2 answers
133 views

I am a beginner in algorithms and my native language is not English, so please forgive me if there are any cognitive errors or grammatical errors. I am working on a problem where I need to maximize ...
2 votes
1 answer
68 views

I am trying to create subgraphs from pairs of edges in a graph a by following procedure: library(igraph) library(data.table) dt <- data.table(from = c("A", "B", "C", &...
zhang's user avatar
  • 689
5 votes
2 answers
157 views

In a multi-branch game, there are n possible endings. You can think of it as a directed tree with n leaf nodes, where each edge has a weight of 1. Instead of playing through the entire game to reach ...

15 30 50 per page
1
2 3 4 5
...
71

AltStyle によって変換されたページ (->オリジナル) /