Results for How to implement a topological sorting algorithm for directed acyclic graphs (DAGs)
I'm compiling the C++ code below with g++ 14.0.0: g++ -I/path/to/c++/14.0.0 -L/path/to/c++/libstdc++ -ltbb -std=c++23 -o main main.cc #include ...
I have an two arrays of 1's and 0's: a = [1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0] b = [0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1] I want to make sure t...
I'm attempting to read words from the command line using argv in C and then sort them in descending order based on their lengths. However, my sorting ...
I'm attempting to read words from the command line using argv in C and then sort them in descending order based on their lengths. However, my sorting ...
Using the following code, I can generate the Elliptic Curve Digital Signature Algorithm (ECDSA) parameters (i.e., public and private keys). using var ...
I have the following for my first function (array defined under function): def test(array): if len(array) == 1: return 1 return test(a...
I'm trying to write a simple bubble sort function to sort some random data. Whenever executed though it simply prints the unsorted list as it was writ...
I have a web store application where from the home page you can click an input field, press find and it should show you the list of orders that are th...
I would like to know if there is a known problem with the Leiden algorithm implemented by igraph. When I run it, it generates partitions with too many...
I am try to create a chart using vconcat composition, i create a vconcat[0] as main chart and vconcat[1] for customize scroller , that bind with main...
I am attempting to implement an sub class that extends ArrayList. This class should print the elements of an array. import java.util.ArrayList; public...
I need to find a Divide and Conquer algorithm (for the max profit problem) with complexity Θ(nlogn) but I am only able to find with complexity Θ(n). T...
I want to write a general version of gradient descent algorithm in c++ to pass the following gtest. ... #include TEST(HW6Test, TEST1) { auto mi...
I made a generic Vector struct, used with different T types : struct VectorT> { data: [T; 3], } I already implemented some generic traits for math...
I am trying to sort an array/list of non-negative integers in linear time. We also only keep the unique elements. Here is an example, Sort: [7, 7, 0, ...
I have scoured this forum, and have yet to find a solution to my problem. I am using pandas dataframes, and I need to order this column, which of type...
I'm thinking about developing a storage-efficient voting system. Users of my app should be able to upvote or downvote a post, undo their vote, vote ag...
A Macro, say logging something I want it can be used independently with ";" followed LOG("hello world"); and it can appear in a “operator,()” int i = ...
There is a dropdown and based on the values of the dropdown I am sorting the ag grid here but I want to fix a row at top when doing sorting with id 95...
I create area chart and add a custom scroller using vconcat composition,vconcat[0] is main chart and vconcat1 is for dummy scroller Issue is that when...
First I send an order to a microcontroller to generate a signal, when I send an order I add the order to a map which contains tracked orders, this ord...
N item are in a queue. There are two set with same capacity. Each item in this queue wants to enter the set that the item in front of him entered unle...
I'm working on graduation researc and i was assigned to implement new function in AR mobile app, it works like furniture showroom/catalogue or somethi...
I've been trying to implement a bellman ford algorithm in python but I'm having two issues: it won't detect negative weight cycles, nor will it proper...
Let's assume I have a set of charts using ggplot that I patch together using patchwork. All charts are having the same legend and I want to have one l...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?