Select "Next Topic to Solve Questions from" Randomly

For Whom: If you have been practicing Leetcode questions for quite a few days now and unable to decide which Topic you should choose next to solve questions from, then this might help you :)

Just Run the following C++ code (either on your Local IDE or in any online ide) to find your Next Topic. If you get a topic which you have recently solved, then Run the code once more :)

#include<iostream>
#include<vector>
#include<string>
#include <ctime>
using namespace std;

void solve()
{  
  vector<string> v={"Array","Dynamic Programming","string","Math","Greedy","Depth-tirst Search",
	"Tree","Hash Table","Binary Search","Breadth-frst Search","Sort","Two Pointers","Backtracking",
	"Design","Stack","Bit Manipulation","Graph","Heap","Linked List","Recursion","Union Find","Sliding Window",
	"Trie","Divide and Conquer","Ordered Map","Segment Tree","Queue","Geometry","Line sweep","Binary Indexed Tree",
	"Minimax","Brainteaser","Topological Sort","Deque","Random","Binary Search Tree","Rolling Hash","Suffix Array",
	"Rejection Sampling","Reservoir Sampling","Meet in the Middle","Memorization","OOP"};
  
  int random = rand() % 43;
  cout<<"Your Next Topic --->  "<<v[random];
}
signed main()
{
    srand((unsigned int)time(NULL));
    solve();
    return 0;
}

Ideone Link: https://ideone.com/Xgx0ig

Happy Coding :)

Comments (2)