Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~2K People Reached
About Me

Me in a Nutshell

Interests
C++
PC Specs
ABC
Favorite Forums
Favorite Tags
Member Avatar for shelton22

I have declared, map<int, vector<int>> abcmap; map<int,vector<int>>:: iterator itmap; vector<int>SPLINKS; SPLINKS contains: 1 3 4 abcmap contains; 1=> 1 2=> 2 6 3=> 1 2 4 I want to iterate both SPLINKS and abcmap to find and erase elements that do not match in both containers; ie after execution; 2=>2 …

Member Avatar for shelton22
0
275
Member Avatar for shelton22

I have delared two multimaps such as; multimap<int,vector<int>> allpathsmap; multimap<int,vector<int>>:: iterator itapm; typedef pair<int,vector<int>> pairapm; multimap<int,vector<int>> graphtextmap; multimap<int,vector<int>>:: iterator itgtm; typedef pair<int,vector<int>> pairgtm; And I wrote the following code to traverse the values of multimaps to print the key; for(itgtm=graphtextmap.begin(); itgtm!=graphtextmap.end(); ++itgtm) { for(itapm=allpathsmap.begin(); itapm!=allpathsmap.end(); ++itapm) { cout << endl …

Member Avatar for nullptr
0
206
Member Avatar for shelton22

Hi Friends! I have tried to find all possible paths between two nodes; #include <iostream> #include <vector> #include <queue> #include <map> #include "fstream" #define max_edges 16 #define MAX_NODES 5 using namespace std; bool isadjacency_node_not_present_in_current_path(int node,vector<int>pathway); int findpaths(int source ,int target ); void display_all_paths_map(); vector<vector<int> >GRAPH(100); vector<int>pathway; map<int,vector<int>> allpathsmap; map<int,vector<int>>:: iterator …

0
202
Member Avatar for shelton22

Hi Friends, I have a graph in text file (origin, destin, link_id) such as 1 2 1 1 3 2 1 5 3 2 1 4 2 3 5 2 4 6 2 5 7 3 1 8 3 2 9 3 4 10 4 2 11 4 3 12 …

Member Avatar for Slavi
0
243
Member Avatar for shelton22

Can any one convert this Java code to c++? import java.util.*; import java.io.*; public class Test { private static HashMap<String, List<String>> left_map_rights; public static void main(String args[]) throws Exception { left_map_rights = new HashMap<>(); BufferedReader r = new BufferedReader(new FileReader("routes.text")); String line; HashMap<String, Void> lines = new HashMap<>(); while ((line …

Member Avatar for Hiroshe
0
375
Member Avatar for shelton22

Hi Friends! If I have number of arrays with fixed size (15), it consist of zeros and non-zeros. eg: array1[15]={5,5,0,0,4,4,4,0,0,0,1,0,0,0,3} array2[15]={1,0,0,0,0,7,7,0,0,3,0,0,0,0,2} array3[15]={6,6,6,0,8,8,8,0,0,0,3,3,0,0,4} ........... How can I count the common zero sequences and there indexes of arrays? sample output for the above arrays: Index Nim_of_zeros 3 1 7 2 12 2 …

Member Avatar for iamthwee
0
503