Merge two linked list solution in c++ -------------------------------------------------------------------------------------------------------------------- c++ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* mergeTwoLists(ListNode* list1, ListNode* list2) { ListNode *tempNode=new ListNode(); //create a new node ListNode *head=tempNode; //create a new head and assign new node to head while(list1 && list2) //until list1 or list2 not null { ...
HOW TO CREATE SIDE SCROLLING AND INFINITE SCROLLING GAME COMPLETE CONCEPT CAN BE APPLIED TO ANY GAME ENGINE
so endless gaming is very popular these days especially on mobile devices so how i can create a smooth game which would run at a constant framerate on a slower device is really a difficult task so lets try to break up the things into very small pieces. 1. infinite endless games are different from traditional side scrolling endless games they need many types of adjustment form example a side scrolling game required three major things one a camera a Player or actor and many objects (platforms,enemies,hurdles etc ) so basic concept of slide scrolling game is